aws-sdk-elbproxy 1.0.0

AWS SDK for Elastic Load Balancing for Envoy
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 GetProxyUpdateOutput {
    /// The Amazon Resource Name (ARN) of the proxy.
    pub proxy_arn: ::std::string::String,
    /// The ID of the update.
    pub update_id: ::std::string::String,
    /// The state of the update.
    pub state: ::std::option::Option<crate::types::ProxyUpdateState>,
    /// Details about the update.
    pub details: ::std::option::Option<crate::types::ProxyUpdateDetails>,
    /// The date and time that the update was submitted.
    pub submitted_at: ::aws_smithy_types::DateTime,
    /// The date and time that the update was first successfully applied to a proxy node. This value is absent until the update is valid.
    pub validated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// The date and time that the update's propagation status became `complete`, `failed`, or `cancelled`. This value is absent while the update is `in-progress` or `skipped`.
    pub completed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetProxyUpdateOutput {
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn proxy_arn(&self) -> &str {
        use std::ops::Deref;
        self.proxy_arn.deref()
    }
    /// The ID of the update.
    pub fn update_id(&self) -> &str {
        use std::ops::Deref;
        self.update_id.deref()
    }
    /// The state of the update.
    pub fn state(&self) -> ::std::option::Option<&crate::types::ProxyUpdateState> {
        self.state.as_ref()
    }
    /// Details about the update.
    pub fn details(&self) -> ::std::option::Option<&crate::types::ProxyUpdateDetails> {
        self.details.as_ref()
    }
    /// The date and time that the update was submitted.
    pub fn submitted_at(&self) -> &::aws_smithy_types::DateTime {
        &self.submitted_at
    }
    /// The date and time that the update was first successfully applied to a proxy node. This value is absent until the update is valid.
    pub fn validated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.validated_at.as_ref()
    }
    /// The date and time that the update's propagation status became `complete`, `failed`, or `cancelled`. This value is absent while the update is `in-progress` or `skipped`.
    pub fn completed_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completed_at.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetProxyUpdateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetProxyUpdateOutput {
    /// Creates a new builder-style object to manufacture [`GetProxyUpdateOutput`](crate::operation::get_proxy_update::GetProxyUpdateOutput).
    pub fn builder() -> crate::operation::get_proxy_update::builders::GetProxyUpdateOutputBuilder {
        crate::operation::get_proxy_update::builders::GetProxyUpdateOutputBuilder::default()
    }
}

/// A builder for [`GetProxyUpdateOutput`](crate::operation::get_proxy_update::GetProxyUpdateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetProxyUpdateOutputBuilder {
    pub(crate) proxy_arn: ::std::option::Option<::std::string::String>,
    pub(crate) update_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::ProxyUpdateState>,
    pub(crate) details: ::std::option::Option<crate::types::ProxyUpdateDetails>,
    pub(crate) submitted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) validated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) completed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetProxyUpdateOutputBuilder {
    /// The Amazon Resource Name (ARN) of the proxy.
    /// This field is required.
    pub fn proxy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn set_proxy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn get_proxy_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_arn
    }
    /// The ID of the update.
    /// This field is required.
    pub fn update_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.update_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the update.
    pub fn set_update_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.update_id = input;
        self
    }
    /// The ID of the update.
    pub fn get_update_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.update_id
    }
    /// The state of the update.
    /// This field is required.
    pub fn state(mut self, input: crate::types::ProxyUpdateState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// The state of the update.
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ProxyUpdateState>) -> Self {
        self.state = input;
        self
    }
    /// The state of the update.
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ProxyUpdateState> {
        &self.state
    }
    /// Details about the update.
    /// This field is required.
    pub fn details(mut self, input: crate::types::ProxyUpdateDetails) -> Self {
        self.details = ::std::option::Option::Some(input);
        self
    }
    /// Details about the update.
    pub fn set_details(mut self, input: ::std::option::Option<crate::types::ProxyUpdateDetails>) -> Self {
        self.details = input;
        self
    }
    /// Details about the update.
    pub fn get_details(&self) -> &::std::option::Option<crate::types::ProxyUpdateDetails> {
        &self.details
    }
    /// The date and time that the update was submitted.
    /// This field is required.
    pub fn submitted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.submitted_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the update was submitted.
    pub fn set_submitted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.submitted_at = input;
        self
    }
    /// The date and time that the update was submitted.
    pub fn get_submitted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.submitted_at
    }
    /// The date and time that the update was first successfully applied to a proxy node. This value is absent until the update is valid.
    pub fn validated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.validated_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the update was first successfully applied to a proxy node. This value is absent until the update is valid.
    pub fn set_validated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.validated_at = input;
        self
    }
    /// The date and time that the update was first successfully applied to a proxy node. This value is absent until the update is valid.
    pub fn get_validated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.validated_at
    }
    /// The date and time that the update's propagation status became `complete`, `failed`, or `cancelled`. This value is absent while the update is `in-progress` or `skipped`.
    pub fn completed_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completed_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the update's propagation status became `complete`, `failed`, or `cancelled`. This value is absent while the update is `in-progress` or `skipped`.
    pub fn set_completed_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completed_at = input;
        self
    }
    /// The date and time that the update's propagation status became `complete`, `failed`, or `cancelled`. This value is absent while the update is `in-progress` or `skipped`.
    pub fn get_completed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completed_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 [`GetProxyUpdateOutput`](crate::operation::get_proxy_update::GetProxyUpdateOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`proxy_arn`](crate::operation::get_proxy_update::builders::GetProxyUpdateOutputBuilder::proxy_arn)
    /// - [`update_id`](crate::operation::get_proxy_update::builders::GetProxyUpdateOutputBuilder::update_id)
    /// - [`submitted_at`](crate::operation::get_proxy_update::builders::GetProxyUpdateOutputBuilder::submitted_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_proxy_update::GetProxyUpdateOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_proxy_update::GetProxyUpdateOutput {
            proxy_arn: self.proxy_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "proxy_arn",
                    "proxy_arn was not specified but it is required when building GetProxyUpdateOutput",
                )
            })?,
            update_id: self.update_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "update_id",
                    "update_id was not specified but it is required when building GetProxyUpdateOutput",
                )
            })?,
            state: self.state,
            details: self.details,
            submitted_at: self.submitted_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "submitted_at",
                    "submitted_at was not specified but it is required when building GetProxyUpdateOutput",
                )
            })?,
            validated_at: self.validated_at,
            completed_at: self.completed_at,
            _request_id: self._request_id,
        })
    }
}