aws_sdk_ecs/operation/execute_command/
_execute_command_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ExecuteCommandInput {
6 pub cluster: ::std::option::Option<::std::string::String>,
8 pub container: ::std::option::Option<::std::string::String>,
10 pub command: ::std::option::Option<::std::string::String>,
12 pub interactive: ::std::option::Option<bool>,
14 pub task: ::std::option::Option<::std::string::String>,
16}
17impl ExecuteCommandInput {
18 pub fn cluster(&self) -> ::std::option::Option<&str> {
20 self.cluster.as_deref()
21 }
22 pub fn container(&self) -> ::std::option::Option<&str> {
24 self.container.as_deref()
25 }
26 pub fn command(&self) -> ::std::option::Option<&str> {
28 self.command.as_deref()
29 }
30 pub fn interactive(&self) -> ::std::option::Option<bool> {
32 self.interactive
33 }
34 pub fn task(&self) -> ::std::option::Option<&str> {
36 self.task.as_deref()
37 }
38}
39impl ExecuteCommandInput {
40 pub fn builder() -> crate::operation::execute_command::builders::ExecuteCommandInputBuilder {
42 crate::operation::execute_command::builders::ExecuteCommandInputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct ExecuteCommandInputBuilder {
50 pub(crate) cluster: ::std::option::Option<::std::string::String>,
51 pub(crate) container: ::std::option::Option<::std::string::String>,
52 pub(crate) command: ::std::option::Option<::std::string::String>,
53 pub(crate) interactive: ::std::option::Option<bool>,
54 pub(crate) task: ::std::option::Option<::std::string::String>,
55}
56impl ExecuteCommandInputBuilder {
57 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.cluster = ::std::option::Option::Some(input.into());
60 self
61 }
62 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64 self.cluster = input;
65 self
66 }
67 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
69 &self.cluster
70 }
71 pub fn container(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.container = ::std::option::Option::Some(input.into());
74 self
75 }
76 pub fn set_container(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.container = input;
79 self
80 }
81 pub fn get_container(&self) -> &::std::option::Option<::std::string::String> {
83 &self.container
84 }
85 pub fn command(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.command = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_command(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.command = input;
94 self
95 }
96 pub fn get_command(&self) -> &::std::option::Option<::std::string::String> {
98 &self.command
99 }
100 pub fn interactive(mut self, input: bool) -> Self {
103 self.interactive = ::std::option::Option::Some(input);
104 self
105 }
106 pub fn set_interactive(mut self, input: ::std::option::Option<bool>) -> Self {
108 self.interactive = input;
109 self
110 }
111 pub fn get_interactive(&self) -> &::std::option::Option<bool> {
113 &self.interactive
114 }
115 pub fn task(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.task = ::std::option::Option::Some(input.into());
119 self
120 }
121 pub fn set_task(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.task = input;
124 self
125 }
126 pub fn get_task(&self) -> &::std::option::Option<::std::string::String> {
128 &self.task
129 }
130 pub fn build(
132 self,
133 ) -> ::std::result::Result<crate::operation::execute_command::ExecuteCommandInput, ::aws_smithy_types::error::operation::BuildError> {
134 ::std::result::Result::Ok(crate::operation::execute_command::ExecuteCommandInput {
135 cluster: self.cluster,
136 container: self.container,
137 command: self.command,
138 interactive: self.interactive,
139 task: self.task,
140 })
141 }
142}