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