1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// 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>
#[doc(hidden)]
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>
#[doc(hidden)]
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_http::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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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>
pub fn limit(mut self, input: crate::types::AccountLimit) -> Self {
self.limit = 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 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(mut self, input: i64) -> Self {
self.count = 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
}
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,
}
}
}