#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTaskProtectionInput {
pub cluster: ::std::option::Option<::std::string::String>,
pub tasks: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetTaskProtectionInput {
pub fn cluster(&self) -> ::std::option::Option<&str> {
self.cluster.as_deref()
}
pub fn tasks(&self) -> &[::std::string::String] {
self.tasks.as_deref().unwrap_or_default()
}
}
impl GetTaskProtectionInput {
pub fn builder() -> crate::operation::get_task_protection::builders::GetTaskProtectionInputBuilder {
crate::operation::get_task_protection::builders::GetTaskProtectionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTaskProtectionInputBuilder {
pub(crate) cluster: ::std::option::Option<::std::string::String>,
pub(crate) tasks: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetTaskProtectionInputBuilder {
pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster = ::std::option::Option::Some(input.into());
self
}
pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster = input;
self
}
pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster
}
pub fn tasks(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.tasks.unwrap_or_default();
v.push(input.into());
self.tasks = ::std::option::Option::Some(v);
self
}
pub fn set_tasks(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.tasks = input;
self
}
pub fn get_tasks(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.tasks
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_task_protection::GetTaskProtectionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_task_protection::GetTaskProtectionInput {
cluster: self.cluster,
tasks: self.tasks,
})
}
}