#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartCommandExecutionInput {
pub sandbox_id: ::std::option::Option<::std::string::String>,
pub command: ::std::option::Option<::std::string::String>,
pub r#type: ::std::option::Option<crate::types::CommandType>,
}
impl StartCommandExecutionInput {
pub fn sandbox_id(&self) -> ::std::option::Option<&str> {
self.sandbox_id.as_deref()
}
pub fn command(&self) -> ::std::option::Option<&str> {
self.command.as_deref()
}
pub fn r#type(&self) -> ::std::option::Option<&crate::types::CommandType> {
self.r#type.as_ref()
}
}
impl ::std::fmt::Debug for StartCommandExecutionInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartCommandExecutionInput");
formatter.field("sandbox_id", &self.sandbox_id);
formatter.field("command", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
impl StartCommandExecutionInput {
pub fn builder() -> crate::operation::start_command_execution::builders::StartCommandExecutionInputBuilder {
crate::operation::start_command_execution::builders::StartCommandExecutionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartCommandExecutionInputBuilder {
pub(crate) sandbox_id: ::std::option::Option<::std::string::String>,
pub(crate) command: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::CommandType>,
}
impl StartCommandExecutionInputBuilder {
pub fn sandbox_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sandbox_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_sandbox_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sandbox_id = input;
self
}
pub fn get_sandbox_id(&self) -> &::std::option::Option<::std::string::String> {
&self.sandbox_id
}
pub fn command(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.command = ::std::option::Option::Some(input.into());
self
}
pub fn set_command(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.command = input;
self
}
pub fn get_command(&self) -> &::std::option::Option<::std::string::String> {
&self.command
}
pub fn r#type(mut self, input: crate::types::CommandType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::CommandType>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::CommandType> {
&self.r#type
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_command_execution::StartCommandExecutionInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::start_command_execution::StartCommandExecutionInput {
sandbox_id: self.sandbox_id,
command: self.command,
r#type: self.r#type,
})
}
}
impl ::std::fmt::Debug for StartCommandExecutionInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("StartCommandExecutionInputBuilder");
formatter.field("sandbox_id", &self.sandbox_id);
formatter.field("command", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}