superposition_sdk 0.100.1

Rust SDK to work with Superposition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateDimensionOutput  {
    #[allow(missing_docs)] // documentation missing in model
    pub dimension: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub position: i32,
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub schema: ::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>,
    #[allow(missing_docs)] // documentation missing in model
    pub value_validation_function_name: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub description: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub change_reason: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub last_modified_at: ::aws_smithy_types::DateTime,
    #[allow(missing_docs)] // documentation missing in model
    pub last_modified_by: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub created_at: ::aws_smithy_types::DateTime,
    #[allow(missing_docs)] // documentation missing in model
    pub created_by: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub dependency_graph: ::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>>,
    #[allow(missing_docs)] // documentation missing in model
    pub dimension_type: crate::types::DimensionType,
    #[allow(missing_docs)] // documentation missing in model
    pub value_compute_function_name: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub mandatory: bool,
}
impl  UpdateDimensionOutput  {
    #[allow(missing_docs)] // documentation missing in model
    pub fn dimension(&self) -> &str {
        use std::ops::Deref; self.dimension.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn position(&self) -> i32 {
        self.position
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn schema(&self) -> &::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document> {
        &self.schema
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn value_validation_function_name(&self) -> ::std::option::Option<&str> {
        self.value_validation_function_name.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn description(&self) -> &str {
        use std::ops::Deref; self.description.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn change_reason(&self) -> &str {
        use std::ops::Deref; self.change_reason.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn last_modified_at(&self) -> &::aws_smithy_types::DateTime {
        &self.last_modified_at
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn last_modified_by(&self) -> &str {
        use std::ops::Deref; self.last_modified_by.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn created_by(&self) -> &str {
        use std::ops::Deref; self.created_by.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn dependency_graph(&self) -> &::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>> {
        &self.dependency_graph
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn dimension_type(&self) -> &crate::types::DimensionType {
        &self.dimension_type
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn value_compute_function_name(&self) -> ::std::option::Option<&str> {
        self.value_compute_function_name.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn mandatory(&self) -> bool {
        self.mandatory
    }
}
impl UpdateDimensionOutput {
    /// Creates a new builder-style object to manufacture [`UpdateDimensionOutput`](crate::operation::update_dimension::UpdateDimensionOutput).
    pub fn builder() -> crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder {
        crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::default()
    }
}

/// A builder for [`UpdateDimensionOutput`](crate::operation::update_dimension::UpdateDimensionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDimensionOutputBuilder {
    pub(crate) dimension: ::std::option::Option<::std::string::String>,
    pub(crate) position: ::std::option::Option<i32>,
    pub(crate) schema: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
    pub(crate) value_validation_function_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) change_reason: ::std::option::Option<::std::string::String>,
    pub(crate) last_modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_by: ::std::option::Option<::std::string::String>,
    pub(crate) dependency_graph: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>>>,
    pub(crate) dimension_type: ::std::option::Option<crate::types::DimensionType>,
    pub(crate) value_compute_function_name: ::std::option::Option<::std::string::String>,
    pub(crate) mandatory: ::std::option::Option<bool>,
}
impl UpdateDimensionOutputBuilder {
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn dimension(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dimension = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_dimension(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dimension = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_dimension(&self) -> &::std::option::Option<::std::string::String> {
        &self.dimension
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn position(mut self, input: i32) -> Self {
        self.position = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_position(mut self, input: ::std::option::Option<i32>) -> Self {
        self.position = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_position(&self) -> &::std::option::Option<i32> {
        &self.position
    }
    /// Adds a key-value pair to `schema`.
    ///
    /// To override the contents of this collection use [`set_schema`](Self::set_schema).
    ///
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn schema(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
        let mut hash_map = self.schema.unwrap_or_default();
                        hash_map.insert(k.into(), v);
                        self.schema = ::std::option::Option::Some(hash_map);
                        self
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn set_schema(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
        self.schema = input; self
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn get_schema(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
        &self.schema
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn value_validation_function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value_validation_function_name = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_value_validation_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value_validation_function_name = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_value_validation_function_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.value_validation_function_name
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn change_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.change_reason = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_change_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.change_reason = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_change_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.change_reason
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn last_modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_at = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_last_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_at = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_last_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_at
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_modified_by = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_modified_by = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_modified_by
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by
    }
    /// Adds a key-value pair to `dependency_graph`.
    ///
    /// To override the contents of this collection use [`set_dependency_graph`](Self::set_dependency_graph).
    ///
    pub fn dependency_graph(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec::<::std::string::String>) -> Self {
        let mut hash_map = self.dependency_graph.unwrap_or_default();
                        hash_map.insert(k.into(), v);
                        self.dependency_graph = ::std::option::Option::Some(hash_map);
                        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_dependency_graph(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>>>) -> Self {
        self.dependency_graph = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_dependency_graph(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::std::vec::Vec::<::std::string::String>>> {
        &self.dependency_graph
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn dimension_type(mut self, input: crate::types::DimensionType) -> Self {
        self.dimension_type = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_dimension_type(mut self, input: ::std::option::Option<crate::types::DimensionType>) -> Self {
        self.dimension_type = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_dimension_type(&self) -> &::std::option::Option<crate::types::DimensionType> {
        &self.dimension_type
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn value_compute_function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value_compute_function_name = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_value_compute_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value_compute_function_name = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_value_compute_function_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.value_compute_function_name
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn mandatory(mut self, input: bool) -> Self {
        self.mandatory = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_mandatory(mut self, input: ::std::option::Option<bool>) -> Self {
        self.mandatory = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_mandatory(&self) -> &::std::option::Option<bool> {
        &self.mandatory
    }
    /// Consumes the builder and constructs a [`UpdateDimensionOutput`](crate::operation::update_dimension::UpdateDimensionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`dimension`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::dimension)
    /// - [`position`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::position)
    /// - [`schema`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::schema)
    /// - [`description`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::description)
    /// - [`change_reason`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::change_reason)
    /// - [`last_modified_at`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::last_modified_at)
    /// - [`last_modified_by`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::last_modified_by)
    /// - [`created_at`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::created_at)
    /// - [`created_by`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::created_by)
    /// - [`dependency_graph`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::dependency_graph)
    /// - [`dimension_type`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::dimension_type)
    /// - [`mandatory`](crate::operation::update_dimension::builders::UpdateDimensionOutputBuilder::mandatory)
    pub fn build(self) -> ::std::result::Result<crate::operation::update_dimension::UpdateDimensionOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(
            crate::operation::update_dimension::UpdateDimensionOutput {
                dimension: self.dimension
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("dimension", "dimension was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                position: self.position
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("position", "position was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                schema: self.schema
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("schema", "schema was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                value_validation_function_name: self.value_validation_function_name
                ,
                description: self.description
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("description", "description was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                change_reason: self.change_reason
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("change_reason", "change_reason was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                last_modified_at: self.last_modified_at
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_at", "last_modified_at was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                last_modified_by: self.last_modified_by
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_by", "last_modified_by was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                created_at: self.created_at
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("created_at", "created_at was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                created_by: self.created_by
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("created_by", "created_by was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                dependency_graph: self.dependency_graph
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("dependency_graph", "dependency_graph was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                dimension_type: self.dimension_type
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("dimension_type", "dimension_type was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
                value_compute_function_name: self.value_compute_function_name
                ,
                mandatory: self.mandatory
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("mandatory", "mandatory was not specified but it is required when building UpdateDimensionOutput")
                    )?
                ,
            }
        )
    }
}