aws_sdk_deadline/operation/create_queue/
_create_queue_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateQueueInput {
pub client_token: ::std::option::Option<::std::string::String>,
pub farm_id: ::std::option::Option<::std::string::String>,
pub display_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
pub role_arn: ::std::option::Option<::std::string::String>,
pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
pub required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQueueInput {
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn farm_id(&self) -> ::std::option::Option<&str> {
self.farm_id.as_deref()
}
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn default_budget_action(&self) -> ::std::option::Option<&crate::types::DefaultQueueBudgetAction> {
self.default_budget_action.as_ref()
}
pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
self.job_attachment_settings.as_ref()
}
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
self.job_run_as_user.as_ref()
}
pub fn required_file_system_location_names(&self) -> &[::std::string::String] {
self.required_file_system_location_names.as_deref().unwrap_or_default()
}
pub fn allowed_storage_profile_ids(&self) -> &[::std::string::String] {
self.allowed_storage_profile_ids.as_deref().unwrap_or_default()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::std::fmt::Debug for CreateQueueInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateQueueInput");
formatter.field("client_token", &self.client_token);
formatter.field("farm_id", &self.farm_id);
formatter.field("display_name", &self.display_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("default_budget_action", &self.default_budget_action);
formatter.field("job_attachment_settings", &self.job_attachment_settings);
formatter.field("role_arn", &self.role_arn);
formatter.field("job_run_as_user", &self.job_run_as_user);
formatter.field("required_file_system_location_names", &"*** Sensitive Data Redacted ***");
formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
impl CreateQueueInput {
pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateQueueInputBuilder {
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) farm_id: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
pub(crate) job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
pub(crate) required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQueueInputBuilder {
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.farm_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.farm_id = input;
self
}
pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
&self.farm_id
}
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn default_budget_action(mut self, input: crate::types::DefaultQueueBudgetAction) -> Self {
self.default_budget_action = ::std::option::Option::Some(input);
self
}
pub fn set_default_budget_action(mut self, input: ::std::option::Option<crate::types::DefaultQueueBudgetAction>) -> Self {
self.default_budget_action = input;
self
}
pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
&self.default_budget_action
}
pub fn job_attachment_settings(mut self, input: crate::types::JobAttachmentSettings) -> Self {
self.job_attachment_settings = ::std::option::Option::Some(input);
self
}
pub fn set_job_attachment_settings(mut self, input: ::std::option::Option<crate::types::JobAttachmentSettings>) -> Self {
self.job_attachment_settings = input;
self
}
pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
&self.job_attachment_settings
}
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
pub fn job_run_as_user(mut self, input: crate::types::JobRunAsUser) -> Self {
self.job_run_as_user = ::std::option::Option::Some(input);
self
}
pub fn set_job_run_as_user(mut self, input: ::std::option::Option<crate::types::JobRunAsUser>) -> Self {
self.job_run_as_user = input;
self
}
pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
&self.job_run_as_user
}
pub fn required_file_system_location_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.required_file_system_location_names.unwrap_or_default();
v.push(input.into());
self.required_file_system_location_names = ::std::option::Option::Some(v);
self
}
pub fn set_required_file_system_location_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.required_file_system_location_names = input;
self
}
pub fn get_required_file_system_location_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.required_file_system_location_names
}
pub fn allowed_storage_profile_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.allowed_storage_profile_ids.unwrap_or_default();
v.push(input.into());
self.allowed_storage_profile_ids = ::std::option::Option::Some(v);
self
}
pub fn set_allowed_storage_profile_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.allowed_storage_profile_ids = input;
self
}
pub fn get_allowed_storage_profile_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.allowed_storage_profile_ids
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
client_token: self.client_token,
farm_id: self.farm_id,
display_name: self.display_name,
description: self.description,
default_budget_action: self.default_budget_action,
job_attachment_settings: self.job_attachment_settings,
role_arn: self.role_arn,
job_run_as_user: self.job_run_as_user,
required_file_system_location_names: self.required_file_system_location_names,
allowed_storage_profile_ids: self.allowed_storage_profile_ids,
tags: self.tags,
})
}
}
impl ::std::fmt::Debug for CreateQueueInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateQueueInputBuilder");
formatter.field("client_token", &self.client_token);
formatter.field("farm_id", &self.farm_id);
formatter.field("display_name", &self.display_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("default_budget_action", &self.default_budget_action);
formatter.field("job_attachment_settings", &self.job_attachment_settings);
formatter.field("role_arn", &self.role_arn);
formatter.field("job_run_as_user", &self.job_run_as_user);
formatter.field("required_file_system_location_names", &"*** Sensitive Data Redacted ***");
formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
formatter.field("tags", &self.tags);
formatter.finish()
}
}