aws-sdk-route53 1.36.0

AWS SDK for Amazon Route 53
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A complex type that contains the requested limit.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAccountLimitOutput {
    /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of health checks that you can create using the current account.</p>
    pub limit: ::std::option::Option<crate::types::AccountLimit>,
    /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of health checks that you have created using the current account.</p>
    pub count: i64,
    _request_id: Option<String>,
}
impl GetAccountLimitOutput {
    /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of health checks that you can create using the current account.</p>
    pub fn limit(&self) -> ::std::option::Option<&crate::types::AccountLimit> {
        self.limit.as_ref()
    }
    /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of health checks that you have created using the current account.</p>
    pub fn count(&self) -> i64 {
        self.count
    }
}
impl ::aws_types::request_id::RequestId for GetAccountLimitOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAccountLimitOutput {
    /// Creates a new builder-style object to manufacture [`GetAccountLimitOutput`](crate::operation::get_account_limit::GetAccountLimitOutput).
    pub fn builder() -> crate::operation::get_account_limit::builders::GetAccountLimitOutputBuilder {
        crate::operation::get_account_limit::builders::GetAccountLimitOutputBuilder::default()
    }
}

/// A builder for [`GetAccountLimitOutput`](crate::operation::get_account_limit::GetAccountLimitOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccountLimitOutputBuilder {
    pub(crate) limit: ::std::option::Option<crate::types::AccountLimit>,
    pub(crate) count: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl GetAccountLimitOutputBuilder {
    /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of health checks that you can create using the current account.</p>
    /// This field is required.
    pub fn limit(mut self, input: crate::types::AccountLimit) -> Self {
        self.limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of health checks that you can create using the current account.</p>
    pub fn set_limit(mut self, input: ::std::option::Option<crate::types::AccountLimit>) -> Self {
        self.limit = input;
        self
    }
    /// <p>The current setting for the specified limit. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Limit</code> is the maximum number of health checks that you can create using the current account.</p>
    pub fn get_limit(&self) -> &::std::option::Option<crate::types::AccountLimit> {
        &self.limit
    }
    /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of health checks that you have created using the current account.</p>
    /// This field is required.
    pub fn count(mut self, input: i64) -> Self {
        self.count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of health checks that you have created using the current account.</p>
    pub fn set_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.count = input;
        self
    }
    /// <p>The current number of entities that you have created of the specified type. For example, if you specified <code>MAX_HEALTH_CHECKS_BY_OWNER</code> for the value of <code>Type</code> in the request, the value of <code>Count</code> is the current number of health checks that you have created using the current account.</p>
    pub fn get_count(&self) -> &::std::option::Option<i64> {
        &self.count
    }
    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 [`GetAccountLimitOutput`](crate::operation::get_account_limit::GetAccountLimitOutput).
    pub fn build(self) -> crate::operation::get_account_limit::GetAccountLimitOutput {
        crate::operation::get_account_limit::GetAccountLimitOutput {
            limit: self.limit,
            count: self.count.unwrap_or_default(),
            _request_id: self._request_id,
        }
    }
}