aws_sdk_outposts/operation/update_quote/
_update_quote_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateQuoteInput {
6 pub quote_identifier: ::std::option::Option<::std::string::String>,
8 pub outpost_identifier: ::std::option::Option<::std::string::String>,
10 pub country_code: ::std::option::Option<::std::string::String>,
12 pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
14 pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
16 pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
18 pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
20 pub description: ::std::option::Option<::std::string::String>,
22}
23impl UpdateQuoteInput {
24 pub fn quote_identifier(&self) -> ::std::option::Option<&str> {
26 self.quote_identifier.as_deref()
27 }
28 pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
30 self.outpost_identifier.as_deref()
31 }
32 pub fn country_code(&self) -> ::std::option::Option<&str> {
34 self.country_code.as_deref()
35 }
36 pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
40 self.requested_capacities.as_deref().unwrap_or_default()
41 }
42 pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
46 self.requested_constraints.as_deref().unwrap_or_default()
47 }
48 pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
52 self.requested_payment_options.as_deref().unwrap_or_default()
53 }
54 pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
58 self.requested_payment_terms.as_deref().unwrap_or_default()
59 }
60 pub fn description(&self) -> ::std::option::Option<&str> {
62 self.description.as_deref()
63 }
64}
65impl ::std::fmt::Debug for UpdateQuoteInput {
66 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
67 let mut formatter = f.debug_struct("UpdateQuoteInput");
68 formatter.field("quote_identifier", &self.quote_identifier);
69 formatter.field("outpost_identifier", &self.outpost_identifier);
70 formatter.field("country_code", &self.country_code);
71 formatter.field("requested_capacities", &self.requested_capacities);
72 formatter.field("requested_constraints", &self.requested_constraints);
73 formatter.field("requested_payment_options", &self.requested_payment_options);
74 formatter.field("requested_payment_terms", &self.requested_payment_terms);
75 formatter.field("description", &"*** Sensitive Data Redacted ***");
76 formatter.finish()
77 }
78}
79impl UpdateQuoteInput {
80 pub fn builder() -> crate::operation::update_quote::builders::UpdateQuoteInputBuilder {
82 crate::operation::update_quote::builders::UpdateQuoteInputBuilder::default()
83 }
84}
85
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
88#[non_exhaustive]
89pub struct UpdateQuoteInputBuilder {
90 pub(crate) quote_identifier: ::std::option::Option<::std::string::String>,
91 pub(crate) outpost_identifier: ::std::option::Option<::std::string::String>,
92 pub(crate) country_code: ::std::option::Option<::std::string::String>,
93 pub(crate) requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
94 pub(crate) requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
95 pub(crate) requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
96 pub(crate) requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
97 pub(crate) description: ::std::option::Option<::std::string::String>,
98}
99impl UpdateQuoteInputBuilder {
100 pub fn quote_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.quote_identifier = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_quote_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.quote_identifier = input;
109 self
110 }
111 pub fn get_quote_identifier(&self) -> &::std::option::Option<::std::string::String> {
113 &self.quote_identifier
114 }
115 pub fn outpost_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.outpost_identifier = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.outpost_identifier = input;
123 self
124 }
125 pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
127 &self.outpost_identifier
128 }
129 pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.country_code = ::std::option::Option::Some(input.into());
132 self
133 }
134 pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.country_code = input;
137 self
138 }
139 pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
141 &self.country_code
142 }
143 pub fn requested_capacities(mut self, input: crate::types::QuoteCapacity) -> Self {
149 let mut v = self.requested_capacities.unwrap_or_default();
150 v.push(input);
151 self.requested_capacities = ::std::option::Option::Some(v);
152 self
153 }
154 pub fn set_requested_capacities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>) -> Self {
156 self.requested_capacities = input;
157 self
158 }
159 pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
161 &self.requested_capacities
162 }
163 pub fn requested_constraints(mut self, input: crate::types::QuoteConstraint) -> Self {
169 let mut v = self.requested_constraints.unwrap_or_default();
170 v.push(input);
171 self.requested_constraints = ::std::option::Option::Some(v);
172 self
173 }
174 pub fn set_requested_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>) -> Self {
176 self.requested_constraints = input;
177 self
178 }
179 pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
181 &self.requested_constraints
182 }
183 pub fn requested_payment_options(mut self, input: crate::types::PaymentOption) -> Self {
189 let mut v = self.requested_payment_options.unwrap_or_default();
190 v.push(input);
191 self.requested_payment_options = ::std::option::Option::Some(v);
192 self
193 }
194 pub fn set_requested_payment_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>) -> Self {
196 self.requested_payment_options = input;
197 self
198 }
199 pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
201 &self.requested_payment_options
202 }
203 pub fn requested_payment_terms(mut self, input: crate::types::PaymentTerm) -> Self {
209 let mut v = self.requested_payment_terms.unwrap_or_default();
210 v.push(input);
211 self.requested_payment_terms = ::std::option::Option::Some(v);
212 self
213 }
214 pub fn set_requested_payment_terms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>) -> Self {
216 self.requested_payment_terms = input;
217 self
218 }
219 pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
221 &self.requested_payment_terms
222 }
223 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.description = ::std::option::Option::Some(input.into());
226 self
227 }
228 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.description = input;
231 self
232 }
233 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
235 &self.description
236 }
237 pub fn build(self) -> ::std::result::Result<crate::operation::update_quote::UpdateQuoteInput, ::aws_smithy_types::error::operation::BuildError> {
239 ::std::result::Result::Ok(crate::operation::update_quote::UpdateQuoteInput {
240 quote_identifier: self.quote_identifier,
241 outpost_identifier: self.outpost_identifier,
242 country_code: self.country_code,
243 requested_capacities: self.requested_capacities,
244 requested_constraints: self.requested_constraints,
245 requested_payment_options: self.requested_payment_options,
246 requested_payment_terms: self.requested_payment_terms,
247 description: self.description,
248 })
249 }
250}
251impl ::std::fmt::Debug for UpdateQuoteInputBuilder {
252 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
253 let mut formatter = f.debug_struct("UpdateQuoteInputBuilder");
254 formatter.field("quote_identifier", &self.quote_identifier);
255 formatter.field("outpost_identifier", &self.outpost_identifier);
256 formatter.field("country_code", &self.country_code);
257 formatter.field("requested_capacities", &self.requested_capacities);
258 formatter.field("requested_constraints", &self.requested_constraints);
259 formatter.field("requested_payment_options", &self.requested_payment_options);
260 formatter.field("requested_payment_terms", &self.requested_payment_terms);
261 formatter.field("description", &"*** Sensitive Data Redacted ***");
262 formatter.finish()
263 }
264}