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 GetDeploymentStatusOutput {
    /// The status of the deployment: ''InProgress'', ''Building'', ''Success'', or ''Failure''.
    #[doc(hidden)]
    pub deployment_status: std::option::Option<std::string::String>,
    /// The type of the deployment.
    #[doc(hidden)]
    pub deployment_type: std::option::Option<crate::types::DeploymentType>,
    /// Error details
    #[doc(hidden)]
    pub error_details: std::option::Option<std::vec::Vec<crate::types::ErrorDetail>>,
    /// Error message
    #[doc(hidden)]
    pub error_message: std::option::Option<std::string::String>,
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    #[doc(hidden)]
    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
    pub fn error_details(&self) -> std::option::Option<&[crate::types::ErrorDetail]> {
        self.error_details.as_deref()
    }
    /// 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_http::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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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 Into<std::string::String>) -> Self {
        self.deployment_status = 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 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
    }
    /// 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 = 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 message
    pub fn error_message(mut self, input: impl Into<std::string::String>) -> Self {
        self.error_message = 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
    }
    /// The time, in milliseconds since the epoch, when the deployment status was updated.
    pub fn updated_at(mut self, input: impl Into<std::string::String>) -> Self {
        self.updated_at = 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
    }
    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,
        }
    }
}