aws_sdk_deadline/operation/create_job/
_create_job_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateJobInput {
pub farm_id: ::std::option::Option<::std::string::String>,
pub queue_id: ::std::option::Option<::std::string::String>,
pub client_token: ::std::option::Option<::std::string::String>,
pub template: ::std::option::Option<::std::string::String>,
pub template_type: ::std::option::Option<crate::types::JobTemplateType>,
pub priority: ::std::option::Option<i32>,
pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
pub attachments: ::std::option::Option<crate::types::Attachments>,
pub storage_profile_id: ::std::option::Option<::std::string::String>,
pub target_task_run_status: ::std::option::Option<crate::types::CreateJobTargetTaskRunStatus>,
pub max_failed_tasks_count: ::std::option::Option<i32>,
pub max_retries_per_task: ::std::option::Option<i32>,
pub source_job_id: ::std::option::Option<::std::string::String>,
}
impl CreateJobInput {
pub fn farm_id(&self) -> ::std::option::Option<&str> {
self.farm_id.as_deref()
}
pub fn queue_id(&self) -> ::std::option::Option<&str> {
self.queue_id.as_deref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn template(&self) -> ::std::option::Option<&str> {
self.template.as_deref()
}
pub fn template_type(&self) -> ::std::option::Option<&crate::types::JobTemplateType> {
self.template_type.as_ref()
}
pub fn priority(&self) -> ::std::option::Option<i32> {
self.priority
}
pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::JobParameter>> {
self.parameters.as_ref()
}
pub fn attachments(&self) -> ::std::option::Option<&crate::types::Attachments> {
self.attachments.as_ref()
}
pub fn storage_profile_id(&self) -> ::std::option::Option<&str> {
self.storage_profile_id.as_deref()
}
pub fn target_task_run_status(&self) -> ::std::option::Option<&crate::types::CreateJobTargetTaskRunStatus> {
self.target_task_run_status.as_ref()
}
pub fn max_failed_tasks_count(&self) -> ::std::option::Option<i32> {
self.max_failed_tasks_count
}
pub fn max_retries_per_task(&self) -> ::std::option::Option<i32> {
self.max_retries_per_task
}
pub fn source_job_id(&self) -> ::std::option::Option<&str> {
self.source_job_id.as_deref()
}
}
impl ::std::fmt::Debug for CreateJobInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateJobInput");
formatter.field("farm_id", &self.farm_id);
formatter.field("queue_id", &self.queue_id);
formatter.field("client_token", &self.client_token);
formatter.field("template", &"*** Sensitive Data Redacted ***");
formatter.field("template_type", &self.template_type);
formatter.field("priority", &self.priority);
formatter.field("parameters", &"*** Sensitive Data Redacted ***");
formatter.field("attachments", &self.attachments);
formatter.field("storage_profile_id", &self.storage_profile_id);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("max_failed_tasks_count", &self.max_failed_tasks_count);
formatter.field("max_retries_per_task", &self.max_retries_per_task);
formatter.field("source_job_id", &self.source_job_id);
formatter.finish()
}
}
impl CreateJobInput {
pub fn builder() -> crate::operation::create_job::builders::CreateJobInputBuilder {
crate::operation::create_job::builders::CreateJobInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateJobInputBuilder {
pub(crate) farm_id: ::std::option::Option<::std::string::String>,
pub(crate) queue_id: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) template: ::std::option::Option<::std::string::String>,
pub(crate) template_type: ::std::option::Option<crate::types::JobTemplateType>,
pub(crate) priority: ::std::option::Option<i32>,
pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
pub(crate) attachments: ::std::option::Option<crate::types::Attachments>,
pub(crate) storage_profile_id: ::std::option::Option<::std::string::String>,
pub(crate) target_task_run_status: ::std::option::Option<crate::types::CreateJobTargetTaskRunStatus>,
pub(crate) max_failed_tasks_count: ::std::option::Option<i32>,
pub(crate) max_retries_per_task: ::std::option::Option<i32>,
pub(crate) source_job_id: ::std::option::Option<::std::string::String>,
}
impl CreateJobInputBuilder {
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 queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.queue_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.queue_id = input;
self
}
pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
&self.queue_id
}
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 template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template = ::std::option::Option::Some(input.into());
self
}
pub fn set_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template = input;
self
}
pub fn get_template(&self) -> &::std::option::Option<::std::string::String> {
&self.template
}
pub fn template_type(mut self, input: crate::types::JobTemplateType) -> Self {
self.template_type = ::std::option::Option::Some(input);
self
}
pub fn set_template_type(mut self, input: ::std::option::Option<crate::types::JobTemplateType>) -> Self {
self.template_type = input;
self
}
pub fn get_template_type(&self) -> &::std::option::Option<crate::types::JobTemplateType> {
&self.template_type
}
pub fn priority(mut self, input: i32) -> Self {
self.priority = ::std::option::Option::Some(input);
self
}
pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
self.priority = input;
self
}
pub fn get_priority(&self) -> &::std::option::Option<i32> {
&self.priority
}
pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::JobParameter) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v);
self.parameters = ::std::option::Option::Some(hash_map);
self
}
pub fn set_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>>,
) -> Self {
self.parameters = input;
self
}
pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::JobParameter>> {
&self.parameters
}
pub fn attachments(mut self, input: crate::types::Attachments) -> Self {
self.attachments = ::std::option::Option::Some(input);
self
}
pub fn set_attachments(mut self, input: ::std::option::Option<crate::types::Attachments>) -> Self {
self.attachments = input;
self
}
pub fn get_attachments(&self) -> &::std::option::Option<crate::types::Attachments> {
&self.attachments
}
pub fn storage_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.storage_profile_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_storage_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.storage_profile_id = input;
self
}
pub fn get_storage_profile_id(&self) -> &::std::option::Option<::std::string::String> {
&self.storage_profile_id
}
pub fn target_task_run_status(mut self, input: crate::types::CreateJobTargetTaskRunStatus) -> Self {
self.target_task_run_status = ::std::option::Option::Some(input);
self
}
pub fn set_target_task_run_status(mut self, input: ::std::option::Option<crate::types::CreateJobTargetTaskRunStatus>) -> Self {
self.target_task_run_status = input;
self
}
pub fn get_target_task_run_status(&self) -> &::std::option::Option<crate::types::CreateJobTargetTaskRunStatus> {
&self.target_task_run_status
}
pub fn max_failed_tasks_count(mut self, input: i32) -> Self {
self.max_failed_tasks_count = ::std::option::Option::Some(input);
self
}
pub fn set_max_failed_tasks_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_failed_tasks_count = input;
self
}
pub fn get_max_failed_tasks_count(&self) -> &::std::option::Option<i32> {
&self.max_failed_tasks_count
}
pub fn max_retries_per_task(mut self, input: i32) -> Self {
self.max_retries_per_task = ::std::option::Option::Some(input);
self
}
pub fn set_max_retries_per_task(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_retries_per_task = input;
self
}
pub fn get_max_retries_per_task(&self) -> &::std::option::Option<i32> {
&self.max_retries_per_task
}
pub fn source_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_job_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_job_id = input;
self
}
pub fn get_source_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_job_id
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_job::CreateJobInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_job::CreateJobInput {
farm_id: self.farm_id,
queue_id: self.queue_id,
client_token: self.client_token,
template: self.template,
template_type: self.template_type,
priority: self.priority,
parameters: self.parameters,
attachments: self.attachments,
storage_profile_id: self.storage_profile_id,
target_task_run_status: self.target_task_run_status,
max_failed_tasks_count: self.max_failed_tasks_count,
max_retries_per_task: self.max_retries_per_task,
source_job_id: self.source_job_id,
})
}
}
impl ::std::fmt::Debug for CreateJobInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateJobInputBuilder");
formatter.field("farm_id", &self.farm_id);
formatter.field("queue_id", &self.queue_id);
formatter.field("client_token", &self.client_token);
formatter.field("template", &"*** Sensitive Data Redacted ***");
formatter.field("template_type", &self.template_type);
formatter.field("priority", &self.priority);
formatter.field("parameters", &"*** Sensitive Data Redacted ***");
formatter.field("attachments", &self.attachments);
formatter.field("storage_profile_id", &self.storage_profile_id);
formatter.field("target_task_run_status", &self.target_task_run_status);
formatter.field("max_failed_tasks_count", &self.max_failed_tasks_count);
formatter.field("max_retries_per_task", &self.max_retries_per_task);
formatter.field("source_job_id", &self.source_job_id);
formatter.finish()
}
}