Skip to main content

aws_sdk_devopsagent/operation/update_trigger/
_update_trigger_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request structure for updating a Trigger</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateTriggerInput {
7    /// <p>The unique identifier for the agent space containing the Trigger</p>
8    pub agent_space_id: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the Trigger to update</p>
10    pub trigger_id: ::std::option::Option<::std::string::String>,
11    /// <p>The new status for the Trigger</p>
12    pub status: ::std::option::Option<::std::string::String>,
13    /// <p>A unique, case-sensitive identifier used for idempotent Trigger update</p>
14    pub client_token: ::std::option::Option<::std::string::String>,
15}
16impl UpdateTriggerInput {
17    /// <p>The unique identifier for the agent space containing the Trigger</p>
18    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
19        self.agent_space_id.as_deref()
20    }
21    /// <p>The unique identifier of the Trigger to update</p>
22    pub fn trigger_id(&self) -> ::std::option::Option<&str> {
23        self.trigger_id.as_deref()
24    }
25    /// <p>The new status for the Trigger</p>
26    pub fn status(&self) -> ::std::option::Option<&str> {
27        self.status.as_deref()
28    }
29    /// <p>A unique, case-sensitive identifier used for idempotent Trigger update</p>
30    pub fn client_token(&self) -> ::std::option::Option<&str> {
31        self.client_token.as_deref()
32    }
33}
34impl UpdateTriggerInput {
35    /// Creates a new builder-style object to manufacture [`UpdateTriggerInput`](crate::operation::update_trigger::UpdateTriggerInput).
36    pub fn builder() -> crate::operation::update_trigger::builders::UpdateTriggerInputBuilder {
37        crate::operation::update_trigger::builders::UpdateTriggerInputBuilder::default()
38    }
39}
40
41/// A builder for [`UpdateTriggerInput`](crate::operation::update_trigger::UpdateTriggerInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct UpdateTriggerInputBuilder {
45    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
46    pub(crate) trigger_id: ::std::option::Option<::std::string::String>,
47    pub(crate) status: ::std::option::Option<::std::string::String>,
48    pub(crate) client_token: ::std::option::Option<::std::string::String>,
49}
50impl UpdateTriggerInputBuilder {
51    /// <p>The unique identifier for the agent space containing the Trigger</p>
52    /// This field is required.
53    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.agent_space_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The unique identifier for the agent space containing the Trigger</p>
58    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.agent_space_id = input;
60        self
61    }
62    /// <p>The unique identifier for the agent space containing the Trigger</p>
63    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.agent_space_id
65    }
66    /// <p>The unique identifier of the Trigger to update</p>
67    /// This field is required.
68    pub fn trigger_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.trigger_id = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The unique identifier of the Trigger to update</p>
73    pub fn set_trigger_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.trigger_id = input;
75        self
76    }
77    /// <p>The unique identifier of the Trigger to update</p>
78    pub fn get_trigger_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.trigger_id
80    }
81    /// <p>The new status for the Trigger</p>
82    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.status = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The new status for the Trigger</p>
87    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.status = input;
89        self
90    }
91    /// <p>The new status for the Trigger</p>
92    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
93        &self.status
94    }
95    /// <p>A unique, case-sensitive identifier used for idempotent Trigger update</p>
96    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.client_token = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>A unique, case-sensitive identifier used for idempotent Trigger update</p>
101    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.client_token = input;
103        self
104    }
105    /// <p>A unique, case-sensitive identifier used for idempotent Trigger update</p>
106    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
107        &self.client_token
108    }
109    /// Consumes the builder and constructs a [`UpdateTriggerInput`](crate::operation::update_trigger::UpdateTriggerInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::update_trigger::UpdateTriggerInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::update_trigger::UpdateTriggerInput {
114            agent_space_id: self.agent_space_id,
115            trigger_id: self.trigger_id,
116            status: self.status,
117            client_token: self.client_token,
118        })
119    }
120}