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.

/// 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.
    pub created_at: ::std::option::Option<::std::string::String>,
    /// The ARN of the deployment.
    pub deployment_arn: ::std::option::Option<::std::string::String>,
    /// The ID of the deployment.
    pub deployment_id: ::std::option::Option<::std::string::String>,
    /// The type of the deployment.
    pub deployment_type: ::std::option::Option<crate::types::DeploymentType>,
    /// The ARN of the group for this deployment.
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
        self.created_at = ::std::option::Option::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 time, in milliseconds since the epoch, when the deployment was created.
    pub fn get_created_at(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_at
    }
    /// The ARN of the deployment.
    pub fn deployment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_arn = ::std::option::Option::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 ARN of the deployment.
    pub fn get_deployment_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_arn
    }
    /// The ID of the 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.
    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.
    pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_id
    }
    /// The type of the deployment.
    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
        self.deployment_type = ::std::option::Option::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 type of the deployment.
    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentType> {
        &self.deployment_type
    }
    /// The ARN of the group for this deployment.
    pub fn group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_arn = ::std::option::Option::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
    }
    /// The ARN of the group for this deployment.
    pub fn get_group_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_arn
    }
    /// 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,
        }
    }
}