#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BulkOperationInput {
#[allow(missing_docs)] pub workspace_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub org_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub config_tags: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub operations: ::std::option::Option<::std::vec::Vec::<crate::types::ContextAction>>,
}
impl BulkOperationInput {
#[allow(missing_docs)] pub fn workspace_id(&self) -> ::std::option::Option<&str> {
self.workspace_id.as_deref()
}
#[allow(missing_docs)] pub fn org_id(&self) -> ::std::option::Option<&str> {
self.org_id.as_deref()
}
#[allow(missing_docs)] pub fn config_tags(&self) -> ::std::option::Option<&str> {
self.config_tags.as_deref()
}
#[allow(missing_docs)] pub fn operations(&self) -> &[crate::types::ContextAction] {
self.operations.as_deref()
.unwrap_or_default()
}
}
impl BulkOperationInput {
pub fn builder() -> crate::operation::bulk_operation::builders::BulkOperationInputBuilder {
crate::operation::bulk_operation::builders::BulkOperationInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BulkOperationInputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) org_id: ::std::option::Option<::std::string::String>,
pub(crate) config_tags: ::std::option::Option<::std::string::String>,
pub(crate) operations: ::std::option::Option<::std::vec::Vec::<crate::types::ContextAction>>,
}
impl BulkOperationInputBuilder {
#[allow(missing_docs)] pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workspace_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input; self
}
#[allow(missing_docs)] pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
#[allow(missing_docs)] pub fn org_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.org_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_org_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.org_id = input; self
}
#[allow(missing_docs)] pub fn get_org_id(&self) -> &::std::option::Option<::std::string::String> {
&self.org_id
}
#[allow(missing_docs)] pub fn config_tags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.config_tags = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_config_tags(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.config_tags = input; self
}
#[allow(missing_docs)] pub fn get_config_tags(&self) -> &::std::option::Option<::std::string::String> {
&self.config_tags
}
pub fn operations(mut self, input: crate::types::ContextAction) -> Self {
let mut v = self.operations.unwrap_or_default();
v.push(input);
self.operations = ::std::option::Option::Some(v);
self
}
#[allow(missing_docs)] pub fn set_operations(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ContextAction>>) -> Self {
self.operations = input; self
}
#[allow(missing_docs)] pub fn get_operations(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ContextAction>> {
&self.operations
}
pub fn build(self) -> ::std::result::Result<crate::operation::bulk_operation::BulkOperationInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(
crate::operation::bulk_operation::BulkOperationInput {
workspace_id: self.workspace_id
,
org_id: self.org_id
,
config_tags: self.config_tags
,
operations: self.operations
,
}
)
}
}