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 GetDeploymentStatusOutput {
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    pub deployment_status: ::std::option::Option<::std::string::String>,
    /// The type of the deployment.
    pub deployment_type: ::std::option::Option<crate::types::DeploymentType>,
    /// Error details
    pub error_details: ::std::option::Option<::std::vec::Vec<crate::types::ErrorDetail>>,
    /// Error message
    pub error_message: ::std::option::Option<::std::string::String>,
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub updated_at: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetDeploymentStatusOutput {
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    pub fn deployment_status(&self) -> ::std::option::Option<&str> {
        self.deployment_status.as_deref()
    }
    /// The type of the deployment.
    pub fn deployment_type(&self) -> ::std::option::Option<&crate::types::DeploymentType> {
        self.deployment_type.as_ref()
    }
    /// Error details
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.error_details.is_none()`.
    pub fn error_details(&self) -> &[crate::types::ErrorDetail] {
        self.error_details.as_deref().unwrap_or_default()
    }
    /// Error message
    pub fn error_message(&self) -> ::std::option::Option<&str> {
        self.error_message.as_deref()
    }
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub fn updated_at(&self) -> ::std::option::Option<&str> {
        self.updated_at.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetDeploymentStatusOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetDeploymentStatusOutput {
    /// Creates a new builder-style object to manufacture [`GetDeploymentStatusOutput`](crate::operation::get_deployment_status::GetDeploymentStatusOutput).
    pub fn builder() -> crate::operation::get_deployment_status::builders::GetDeploymentStatusOutputBuilder {
        crate::operation::get_deployment_status::builders::GetDeploymentStatusOutputBuilder::default()
    }
}

/// A builder for [`GetDeploymentStatusOutput`](crate::operation::get_deployment_status::GetDeploymentStatusOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDeploymentStatusOutputBuilder {
    pub(crate) deployment_status: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_type: ::std::option::Option<crate::types::DeploymentType>,
    pub(crate) error_details: ::std::option::Option<::std::vec::Vec<crate::types::ErrorDetail>>,
    pub(crate) error_message: ::std::option::Option<::std::string::String>,
    pub(crate) updated_at: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetDeploymentStatusOutputBuilder {
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    pub fn deployment_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_status = ::std::option::Option::Some(input.into());
        self
    }
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    pub fn set_deployment_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_status = input;
        self
    }
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    pub fn get_deployment_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_status
    }
    /// 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
    }
    /// Appends an item to `error_details`.
    ///
    /// To override the contents of this collection use [`set_error_details`](Self::set_error_details).
    ///
    /// Error details
    pub fn error_details(mut self, input: crate::types::ErrorDetail) -> Self {
        let mut v = self.error_details.unwrap_or_default();
        v.push(input);
        self.error_details = ::std::option::Option::Some(v);
        self
    }
    /// Error details
    pub fn set_error_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ErrorDetail>>) -> Self {
        self.error_details = input;
        self
    }
    /// Error details
    pub fn get_error_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ErrorDetail>> {
        &self.error_details
    }
    /// Error message
    pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.error_message = ::std::option::Option::Some(input.into());
        self
    }
    /// Error message
    pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.error_message = input;
        self
    }
    /// Error message
    pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.error_message
    }
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub fn updated_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.updated_at = ::std::option::Option::Some(input.into());
        self
    }
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub fn set_updated_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.updated_at = input;
        self
    }
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub fn get_updated_at(&self) -> &::std::option::Option<::std::string::String> {
        &self.updated_at
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetDeploymentStatusOutput`](crate::operation::get_deployment_status::GetDeploymentStatusOutput).
    pub fn build(self) -> crate::operation::get_deployment_status::GetDeploymentStatusOutput {
        crate::operation::get_deployment_status::GetDeploymentStatusOutput {
            deployment_status: self.deployment_status,
            deployment_type: self.deployment_type,
            error_details: self.error_details,
            error_message: self.error_message,
            updated_at: self.updated_at,
            _request_id: self._request_id,
        }
    }
}