Skip to main content

aws_sdk_simspaceweaver/operation/start_simulation/
_start_simulation_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 StartSimulationInput {
6    /// <p>A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A <code>ClientToken</code> is also known as an <i>idempotency token</i>. A <code>ClientToken</code> expires after 24 hours.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the simulation.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the simulation.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>. For more information about IAM roles, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM roles</a> in the <i>Identity and Access Management User Guide</i>.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
15    /// <p>Provide a <code>SchemaS3Location</code> to start your simulation from a schema.</p>
16    /// <p>If you provide a <code>SchemaS3Location</code> then you can't provide a <code>SnapshotS3Location</code>.</p>
17    pub schema_s3_location: ::std::option::Option<crate::types::S3Location>,
18    /// <p>The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is <code>14D</code>, or its equivalent in the other units. The default value is <code>14D</code>. A value equivalent to <code>0</code> makes the simulation immediately transition to <code>Stopping</code> as soon as it reaches <code>Started</code>.</p>
19    pub maximum_duration: ::std::option::Option<::std::string::String>,
20    /// <p>A list of tags for the simulation. For more information about tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    /// <p>The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
23    /// <p>Provide a <code>SnapshotS3Location</code> to start your simulation from a snapshot.</p>
24    /// <p>The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.</p>
25    /// <p>If you provide a <code>SnapshotS3Location</code> then you can't provide a <code>SchemaS3Location</code>.</p>
26    pub snapshot_s3_location: ::std::option::Option<crate::types::S3Location>,
27}
28impl StartSimulationInput {
29    /// <p>A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A <code>ClientToken</code> is also known as an <i>idempotency token</i>. A <code>ClientToken</code> expires after 24 hours.</p>
30    pub fn client_token(&self) -> ::std::option::Option<&str> {
31        self.client_token.as_deref()
32    }
33    /// <p>The name of the simulation.</p>
34    pub fn name(&self) -> ::std::option::Option<&str> {
35        self.name.as_deref()
36    }
37    /// <p>The description of the simulation.</p>
38    pub fn description(&self) -> ::std::option::Option<&str> {
39        self.description.as_deref()
40    }
41    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>. For more information about IAM roles, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM roles</a> in the <i>Identity and Access Management User Guide</i>.</p>
42    pub fn role_arn(&self) -> ::std::option::Option<&str> {
43        self.role_arn.as_deref()
44    }
45    /// <p>The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
46    /// <p>Provide a <code>SchemaS3Location</code> to start your simulation from a schema.</p>
47    /// <p>If you provide a <code>SchemaS3Location</code> then you can't provide a <code>SnapshotS3Location</code>.</p>
48    pub fn schema_s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
49        self.schema_s3_location.as_ref()
50    }
51    /// <p>The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is <code>14D</code>, or its equivalent in the other units. The default value is <code>14D</code>. A value equivalent to <code>0</code> makes the simulation immediately transition to <code>Stopping</code> as soon as it reaches <code>Started</code>.</p>
52    pub fn maximum_duration(&self) -> ::std::option::Option<&str> {
53        self.maximum_duration.as_deref()
54    }
55    /// <p>A list of tags for the simulation. For more information about tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
56    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
57        self.tags.as_ref()
58    }
59    /// <p>The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
60    /// <p>Provide a <code>SnapshotS3Location</code> to start your simulation from a snapshot.</p>
61    /// <p>The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.</p>
62    /// <p>If you provide a <code>SnapshotS3Location</code> then you can't provide a <code>SchemaS3Location</code>.</p>
63    pub fn snapshot_s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
64        self.snapshot_s3_location.as_ref()
65    }
66}
67impl ::std::fmt::Debug for StartSimulationInput {
68    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
69        let mut formatter = f.debug_struct("StartSimulationInput");
70        formatter.field("client_token", &"*** Sensitive Data Redacted ***");
71        formatter.field("name", &self.name);
72        formatter.field("description", &self.description);
73        formatter.field("role_arn", &self.role_arn);
74        formatter.field("schema_s3_location", &self.schema_s3_location);
75        formatter.field("maximum_duration", &self.maximum_duration);
76        formatter.field("tags", &self.tags);
77        formatter.field("snapshot_s3_location", &self.snapshot_s3_location);
78        formatter.finish()
79    }
80}
81impl StartSimulationInput {
82    /// Creates a new builder-style object to manufacture [`StartSimulationInput`](crate::operation::start_simulation::StartSimulationInput).
83    pub fn builder() -> crate::operation::start_simulation::builders::StartSimulationInputBuilder {
84        crate::operation::start_simulation::builders::StartSimulationInputBuilder::default()
85    }
86}
87
88/// A builder for [`StartSimulationInput`](crate::operation::start_simulation::StartSimulationInput).
89#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
90#[non_exhaustive]
91pub struct StartSimulationInputBuilder {
92    pub(crate) client_token: ::std::option::Option<::std::string::String>,
93    pub(crate) name: ::std::option::Option<::std::string::String>,
94    pub(crate) description: ::std::option::Option<::std::string::String>,
95    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
96    pub(crate) schema_s3_location: ::std::option::Option<crate::types::S3Location>,
97    pub(crate) maximum_duration: ::std::option::Option<::std::string::String>,
98    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
99    pub(crate) snapshot_s3_location: ::std::option::Option<crate::types::S3Location>,
100}
101impl StartSimulationInputBuilder {
102    /// <p>A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A <code>ClientToken</code> is also known as an <i>idempotency token</i>. A <code>ClientToken</code> expires after 24 hours.</p>
103    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.client_token = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A <code>ClientToken</code> is also known as an <i>idempotency token</i>. A <code>ClientToken</code> expires after 24 hours.</p>
108    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.client_token = input;
110        self
111    }
112    /// <p>A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A <code>ClientToken</code> is also known as an <i>idempotency token</i>. A <code>ClientToken</code> expires after 24 hours.</p>
113    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
114        &self.client_token
115    }
116    /// <p>The name of the simulation.</p>
117    /// This field is required.
118    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.name = ::std::option::Option::Some(input.into());
120        self
121    }
122    /// <p>The name of the simulation.</p>
123    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.name = input;
125        self
126    }
127    /// <p>The name of the simulation.</p>
128    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
129        &self.name
130    }
131    /// <p>The description of the simulation.</p>
132    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.description = ::std::option::Option::Some(input.into());
134        self
135    }
136    /// <p>The description of the simulation.</p>
137    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.description = input;
139        self
140    }
141    /// <p>The description of the simulation.</p>
142    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
143        &self.description
144    }
145    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>. For more information about IAM roles, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM roles</a> in the <i>Identity and Access Management User Guide</i>.</p>
146    /// This field is required.
147    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.role_arn = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>. For more information about IAM roles, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM roles</a> in the <i>Identity and Access Management User Guide</i>.</p>
152    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.role_arn = input;
154        self
155    }
156    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>. For more information about IAM roles, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM roles</a> in the <i>Identity and Access Management User Guide</i>.</p>
157    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
158        &self.role_arn
159    }
160    /// <p>The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
161    /// <p>Provide a <code>SchemaS3Location</code> to start your simulation from a schema.</p>
162    /// <p>If you provide a <code>SchemaS3Location</code> then you can't provide a <code>SnapshotS3Location</code>.</p>
163    pub fn schema_s3_location(mut self, input: crate::types::S3Location) -> Self {
164        self.schema_s3_location = ::std::option::Option::Some(input);
165        self
166    }
167    /// <p>The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
168    /// <p>Provide a <code>SchemaS3Location</code> to start your simulation from a schema.</p>
169    /// <p>If you provide a <code>SchemaS3Location</code> then you can't provide a <code>SnapshotS3Location</code>.</p>
170    pub fn set_schema_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
171        self.schema_s3_location = input;
172        self
173    }
174    /// <p>The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
175    /// <p>Provide a <code>SchemaS3Location</code> to start your simulation from a schema.</p>
176    /// <p>If you provide a <code>SchemaS3Location</code> then you can't provide a <code>SnapshotS3Location</code>.</p>
177    pub fn get_schema_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
178        &self.schema_s3_location
179    }
180    /// <p>The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is <code>14D</code>, or its equivalent in the other units. The default value is <code>14D</code>. A value equivalent to <code>0</code> makes the simulation immediately transition to <code>Stopping</code> as soon as it reaches <code>Started</code>.</p>
181    pub fn maximum_duration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.maximum_duration = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is <code>14D</code>, or its equivalent in the other units. The default value is <code>14D</code>. A value equivalent to <code>0</code> makes the simulation immediately transition to <code>Stopping</code> as soon as it reaches <code>Started</code>.</p>
186    pub fn set_maximum_duration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.maximum_duration = input;
188        self
189    }
190    /// <p>The maximum running time of the simulation, specified as a number of minutes (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit. The maximum value is <code>14D</code>, or its equivalent in the other units. The default value is <code>14D</code>. A value equivalent to <code>0</code> makes the simulation immediately transition to <code>Stopping</code> as soon as it reaches <code>Started</code>.</p>
191    pub fn get_maximum_duration(&self) -> &::std::option::Option<::std::string::String> {
192        &self.maximum_duration
193    }
194    /// Adds a key-value pair to `tags`.
195    ///
196    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
197    ///
198    /// <p>A list of tags for the simulation. For more information about tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
199    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
200        let mut hash_map = self.tags.unwrap_or_default();
201        hash_map.insert(k.into(), v.into());
202        self.tags = ::std::option::Option::Some(hash_map);
203        self
204    }
205    /// <p>A list of tags for the simulation. For more information about tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
206    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
207        self.tags = input;
208        self
209    }
210    /// <p>A list of tags for the simulation. For more information about tags, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
211    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
212        &self.tags
213    }
214    /// <p>The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
215    /// <p>Provide a <code>SnapshotS3Location</code> to start your simulation from a snapshot.</p>
216    /// <p>The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.</p>
217    /// <p>If you provide a <code>SnapshotS3Location</code> then you can't provide a <code>SchemaS3Location</code>.</p>
218    pub fn snapshot_s3_location(mut self, input: crate::types::S3Location) -> Self {
219        self.snapshot_s3_location = ::std::option::Option::Some(input);
220        self
221    }
222    /// <p>The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
223    /// <p>Provide a <code>SnapshotS3Location</code> to start your simulation from a snapshot.</p>
224    /// <p>The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.</p>
225    /// <p>If you provide a <code>SnapshotS3Location</code> then you can't provide a <code>SchemaS3Location</code>.</p>
226    pub fn set_snapshot_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
227        self.snapshot_s3_location = input;
228        self
229    }
230    /// <p>The location of the snapshot .zip file in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"> <i>Amazon Simple Storage Service User Guide</i> </a>.</p>
231    /// <p>Provide a <code>SnapshotS3Location</code> to start your simulation from a snapshot.</p>
232    /// <p>The Amazon S3 bucket must be in the same Amazon Web Services Region as the simulation.</p>
233    /// <p>If you provide a <code>SnapshotS3Location</code> then you can't provide a <code>SchemaS3Location</code>.</p>
234    pub fn get_snapshot_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
235        &self.snapshot_s3_location
236    }
237    /// Consumes the builder and constructs a [`StartSimulationInput`](crate::operation::start_simulation::StartSimulationInput).
238    pub fn build(
239        self,
240    ) -> ::std::result::Result<crate::operation::start_simulation::StartSimulationInput, ::aws_smithy_types::error::operation::BuildError> {
241        ::std::result::Result::Ok(crate::operation::start_simulation::StartSimulationInput {
242            client_token: self.client_token,
243            name: self.name,
244            description: self.description,
245            role_arn: self.role_arn,
246            schema_s3_location: self.schema_s3_location,
247            maximum_duration: self.maximum_duration,
248            tags: self.tags,
249            snapshot_s3_location: self.snapshot_s3_location,
250        })
251    }
252}
253impl ::std::fmt::Debug for StartSimulationInputBuilder {
254    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
255        let mut formatter = f.debug_struct("StartSimulationInputBuilder");
256        formatter.field("client_token", &"*** Sensitive Data Redacted ***");
257        formatter.field("name", &self.name);
258        formatter.field("description", &self.description);
259        formatter.field("role_arn", &self.role_arn);
260        formatter.field("schema_s3_location", &self.schema_s3_location);
261        formatter.field("maximum_duration", &self.maximum_duration);
262        formatter.field("tags", &self.tags);
263        formatter.field("snapshot_s3_location", &self.snapshot_s3_location);
264        formatter.finish()
265    }
266}