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.

/// <p>Information about a fleet.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Fleet {
    /// <p>The name of the fleet.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The status of the last fleet deployment.</p>
    pub last_deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
    /// <p>The Amazon Resource Name (ARN) of the last deployment job.</p>
    pub last_deployment_job: ::std::option::Option<::std::string::String>,
    /// <p>The time of the last deployment.</p>
    pub last_deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Fleet {
    /// <p>The name of the fleet.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The status of the last fleet deployment.</p>
    pub fn last_deployment_status(&self) -> ::std::option::Option<&crate::types::DeploymentStatus> {
        self.last_deployment_status.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the last deployment job.</p>
    pub fn last_deployment_job(&self) -> ::std::option::Option<&str> {
        self.last_deployment_job.as_deref()
    }
    /// <p>The time of the last deployment.</p>
    pub fn last_deployment_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_deployment_time.as_ref()
    }
}
impl Fleet {
    /// Creates a new builder-style object to manufacture [`Fleet`](crate::types::Fleet).
    pub fn builder() -> crate::types::builders::FleetBuilder {
        crate::types::builders::FleetBuilder::default()
    }
}

/// A builder for [`Fleet`](crate::types::Fleet).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FleetBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
    pub(crate) last_deployment_job: ::std::option::Option<::std::string::String>,
    pub(crate) last_deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl FleetBuilder {
    /// <p>The name of the fleet.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the fleet.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the fleet.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The status of the last fleet deployment.</p>
    pub fn last_deployment_status(mut self, input: crate::types::DeploymentStatus) -> Self {
        self.last_deployment_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the last fleet deployment.</p>
    pub fn set_last_deployment_status(mut self, input: ::std::option::Option<crate::types::DeploymentStatus>) -> Self {
        self.last_deployment_status = input;
        self
    }
    /// <p>The status of the last fleet deployment.</p>
    pub fn get_last_deployment_status(&self) -> &::std::option::Option<crate::types::DeploymentStatus> {
        &self.last_deployment_status
    }
    /// <p>The Amazon Resource Name (ARN) of the last deployment job.</p>
    pub fn last_deployment_job(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_deployment_job = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the last deployment job.</p>
    pub fn set_last_deployment_job(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_deployment_job = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the last deployment job.</p>
    pub fn get_last_deployment_job(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_deployment_job
    }
    /// <p>The time of the last deployment.</p>
    pub fn last_deployment_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_deployment_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time of the last deployment.</p>
    pub fn set_last_deployment_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_deployment_time = input;
        self
    }
    /// <p>The time of the last deployment.</p>
    pub fn get_last_deployment_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_deployment_time
    }
    /// Consumes the builder and constructs a [`Fleet`](crate::types::Fleet).
    pub fn build(self) -> crate::types::Fleet {
        crate::types::Fleet {
            name: self.name,
            arn: self.arn,
            created_at: self.created_at,
            last_deployment_status: self.last_deployment_status,
            last_deployment_job: self.last_deployment_job,
            last_deployment_time: self.last_deployment_time,
        }
    }
}