aws_sdk_outposts/operation/create_quote/
_create_quote_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateQuoteInput {
6 pub outpost_identifier: ::std::option::Option<::std::string::String>,
8 pub country_code: ::std::option::Option<::std::string::String>,
10 pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
12 pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
14 pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
16 pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
18 pub description: ::std::option::Option<::std::string::String>,
20}
21impl CreateQuoteInput {
22 pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
24 self.outpost_identifier.as_deref()
25 }
26 pub fn country_code(&self) -> ::std::option::Option<&str> {
28 self.country_code.as_deref()
29 }
30 pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
34 self.requested_capacities.as_deref().unwrap_or_default()
35 }
36 pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
40 self.requested_constraints.as_deref().unwrap_or_default()
41 }
42 pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
46 self.requested_payment_options.as_deref().unwrap_or_default()
47 }
48 pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
52 self.requested_payment_terms.as_deref().unwrap_or_default()
53 }
54 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 pub fn builder() -> crate::operation::create_quote::builders::CreateQuoteInputBuilder {
75 crate::operation::create_quote::builders::CreateQuoteInputBuilder::default()
76 }
77}
78
79#[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 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 pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.outpost_identifier = input;
100 self
101 }
102 pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
104 &self.outpost_identifier
105 }
106 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 pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.country_code = input;
115 self
116 }
117 pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
119 &self.country_code
120 }
121 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 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 pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
139 &self.requested_capacities
140 }
141 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 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 pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
159 &self.requested_constraints
160 }
161 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 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 pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
179 &self.requested_payment_options
180 }
181 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 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 pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
199 &self.requested_payment_terms
200 }
201 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208 self.description = input;
209 self
210 }
211 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
213 &self.description
214 }
215 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}