aws_sdk_devopsagent/operation/update_goal/
_update_goal_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateGoalInput {
7 pub agent_space_id: ::std::option::Option<::std::string::String>,
9 pub goal_id: ::std::option::Option<::std::string::String>,
11 pub evaluation_schedule: ::std::option::Option<crate::types::GoalScheduleInput>,
13 pub client_token: ::std::option::Option<::std::string::String>,
15}
16impl UpdateGoalInput {
17 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
19 self.agent_space_id.as_deref()
20 }
21 pub fn goal_id(&self) -> ::std::option::Option<&str> {
23 self.goal_id.as_deref()
24 }
25 pub fn evaluation_schedule(&self) -> ::std::option::Option<&crate::types::GoalScheduleInput> {
27 self.evaluation_schedule.as_ref()
28 }
29 pub fn client_token(&self) -> ::std::option::Option<&str> {
31 self.client_token.as_deref()
32 }
33}
34impl UpdateGoalInput {
35 pub fn builder() -> crate::operation::update_goal::builders::UpdateGoalInputBuilder {
37 crate::operation::update_goal::builders::UpdateGoalInputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct UpdateGoalInputBuilder {
45 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
46 pub(crate) goal_id: ::std::option::Option<::std::string::String>,
47 pub(crate) evaluation_schedule: ::std::option::Option<crate::types::GoalScheduleInput>,
48 pub(crate) client_token: ::std::option::Option<::std::string::String>,
49}
50impl UpdateGoalInputBuilder {
51 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 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 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.agent_space_id
65 }
66 pub fn goal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.goal_id = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_goal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.goal_id = input;
75 self
76 }
77 pub fn get_goal_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.goal_id
80 }
81 pub fn evaluation_schedule(mut self, input: crate::types::GoalScheduleInput) -> Self {
83 self.evaluation_schedule = ::std::option::Option::Some(input);
84 self
85 }
86 pub fn set_evaluation_schedule(mut self, input: ::std::option::Option<crate::types::GoalScheduleInput>) -> Self {
88 self.evaluation_schedule = input;
89 self
90 }
91 pub fn get_evaluation_schedule(&self) -> &::std::option::Option<crate::types::GoalScheduleInput> {
93 &self.evaluation_schedule
94 }
95 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 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.client_token = input;
103 self
104 }
105 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
107 &self.client_token
108 }
109 pub fn build(self) -> ::std::result::Result<crate::operation::update_goal::UpdateGoalInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::update_goal::UpdateGoalInput {
112 agent_space_id: self.agent_space_id,
113 goal_id: self.goal_id,
114 evaluation_schedule: self.evaluation_schedule,
115 client_token: self.client_token,
116 })
117 }
118}