aws-sdk-greengrass 0.26.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.
    #[doc(hidden)]
    pub amzn_client_token: std::option::Option<std::string::String>,
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    #[doc(hidden)]
    pub deployment_id: std::option::Option<std::string::String>,
    /// The type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    #[doc(hidden)]
    pub deployment_type: std::option::Option<crate::types::DeploymentType>,
    /// The ID of the Greengrass group.
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
    /// The ID of the group version to be deployed.
    #[doc(hidden)]
    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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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 Into<std::string::String>) -> Self {
        self.amzn_client_token = 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
    }
    /// The ID of the deployment if you wish to redeploy a previous deployment.
    pub fn deployment_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.deployment_id = 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 type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid.
    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
        self.deployment_type = 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 ID of the Greengrass group.
    pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.group_id = 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 group version to be deployed.
    pub fn group_version_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.group_version_id = 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
    }
    /// Consumes the builder and constructs a [`CreateDeploymentInput`](crate::operation::create_deployment::CreateDeploymentInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::create_deployment::CreateDeploymentInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        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,
        })
    }
}