aws-sdk-robomaker 1.81.0

AWS SDK for AWS RoboMaker
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[deprecated(
    note = "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html."
)]
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateDeploymentJobInput {
    /// <p>The requested deployment configuration.</p>
    pub deployment_config: ::std::option::Option<crate::types::DeploymentConfig>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
    pub fleet: ::std::option::Option<::std::string::String>,
    /// <p>The deployment application configuration.</p>
    pub deployment_application_configs: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>>,
    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDeploymentJobInput {
    /// <p>The requested deployment configuration.</p>
    pub fn deployment_config(&self) -> ::std::option::Option<&crate::types::DeploymentConfig> {
        self.deployment_config.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
    pub fn fleet(&self) -> ::std::option::Option<&str> {
        self.fleet.as_deref()
    }
    /// <p>The deployment application configuration.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.deployment_application_configs.is_none()`.
    pub fn deployment_application_configs(&self) -> &[crate::types::DeploymentApplicationConfig] {
        self.deployment_application_configs.as_deref().unwrap_or_default()
    }
    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateDeploymentJobInput {
    /// Creates a new builder-style object to manufacture [`CreateDeploymentJobInput`](crate::operation::create_deployment_job::CreateDeploymentJobInput).
    pub fn builder() -> crate::operation::create_deployment_job::builders::CreateDeploymentJobInputBuilder {
        crate::operation::create_deployment_job::builders::CreateDeploymentJobInputBuilder::default()
    }
}

/// A builder for [`CreateDeploymentJobInput`](crate::operation::create_deployment_job::CreateDeploymentJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDeploymentJobInputBuilder {
    pub(crate) deployment_config: ::std::option::Option<crate::types::DeploymentConfig>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
    pub(crate) fleet: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_application_configs: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDeploymentJobInputBuilder {
    /// <p>The requested deployment configuration.</p>
    pub fn deployment_config(mut self, input: crate::types::DeploymentConfig) -> Self {
        self.deployment_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The requested deployment configuration.</p>
    pub fn set_deployment_config(mut self, input: ::std::option::Option<crate::types::DeploymentConfig>) -> Self {
        self.deployment_config = input;
        self
    }
    /// <p>The requested deployment configuration.</p>
    pub fn get_deployment_config(&self) -> &::std::option::Option<crate::types::DeploymentConfig> {
        &self.deployment_config
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    /// This field is required.
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
    /// This field is required.
    pub fn fleet(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.fleet = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
    pub fn set_fleet(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.fleet = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet to deploy.</p>
    pub fn get_fleet(&self) -> &::std::option::Option<::std::string::String> {
        &self.fleet
    }
    /// Appends an item to `deployment_application_configs`.
    ///
    /// To override the contents of this collection use [`set_deployment_application_configs`](Self::set_deployment_application_configs).
    ///
    /// <p>The deployment application configuration.</p>
    pub fn deployment_application_configs(mut self, input: crate::types::DeploymentApplicationConfig) -> Self {
        let mut v = self.deployment_application_configs.unwrap_or_default();
        v.push(input);
        self.deployment_application_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The deployment application configuration.</p>
    pub fn set_deployment_application_configs(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>>,
    ) -> Self {
        self.deployment_application_configs = input;
        self
    }
    /// <p>The deployment application configuration.</p>
    pub fn get_deployment_application_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeploymentApplicationConfig>> {
        &self.deployment_application_configs
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
    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
    }
    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A map that contains tag keys and tag values that are attached to the deployment job.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateDeploymentJobInput`](crate::operation::create_deployment_job::CreateDeploymentJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_deployment_job::CreateDeploymentJobInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_deployment_job::CreateDeploymentJobInput {
            deployment_config: self.deployment_config,
            client_request_token: self.client_request_token,
            fleet: self.fleet,
            deployment_application_configs: self.deployment_application_configs,
            tags: self.tags,
        })
    }
}