aws-sdk-computeoptimizer 1.102.0

AWS SDK for AWS Compute Optimizer
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 GetEnrollmentStatusOutput {
    /// <p>The enrollment status of the account.</p>
    pub status: ::std::option::Option<crate::types::Status>,
    /// <p>The reason for the enrollment status of the account.</p>
    /// <p>For example, an account might show a status of <code>Pending</code> because member accounts of an organization require more time to be enrolled in the service.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// <p>Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.</p>
    pub member_accounts_enrolled: bool,
    /// <p>The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.</p>
    pub last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The count of organization member accounts that are opted in to the service, if your account is an organization management account.</p>
    pub number_of_member_accounts_opted_in: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetEnrollmentStatusOutput {
    /// <p>The enrollment status of the account.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
        self.status.as_ref()
    }
    /// <p>The reason for the enrollment status of the account.</p>
    /// <p>For example, an account might show a status of <code>Pending</code> because member accounts of an organization require more time to be enrolled in the service.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.</p>
    pub fn member_accounts_enrolled(&self) -> bool {
        self.member_accounts_enrolled
    }
    /// <p>The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.</p>
    pub fn last_updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_timestamp.as_ref()
    }
    /// <p>The count of organization member accounts that are opted in to the service, if your account is an organization management account.</p>
    pub fn number_of_member_accounts_opted_in(&self) -> ::std::option::Option<i32> {
        self.number_of_member_accounts_opted_in
    }
}
impl ::aws_types::request_id::RequestId for GetEnrollmentStatusOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetEnrollmentStatusOutput {
    /// Creates a new builder-style object to manufacture [`GetEnrollmentStatusOutput`](crate::operation::get_enrollment_status::GetEnrollmentStatusOutput).
    pub fn builder() -> crate::operation::get_enrollment_status::builders::GetEnrollmentStatusOutputBuilder {
        crate::operation::get_enrollment_status::builders::GetEnrollmentStatusOutputBuilder::default()
    }
}

/// A builder for [`GetEnrollmentStatusOutput`](crate::operation::get_enrollment_status::GetEnrollmentStatusOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetEnrollmentStatusOutputBuilder {
    pub(crate) status: ::std::option::Option<crate::types::Status>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) member_accounts_enrolled: ::std::option::Option<bool>,
    pub(crate) last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) number_of_member_accounts_opted_in: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetEnrollmentStatusOutputBuilder {
    /// <p>The enrollment status of the account.</p>
    pub fn status(mut self, input: crate::types::Status) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The enrollment status of the account.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
        self.status = input;
        self
    }
    /// <p>The enrollment status of the account.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
        &self.status
    }
    /// <p>The reason for the enrollment status of the account.</p>
    /// <p>For example, an account might show a status of <code>Pending</code> because member accounts of an organization require more time to be enrolled in the service.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the enrollment status of the account.</p>
    /// <p>For example, an account might show a status of <code>Pending</code> because member accounts of an organization require more time to be enrolled in the service.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>The reason for the enrollment status of the account.</p>
    /// <p>For example, an account might show a status of <code>Pending</code> because member accounts of an organization require more time to be enrolled in the service.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// <p>Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.</p>
    pub fn member_accounts_enrolled(mut self, input: bool) -> Self {
        self.member_accounts_enrolled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.</p>
    pub fn set_member_accounts_enrolled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.member_accounts_enrolled = input;
        self
    }
    /// <p>Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.</p>
    pub fn get_member_accounts_enrolled(&self) -> &::std::option::Option<bool> {
        &self.member_accounts_enrolled
    }
    /// <p>The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.</p>
    pub fn last_updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.</p>
    pub fn set_last_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_timestamp = input;
        self
    }
    /// <p>The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.</p>
    pub fn get_last_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_timestamp
    }
    /// <p>The count of organization member accounts that are opted in to the service, if your account is an organization management account.</p>
    pub fn number_of_member_accounts_opted_in(mut self, input: i32) -> Self {
        self.number_of_member_accounts_opted_in = ::std::option::Option::Some(input);
        self
    }
    /// <p>The count of organization member accounts that are opted in to the service, if your account is an organization management account.</p>
    pub fn set_number_of_member_accounts_opted_in(mut self, input: ::std::option::Option<i32>) -> Self {
        self.number_of_member_accounts_opted_in = input;
        self
    }
    /// <p>The count of organization member accounts that are opted in to the service, if your account is an organization management account.</p>
    pub fn get_number_of_member_accounts_opted_in(&self) -> &::std::option::Option<i32> {
        &self.number_of_member_accounts_opted_in
    }
    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 [`GetEnrollmentStatusOutput`](crate::operation::get_enrollment_status::GetEnrollmentStatusOutput).
    pub fn build(self) -> crate::operation::get_enrollment_status::GetEnrollmentStatusOutput {
        crate::operation::get_enrollment_status::GetEnrollmentStatusOutput {
            status: self.status,
            status_reason: self.status_reason,
            member_accounts_enrolled: self.member_accounts_enrolled.unwrap_or_default(),
            last_updated_timestamp: self.last_updated_timestamp,
            number_of_member_accounts_opted_in: self.number_of_member_accounts_opted_in,
            _request_id: self._request_id,
        }
    }
}