Skip to main content

aws_sdk_outposts/operation/create_quote/
_create_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 CreateQuoteInput {
6    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
7    pub outpost_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The country code for the Outpost site location.</p>
9    pub country_code: ::std::option::Option<::std::string::String>,
10    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
11    pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
12    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
13    pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
14    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
15    pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
16    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
17    pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
18    /// <p>A description for the quote.</p>
19    pub description: ::std::option::Option<::std::string::String>,
20}
21impl CreateQuoteInput {
22    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
23    pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
24        self.outpost_identifier.as_deref()
25    }
26    /// <p>The country code for the Outpost site location.</p>
27    pub fn country_code(&self) -> ::std::option::Option<&str> {
28        self.country_code.as_deref()
29    }
30    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
31    ///
32    /// 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()`.
33    pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
34        self.requested_capacities.as_deref().unwrap_or_default()
35    }
36    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</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_constraints.is_none()`.
39    pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
40        self.requested_constraints.as_deref().unwrap_or_default()
41    }
42    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</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_payment_options.is_none()`.
45    pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
46        self.requested_payment_options.as_deref().unwrap_or_default()
47    }
48    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</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_terms.is_none()`.
51    pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
52        self.requested_payment_terms.as_deref().unwrap_or_default()
53    }
54    /// <p>A description for the quote.</p>
55    pub fn description(&self) -> ::std::option::Option<&str> {
56        self.description.as_deref()
57    }
58}
59impl ::std::fmt::Debug for CreateQuoteInput {
60    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
61        let mut formatter = f.debug_struct("CreateQuoteInput");
62        formatter.field("outpost_identifier", &self.outpost_identifier);
63        formatter.field("country_code", &self.country_code);
64        formatter.field("requested_capacities", &self.requested_capacities);
65        formatter.field("requested_constraints", &self.requested_constraints);
66        formatter.field("requested_payment_options", &self.requested_payment_options);
67        formatter.field("requested_payment_terms", &self.requested_payment_terms);
68        formatter.field("description", &"*** Sensitive Data Redacted ***");
69        formatter.finish()
70    }
71}
72impl CreateQuoteInput {
73    /// Creates a new builder-style object to manufacture [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
74    pub fn builder() -> crate::operation::create_quote::builders::CreateQuoteInputBuilder {
75        crate::operation::create_quote::builders::CreateQuoteInputBuilder::default()
76    }
77}
78
79/// A builder for [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
80#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
81#[non_exhaustive]
82pub struct CreateQuoteInputBuilder {
83    pub(crate) outpost_identifier: ::std::option::Option<::std::string::String>,
84    pub(crate) country_code: ::std::option::Option<::std::string::String>,
85    pub(crate) requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
86    pub(crate) requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
87    pub(crate) requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
88    pub(crate) requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
89    pub(crate) description: ::std::option::Option<::std::string::String>,
90}
91impl CreateQuoteInputBuilder {
92    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
93    pub fn outpost_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.outpost_identifier = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
98    pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.outpost_identifier = input;
100        self
101    }
102    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
103    pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
104        &self.outpost_identifier
105    }
106    /// <p>The country code for the Outpost site location.</p>
107    /// This field is required.
108    pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.country_code = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The country code for the Outpost site location.</p>
113    pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.country_code = input;
115        self
116    }
117    /// <p>The country code for the Outpost site location.</p>
118    pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
119        &self.country_code
120    }
121    /// Appends an item to `requested_capacities`.
122    ///
123    /// To override the contents of this collection use [`set_requested_capacities`](Self::set_requested_capacities).
124    ///
125    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
126    pub fn requested_capacities(mut self, input: crate::types::QuoteCapacity) -> Self {
127        let mut v = self.requested_capacities.unwrap_or_default();
128        v.push(input);
129        self.requested_capacities = ::std::option::Option::Some(v);
130        self
131    }
132    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
133    pub fn set_requested_capacities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>) -> Self {
134        self.requested_capacities = input;
135        self
136    }
137    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
138    pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
139        &self.requested_capacities
140    }
141    /// Appends an item to `requested_constraints`.
142    ///
143    /// To override the contents of this collection use [`set_requested_constraints`](Self::set_requested_constraints).
144    ///
145    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
146    pub fn requested_constraints(mut self, input: crate::types::QuoteConstraint) -> Self {
147        let mut v = self.requested_constraints.unwrap_or_default();
148        v.push(input);
149        self.requested_constraints = ::std::option::Option::Some(v);
150        self
151    }
152    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
153    pub fn set_requested_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>) -> Self {
154        self.requested_constraints = input;
155        self
156    }
157    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
158    pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
159        &self.requested_constraints
160    }
161    /// Appends an item to `requested_payment_options`.
162    ///
163    /// To override the contents of this collection use [`set_requested_payment_options`](Self::set_requested_payment_options).
164    ///
165    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
166    pub fn requested_payment_options(mut self, input: crate::types::PaymentOption) -> Self {
167        let mut v = self.requested_payment_options.unwrap_or_default();
168        v.push(input);
169        self.requested_payment_options = ::std::option::Option::Some(v);
170        self
171    }
172    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
173    pub fn set_requested_payment_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>) -> Self {
174        self.requested_payment_options = input;
175        self
176    }
177    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
178    pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
179        &self.requested_payment_options
180    }
181    /// Appends an item to `requested_payment_terms`.
182    ///
183    /// To override the contents of this collection use [`set_requested_payment_terms`](Self::set_requested_payment_terms).
184    ///
185    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
186    pub fn requested_payment_terms(mut self, input: crate::types::PaymentTerm) -> Self {
187        let mut v = self.requested_payment_terms.unwrap_or_default();
188        v.push(input);
189        self.requested_payment_terms = ::std::option::Option::Some(v);
190        self
191    }
192    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
193    pub fn set_requested_payment_terms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>) -> Self {
194        self.requested_payment_terms = input;
195        self
196    }
197    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
198    pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
199        &self.requested_payment_terms
200    }
201    /// <p>A description for the quote.</p>
202    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.description = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>A description for the quote.</p>
207    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.description = input;
209        self
210    }
211    /// <p>A description for the quote.</p>
212    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
213        &self.description
214    }
215    /// Consumes the builder and constructs a [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
216    pub fn build(self) -> ::std::result::Result<crate::operation::create_quote::CreateQuoteInput, ::aws_smithy_types::error::operation::BuildError> {
217        ::std::result::Result::Ok(crate::operation::create_quote::CreateQuoteInput {
218            outpost_identifier: self.outpost_identifier,
219            country_code: self.country_code,
220            requested_capacities: self.requested_capacities,
221            requested_constraints: self.requested_constraints,
222            requested_payment_options: self.requested_payment_options,
223            requested_payment_terms: self.requested_payment_terms,
224            description: self.description,
225        })
226    }
227}
228impl ::std::fmt::Debug for CreateQuoteInputBuilder {
229    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
230        let mut formatter = f.debug_struct("CreateQuoteInputBuilder");
231        formatter.field("outpost_identifier", &self.outpost_identifier);
232        formatter.field("country_code", &self.country_code);
233        formatter.field("requested_capacities", &self.requested_capacities);
234        formatter.field("requested_constraints", &self.requested_constraints);
235        formatter.field("requested_payment_options", &self.requested_payment_options);
236        formatter.field("requested_payment_terms", &self.requested_payment_terms);
237        formatter.field("description", &"*** Sensitive Data Redacted ***");
238        formatter.finish()
239    }
240}