aws-sdk-greengrass 1.98.0

AWS SDK for AWS Greengrass
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateDeploymentInput {
    /// A client token used to correlate requests and responses.
    pub amzn_client_token: ::std::option::Option<::std::string::String>,
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub deployment_id: ::std::option::Option<::std::string::String>,
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    pub deployment_type: ::std::option::Option<crate::types::DeploymentType>,
    /// The ID of the Greengrass group.
    pub group_id: ::std::option::Option<::std::string::String>,
    /// The ID of the group version to be deployed.
    pub group_version_id: ::std::option::Option<::std::string::String>,
}
impl CreateDeploymentInput {
    /// A client token used to correlate requests and responses.
    pub fn amzn_client_token(&self) -> ::std::option::Option<&str> {
        self.amzn_client_token.as_deref()
    }
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub fn deployment_id(&self) -> ::std::option::Option<&str> {
        self.deployment_id.as_deref()
    }
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    pub fn deployment_type(&self) -> ::std::option::Option<&crate::types::DeploymentType> {
        self.deployment_type.as_ref()
    }
    /// The ID of the Greengrass group.
    pub fn group_id(&self) -> ::std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// The ID of the group version to be deployed.
    pub fn group_version_id(&self) -> ::std::option::Option<&str> {
        self.group_version_id.as_deref()
    }
}
impl CreateDeploymentInput {
    /// Creates a new builder-style object to manufacture [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
    pub fn builder() -> crate::operation::create_deployment::builders::CreateDeploymentInputBuilder {
        crate::operation::create_deployment::builders::CreateDeploymentInputBuilder::default()
    }
}

/// A builder for [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDeploymentInputBuilder {
    pub(crate) amzn_client_token: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_type: ::std::option::Option<crate::types::DeploymentType>,
    pub(crate) group_id: ::std::option::Option<::std::string::String>,
    pub(crate) group_version_id: ::std::option::Option<::std::string::String>,
}
impl CreateDeploymentInputBuilder {
    /// A client token used to correlate requests and responses.
    pub fn amzn_client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.amzn_client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// A client token used to correlate requests and responses.
    pub fn set_amzn_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.amzn_client_token = input;
        self
    }
    /// A client token used to correlate requests and responses.
    pub fn get_amzn_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.amzn_client_token
    }
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_id = input;
        self
    }
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_id
    }
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    /// This field is required.
    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
        self.deployment_type = ::std::option::Option::Some(input);
        self
    }
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::DeploymentType>) -> Self {
        self.deployment_type = input;
        self
    }
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentType> {
        &self.deployment_type
    }
    /// The ID of the Greengrass group.
    /// This field is required.
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the Greengrass group.
    pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_id = input;
        self
    }
    /// The ID of the Greengrass group.
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// The ID of the group version to be deployed.
    pub fn group_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the group version to be deployed.
    pub fn set_group_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_version_id = input;
        self
    }
    /// The ID of the group version to be deployed.
    pub fn get_group_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_version_id
    }
    /// Consumes the builder and constructs a [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_deployment::CreateDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_deployment::CreateDeploymentInput {
            amzn_client_token: self.amzn_client_token,
            deployment_id: self.deployment_id,
            deployment_type: self.deployment_type,
            group_id: self.group_id,
            group_version_id: self.group_version_id,
        })
    }
}