aws_sdk_deadline/operation/update_farm/_update_farm_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)]
5pub struct UpdateFarmInput {
6 /// <p>The farm ID to update.</p>
7 pub farm_id: ::std::option::Option<::std::string::String>,
8 /// <p>The display name of the farm to update.</p><important>
9 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
10 /// </important>
11 pub display_name: ::std::option::Option<::std::string::String>,
12 /// <p>The description of the farm to update.</p><important>
13 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
14 /// </important>
15 pub description: ::std::option::Option<::std::string::String>,
16}
17impl UpdateFarmInput {
18 /// <p>The farm ID to update.</p>
19 pub fn farm_id(&self) -> ::std::option::Option<&str> {
20 self.farm_id.as_deref()
21 }
22 /// <p>The display name of the farm to update.</p><important>
23 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
24 /// </important>
25 pub fn display_name(&self) -> ::std::option::Option<&str> {
26 self.display_name.as_deref()
27 }
28 /// <p>The description of the farm to update.</p><important>
29 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
30 /// </important>
31 pub fn description(&self) -> ::std::option::Option<&str> {
32 self.description.as_deref()
33 }
34}
35impl ::std::fmt::Debug for UpdateFarmInput {
36 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37 let mut formatter = f.debug_struct("UpdateFarmInput");
38 formatter.field("farm_id", &self.farm_id);
39 formatter.field("display_name", &self.display_name);
40 formatter.field("description", &"*** Sensitive Data Redacted ***");
41 formatter.finish()
42 }
43}
44impl UpdateFarmInput {
45 /// Creates a new builder-style object to manufacture [`UpdateFarmInput`](crate::operation::update_farm::UpdateFarmInput).
46 pub fn builder() -> crate::operation::update_farm::builders::UpdateFarmInputBuilder {
47 crate::operation::update_farm::builders::UpdateFarmInputBuilder::default()
48 }
49}
50
51/// A builder for [`UpdateFarmInput`](crate::operation::update_farm::UpdateFarmInput).
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
53#[non_exhaustive]
54pub struct UpdateFarmInputBuilder {
55 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
56 pub(crate) display_name: ::std::option::Option<::std::string::String>,
57 pub(crate) description: ::std::option::Option<::std::string::String>,
58}
59impl UpdateFarmInputBuilder {
60 /// <p>The farm ID to update.</p>
61 /// This field is required.
62 pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.farm_id = ::std::option::Option::Some(input.into());
64 self
65 }
66 /// <p>The farm ID to update.</p>
67 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.farm_id = input;
69 self
70 }
71 /// <p>The farm ID to update.</p>
72 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
73 &self.farm_id
74 }
75 /// <p>The display name of the farm to update.</p><important>
76 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
77 /// </important>
78 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.display_name = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>The display name of the farm to update.</p><important>
83 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
84 /// </important>
85 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.display_name = input;
87 self
88 }
89 /// <p>The display name of the farm to update.</p><important>
90 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
91 /// </important>
92 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.display_name
94 }
95 /// <p>The description of the farm to update.</p><important>
96 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
97 /// </important>
98 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.description = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <p>The description of the farm to update.</p><important>
103 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
104 /// </important>
105 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.description = input;
107 self
108 }
109 /// <p>The description of the farm to update.</p><important>
110 /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
111 /// </important>
112 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
113 &self.description
114 }
115 /// Consumes the builder and constructs a [`UpdateFarmInput`](crate::operation::update_farm::UpdateFarmInput).
116 pub fn build(self) -> ::std::result::Result<crate::operation::update_farm::UpdateFarmInput, ::aws_smithy_types::error::operation::BuildError> {
117 ::std::result::Result::Ok(crate::operation::update_farm::UpdateFarmInput {
118 farm_id: self.farm_id,
119 display_name: self.display_name,
120 description: self.description,
121 })
122 }
123}
124impl ::std::fmt::Debug for UpdateFarmInputBuilder {
125 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
126 let mut formatter = f.debug_struct("UpdateFarmInputBuilder");
127 formatter.field("farm_id", &self.farm_id);
128 formatter.field("display_name", &self.display_name);
129 formatter.field("description", &"*** Sensitive Data Redacted ***");
130 formatter.finish()
131 }
132}