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.

/// Information about a deployment.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Deployment {
    /// The time, in milliseconds since the epoch, when the deployment was created.
    #[doc(hidden)]
    pub created_at: std::option::Option<std::string::String>,
    /// The ARN of the deployment.
    #[doc(hidden)]
    pub deployment_arn: std::option::Option<std::string::String>,
    /// The ID of the deployment.
    #[doc(hidden)]
    pub deployment_id: std::option::Option<std::string::String>,
    /// The type of the deployment.
    #[doc(hidden)]
    pub deployment_type: std::option::Option<crate::types::DeploymentType>,
    /// The ARN of the group for this deployment.
    #[doc(hidden)]
    pub group_arn: std::option::Option<std::string::String>,
}
impl Deployment {
    /// The time, in milliseconds since the epoch, when the deployment was created.
    pub fn created_at(&self) -> std::option::Option<&str> {
        self.created_at.as_deref()
    }
    /// The ARN of the deployment.
    pub fn deployment_arn(&self) -> std::option::Option<&str> {
        self.deployment_arn.as_deref()
    }
    /// The ID of the deployment.
    pub fn deployment_id(&self) -> std::option::Option<&str> {
        self.deployment_id.as_deref()
    }
    /// The type of the deployment.
    pub fn deployment_type(&self) -> std::option::Option<&crate::types::DeploymentType> {
        self.deployment_type.as_ref()
    }
    /// The ARN of the group for this deployment.
    pub fn group_arn(&self) -> std::option::Option<&str> {
        self.group_arn.as_deref()
    }
}
impl Deployment {
    /// Creates a new builder-style object to manufacture [`Deployment`](crate::types::Deployment).
    pub fn builder() -> crate::types::builders::DeploymentBuilder {
        crate::types::builders::DeploymentBuilder::default()
    }
}

/// A builder for [`Deployment`](crate::types::Deployment).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeploymentBuilder {
    pub(crate) created_at: std::option::Option<std::string::String>,
    pub(crate) deployment_arn: 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_arn: std::option::Option<std::string::String>,
}
impl DeploymentBuilder {
    /// The time, in milliseconds since the epoch, when the deployment was created.
    pub fn created_at(mut self, input: impl Into<std::string::String>) -> Self {
        self.created_at = Some(input.into());
        self
    }
    /// The time, in milliseconds since the epoch, when the deployment was created.
    pub fn set_created_at(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.created_at = input;
        self
    }
    /// The ARN of the deployment.
    pub fn deployment_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.deployment_arn = Some(input.into());
        self
    }
    /// The ARN of the deployment.
    pub fn set_deployment_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.deployment_arn = input;
        self
    }
    /// The ID of the 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.
    pub fn set_deployment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.deployment_id = input;
        self
    }
    /// The type of the deployment.
    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
        self.deployment_type = Some(input);
        self
    }
    /// The type of the deployment.
    pub fn set_deployment_type(
        mut self,
        input: std::option::Option<crate::types::DeploymentType>,
    ) -> Self {
        self.deployment_type = input;
        self
    }
    /// The ARN of the group for this deployment.
    pub fn group_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.group_arn = Some(input.into());
        self
    }
    /// The ARN of the group for this deployment.
    pub fn set_group_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.group_arn = input;
        self
    }
    /// Consumes the builder and constructs a [`Deployment`](crate::types::Deployment).
    pub fn build(self) -> crate::types::Deployment {
        crate::types::Deployment {
            created_at: self.created_at,
            deployment_arn: self.deployment_arn,
            deployment_id: self.deployment_id,
            deployment_type: self.deployment_type,
            group_arn: self.group_arn,
        }
    }
}