Skip to main content

aws_sdk_outposts/operation/update_quote/
_update_quote_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 UpdateQuoteInput {
6    /// <p>The ID or ARN of the quote.</p>
7    pub quote_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ID or ARN of the Outpost to associate with the quote. Specify an empty string to remove the Outpost association.</p>
9    pub outpost_identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The country code for the Outpost site location.</p>
11    pub country_code: ::std::option::Option<::std::string::String>,
12    /// <p>The updated capacity requirements for the quote.</p>
13    pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
14    /// <p>The updated physical constraints for the quote.</p>
15    pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
16    /// <p>The updated payment options to include in the quote pricing.</p>
17    pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
18    /// <p>The updated payment terms to include in the quote pricing.</p>
19    pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
20    /// <p>A description for the quote.</p>
21    pub description: ::std::option::Option<::std::string::String>,
22}
23impl UpdateQuoteInput {
24    /// <p>The ID or ARN of the quote.</p>
25    pub fn quote_identifier(&self) -> ::std::option::Option<&str> {
26        self.quote_identifier.as_deref()
27    }
28    /// <p>The ID or ARN of the Outpost to associate with the quote. Specify an empty string to remove the Outpost association.</p>
29    pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
30        self.outpost_identifier.as_deref()
31    }
32    /// <p>The country code for the Outpost site location.</p>
33    pub fn country_code(&self) -> ::std::option::Option<&str> {
34        self.country_code.as_deref()
35    }
36    /// <p>The updated capacity requirements for the quote.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requested_capacities.is_none()`.
39    pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
40        self.requested_capacities.as_deref().unwrap_or_default()
41    }
42    /// <p>The updated physical constraints for the quote.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requested_constraints.is_none()`.
45    pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
46        self.requested_constraints.as_deref().unwrap_or_default()
47    }
48    /// <p>The updated payment options to include in the quote pricing.</p>
49    ///
50    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requested_payment_options.is_none()`.
51    pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
52        self.requested_payment_options.as_deref().unwrap_or_default()
53    }
54    /// <p>The updated payment terms to include in the quote pricing.</p>
55    ///
56    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.requested_payment_terms.is_none()`.
57    pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
58        self.requested_payment_terms.as_deref().unwrap_or_default()
59    }
60    /// <p>A description for the quote.</p>
61    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    /// Creates a new builder-style object to manufacture [`UpdateQuoteInput`](crate::operation::update_quote::UpdateQuoteInput).
81    pub fn builder() -> crate::operation::update_quote::builders::UpdateQuoteInputBuilder {
82        crate::operation::update_quote::builders::UpdateQuoteInputBuilder::default()
83    }
84}
85
86/// A builder for [`UpdateQuoteInput`](crate::operation::update_quote::UpdateQuoteInput).
87#[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    /// <p>The ID or ARN of the quote.</p>
101    /// This field is required.
102    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    /// <p>The ID or ARN of the quote.</p>
107    pub fn set_quote_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.quote_identifier = input;
109        self
110    }
111    /// <p>The ID or ARN of the quote.</p>
112    pub fn get_quote_identifier(&self) -> &::std::option::Option<::std::string::String> {
113        &self.quote_identifier
114    }
115    /// <p>The ID or ARN of the Outpost to associate with the quote. Specify an empty string to remove the Outpost association.</p>
116    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    /// <p>The ID or ARN of the Outpost to associate with the quote. Specify an empty string to remove the Outpost association.</p>
121    pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.outpost_identifier = input;
123        self
124    }
125    /// <p>The ID or ARN of the Outpost to associate with the quote. Specify an empty string to remove the Outpost association.</p>
126    pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
127        &self.outpost_identifier
128    }
129    /// <p>The country code for the Outpost site location.</p>
130    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    /// <p>The country code for the Outpost site location.</p>
135    pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.country_code = input;
137        self
138    }
139    /// <p>The country code for the Outpost site location.</p>
140    pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
141        &self.country_code
142    }
143    /// Appends an item to `requested_capacities`.
144    ///
145    /// To override the contents of this collection use [`set_requested_capacities`](Self::set_requested_capacities).
146    ///
147    /// <p>The updated capacity requirements for the quote.</p>
148    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    /// <p>The updated capacity requirements for the quote.</p>
155    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    /// <p>The updated capacity requirements for the quote.</p>
160    pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
161        &self.requested_capacities
162    }
163    /// Appends an item to `requested_constraints`.
164    ///
165    /// To override the contents of this collection use [`set_requested_constraints`](Self::set_requested_constraints).
166    ///
167    /// <p>The updated physical constraints for the quote.</p>
168    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    /// <p>The updated physical constraints for the quote.</p>
175    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    /// <p>The updated physical constraints for the quote.</p>
180    pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
181        &self.requested_constraints
182    }
183    /// Appends an item to `requested_payment_options`.
184    ///
185    /// To override the contents of this collection use [`set_requested_payment_options`](Self::set_requested_payment_options).
186    ///
187    /// <p>The updated payment options to include in the quote pricing.</p>
188    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    /// <p>The updated payment options to include in the quote pricing.</p>
195    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    /// <p>The updated payment options to include in the quote pricing.</p>
200    pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
201        &self.requested_payment_options
202    }
203    /// Appends an item to `requested_payment_terms`.
204    ///
205    /// To override the contents of this collection use [`set_requested_payment_terms`](Self::set_requested_payment_terms).
206    ///
207    /// <p>The updated payment terms to include in the quote pricing.</p>
208    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    /// <p>The updated payment terms to include in the quote pricing.</p>
215    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    /// <p>The updated payment terms to include in the quote pricing.</p>
220    pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
221        &self.requested_payment_terms
222    }
223    /// <p>A description for the quote.</p>
224    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    /// <p>A description for the quote.</p>
229    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230        self.description = input;
231        self
232    }
233    /// <p>A description for the quote.</p>
234    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
235        &self.description
236    }
237    /// Consumes the builder and constructs a [`UpdateQuoteInput`](crate::operation::update_quote::UpdateQuoteInput).
238    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}