aws-sdk-lightsail 1.107.0

AWS SDK for Amazon Lightsail
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 ResetDistributionCacheOutput {
    /// <p>The status of the reset cache request.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp of the reset cache request (<code>1479734909.17</code>) in Unix time format.</p>
    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
    pub operation: ::std::option::Option<crate::types::Operation>,
    _request_id: Option<String>,
}
impl ResetDistributionCacheOutput {
    /// <p>The status of the reset cache request.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The timestamp of the reset cache request (<code>1479734909.17</code>) in Unix time format.</p>
    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
    pub fn operation(&self) -> ::std::option::Option<&crate::types::Operation> {
        self.operation.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for ResetDistributionCacheOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ResetDistributionCacheOutput {
    /// Creates a new builder-style object to manufacture [`ResetDistributionCacheOutput`](crate::operation::reset_distribution_cache::ResetDistributionCacheOutput).
    pub fn builder() -> crate::operation::reset_distribution_cache::builders::ResetDistributionCacheOutputBuilder {
        crate::operation::reset_distribution_cache::builders::ResetDistributionCacheOutputBuilder::default()
    }
}

/// A builder for [`ResetDistributionCacheOutput`](crate::operation::reset_distribution_cache::ResetDistributionCacheOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResetDistributionCacheOutputBuilder {
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) operation: ::std::option::Option<crate::types::Operation>,
    _request_id: Option<String>,
}
impl ResetDistributionCacheOutputBuilder {
    /// <p>The status of the reset cache request.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the reset cache request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the reset cache request.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The timestamp of the reset cache request (<code>1479734909.17</code>) in Unix time format.</p>
    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.create_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of the reset cache request (<code>1479734909.17</code>) in Unix time format.</p>
    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.create_time = input;
        self
    }
    /// <p>The timestamp of the reset cache request (<code>1479734909.17</code>) in Unix time format.</p>
    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.create_time
    }
    /// <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
    pub fn operation(mut self, input: crate::types::Operation) -> Self {
        self.operation = ::std::option::Option::Some(input);
        self
    }
    /// <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
    pub fn set_operation(mut self, input: ::std::option::Option<crate::types::Operation>) -> Self {
        self.operation = input;
        self
    }
    /// <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
    pub fn get_operation(&self) -> &::std::option::Option<crate::types::Operation> {
        &self.operation
    }
    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 [`ResetDistributionCacheOutput`](crate::operation::reset_distribution_cache::ResetDistributionCacheOutput).
    pub fn build(self) -> crate::operation::reset_distribution_cache::ResetDistributionCacheOutput {
        crate::operation::reset_distribution_cache::ResetDistributionCacheOutput {
            status: self.status,
            create_time: self.create_time,
            operation: self.operation,
            _request_id: self._request_id,
        }
    }
}