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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about a tool. Tools are used in a simulation job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Tool {
/// <p>Boolean indicating whether a streaming session will be configured for the tool. If <code>True</code>, AWS RoboMaker will configure a connection so you can interact with the tool as it is running in the simulation. It must have a graphical user interface. The default is <code>False</code>.</p>
pub stream_ui: ::std::option::Option<bool>,
/// <p>The name of the tool.</p>
pub name: ::std::string::String,
/// <p>Command-line arguments for the tool. It must include the tool executable name.</p>
pub command: ::std::string::String,
/// <p>Boolean indicating whether logs will be recorded in CloudWatch for the tool. The default is <code>False</code>.</p>
pub stream_output_to_cloud_watch: ::std::option::Option<bool>,
/// <p>Exit behavior determines what happens when your tool quits running. <code>RESTART</code> will cause your tool to be restarted. <code>FAIL</code> will cause your job to exit. The default is <code>RESTART</code>.</p>
pub exit_behavior: ::std::option::Option<crate::types::ExitBehavior>,
}
impl Tool {
/// <p>Boolean indicating whether a streaming session will be configured for the tool. If <code>True</code>, AWS RoboMaker will configure a connection so you can interact with the tool as it is running in the simulation. It must have a graphical user interface. The default is <code>False</code>.</p>
pub fn stream_ui(&self) -> ::std::option::Option<bool> {
self.stream_ui
}
/// <p>The name of the tool.</p>
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
/// <p>Command-line arguments for the tool. It must include the tool executable name.</p>
pub fn command(&self) -> &str {
use std::ops::Deref;
self.command.deref()
}
/// <p>Boolean indicating whether logs will be recorded in CloudWatch for the tool. The default is <code>False</code>.</p>
pub fn stream_output_to_cloud_watch(&self) -> ::std::option::Option<bool> {
self.stream_output_to_cloud_watch
}
/// <p>Exit behavior determines what happens when your tool quits running. <code>RESTART</code> will cause your tool to be restarted. <code>FAIL</code> will cause your job to exit. The default is <code>RESTART</code>.</p>
pub fn exit_behavior(&self) -> ::std::option::Option<&crate::types::ExitBehavior> {
self.exit_behavior.as_ref()
}
}
impl Tool {
/// Creates a new builder-style object to manufacture [`Tool`](crate::types::Tool).
pub fn builder() -> crate::types::builders::ToolBuilder {
crate::types::builders::ToolBuilder::default()
}
}
/// A builder for [`Tool`](crate::types::Tool).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ToolBuilder {
pub(crate) stream_ui: ::std::option::Option<bool>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) command: ::std::option::Option<::std::string::String>,
pub(crate) stream_output_to_cloud_watch: ::std::option::Option<bool>,
pub(crate) exit_behavior: ::std::option::Option<crate::types::ExitBehavior>,
}
impl ToolBuilder {
/// <p>Boolean indicating whether a streaming session will be configured for the tool. If <code>True</code>, AWS RoboMaker will configure a connection so you can interact with the tool as it is running in the simulation. It must have a graphical user interface. The default is <code>False</code>.</p>
pub fn stream_ui(mut self, input: bool) -> Self {
self.stream_ui = ::std::option::Option::Some(input);
self
}
/// <p>Boolean indicating whether a streaming session will be configured for the tool. If <code>True</code>, AWS RoboMaker will configure a connection so you can interact with the tool as it is running in the simulation. It must have a graphical user interface. The default is <code>False</code>.</p>
pub fn set_stream_ui(mut self, input: ::std::option::Option<bool>) -> Self {
self.stream_ui = input;
self
}
/// <p>Boolean indicating whether a streaming session will be configured for the tool. If <code>True</code>, AWS RoboMaker will configure a connection so you can interact with the tool as it is running in the simulation. It must have a graphical user interface. The default is <code>False</code>.</p>
pub fn get_stream_ui(&self) -> &::std::option::Option<bool> {
&self.stream_ui
}
/// <p>The name of the tool.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the tool.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the tool.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>Command-line arguments for the tool. It must include the tool executable name.</p>
/// This field is required.
pub fn command(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.command = ::std::option::Option::Some(input.into());
self
}
/// <p>Command-line arguments for the tool. It must include the tool executable name.</p>
pub fn set_command(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.command = input;
self
}
/// <p>Command-line arguments for the tool. It must include the tool executable name.</p>
pub fn get_command(&self) -> &::std::option::Option<::std::string::String> {
&self.command
}
/// <p>Boolean indicating whether logs will be recorded in CloudWatch for the tool. The default is <code>False</code>.</p>
pub fn stream_output_to_cloud_watch(mut self, input: bool) -> Self {
self.stream_output_to_cloud_watch = ::std::option::Option::Some(input);
self
}
/// <p>Boolean indicating whether logs will be recorded in CloudWatch for the tool. The default is <code>False</code>.</p>
pub fn set_stream_output_to_cloud_watch(mut self, input: ::std::option::Option<bool>) -> Self {
self.stream_output_to_cloud_watch = input;
self
}
/// <p>Boolean indicating whether logs will be recorded in CloudWatch for the tool. The default is <code>False</code>.</p>
pub fn get_stream_output_to_cloud_watch(&self) -> &::std::option::Option<bool> {
&self.stream_output_to_cloud_watch
}
/// <p>Exit behavior determines what happens when your tool quits running. <code>RESTART</code> will cause your tool to be restarted. <code>FAIL</code> will cause your job to exit. The default is <code>RESTART</code>.</p>
pub fn exit_behavior(mut self, input: crate::types::ExitBehavior) -> Self {
self.exit_behavior = ::std::option::Option::Some(input);
self
}
/// <p>Exit behavior determines what happens when your tool quits running. <code>RESTART</code> will cause your tool to be restarted. <code>FAIL</code> will cause your job to exit. The default is <code>RESTART</code>.</p>
pub fn set_exit_behavior(mut self, input: ::std::option::Option<crate::types::ExitBehavior>) -> Self {
self.exit_behavior = input;
self
}
/// <p>Exit behavior determines what happens when your tool quits running. <code>RESTART</code> will cause your tool to be restarted. <code>FAIL</code> will cause your job to exit. The default is <code>RESTART</code>.</p>
pub fn get_exit_behavior(&self) -> &::std::option::Option<crate::types::ExitBehavior> {
&self.exit_behavior
}
/// Consumes the builder and constructs a [`Tool`](crate::types::Tool).
/// This method will fail if any of the following fields are not set:
/// - [`name`](crate::types::builders::ToolBuilder::name)
/// - [`command`](crate::types::builders::ToolBuilder::command)
pub fn build(self) -> ::std::result::Result<crate::types::Tool, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Tool {
stream_ui: self.stream_ui,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building Tool",
)
})?,
command: self.command.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"command",
"command was not specified but it is required when building Tool",
)
})?,
stream_output_to_cloud_watch: self.stream_output_to_cloud_watch,
exit_behavior: self.exit_behavior,
})
}
}