Skip to main content

aws_sdk_m2/operation/cancel_batch_job_execution/
_cancel_batch_job_execution_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CancelBatchJobExecutionInput {
6    /// <p>The unique identifier of the application.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the batch job execution.</p>
9    pub execution_id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
11    pub auth_secrets_manager_arn: ::std::option::Option<::std::string::String>,
12}
13impl CancelBatchJobExecutionInput {
14    /// <p>The unique identifier of the application.</p>
15    pub fn application_id(&self) -> ::std::option::Option<&str> {
16        self.application_id.as_deref()
17    }
18    /// <p>The unique identifier of the batch job execution.</p>
19    pub fn execution_id(&self) -> ::std::option::Option<&str> {
20        self.execution_id.as_deref()
21    }
22    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
23    pub fn auth_secrets_manager_arn(&self) -> ::std::option::Option<&str> {
24        self.auth_secrets_manager_arn.as_deref()
25    }
26}
27impl CancelBatchJobExecutionInput {
28    /// Creates a new builder-style object to manufacture [`CancelBatchJobExecutionInput`](crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionInput).
29    pub fn builder() -> crate::operation::cancel_batch_job_execution::builders::CancelBatchJobExecutionInputBuilder {
30        crate::operation::cancel_batch_job_execution::builders::CancelBatchJobExecutionInputBuilder::default()
31    }
32}
33
34/// A builder for [`CancelBatchJobExecutionInput`](crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CancelBatchJobExecutionInputBuilder {
38    pub(crate) application_id: ::std::option::Option<::std::string::String>,
39    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
40    pub(crate) auth_secrets_manager_arn: ::std::option::Option<::std::string::String>,
41}
42impl CancelBatchJobExecutionInputBuilder {
43    /// <p>The unique identifier of the application.</p>
44    /// This field is required.
45    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.application_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The unique identifier of the application.</p>
50    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.application_id = input;
52        self
53    }
54    /// <p>The unique identifier of the application.</p>
55    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.application_id
57    }
58    /// <p>The unique identifier of the batch job execution.</p>
59    /// This field is required.
60    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.execution_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The unique identifier of the batch job execution.</p>
65    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.execution_id = input;
67        self
68    }
69    /// <p>The unique identifier of the batch job execution.</p>
70    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.execution_id
72    }
73    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
74    pub fn auth_secrets_manager_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.auth_secrets_manager_arn = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
79    pub fn set_auth_secrets_manager_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.auth_secrets_manager_arn = input;
81        self
82    }
83    /// <p>The Amazon Web Services Secrets Manager containing user's credentials for authentication and authorization for Cancel Batch Job Execution operation.</p>
84    pub fn get_auth_secrets_manager_arn(&self) -> &::std::option::Option<::std::string::String> {
85        &self.auth_secrets_manager_arn
86    }
87    /// Consumes the builder and constructs a [`CancelBatchJobExecutionInput`](crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<
91        crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionInput,
92        ::aws_smithy_types::error::operation::BuildError,
93    > {
94        ::std::result::Result::Ok(crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionInput {
95            application_id: self.application_id,
96            execution_id: self.execution_id,
97            auth_secrets_manager_arn: self.auth_secrets_manager_arn,
98        })
99    }
100}