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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents an AWS account that is associated with API Gateway.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAccountOutput {
    /// <p>The ARN of an Amazon CloudWatch role for the current Account.</p>
    pub cloudwatch_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the API request limits configured for the current Account.</p>
    pub throttle_settings: ::std::option::Option<crate::types::ThrottleSettings>,
    /// <p>A list of features supported for the account. When usage plans are enabled, the features list will include an entry of <code>"UsagePlans"</code>.</p>
    pub features: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The version of the API keys used for the account.</p>
    pub api_key_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAccountOutput {
    /// <p>The ARN of an Amazon CloudWatch role for the current Account.</p>
    pub fn cloudwatch_role_arn(&self) -> ::std::option::Option<&str> {
        self.cloudwatch_role_arn.as_deref()
    }
    /// <p>Specifies the API request limits configured for the current Account.</p>
    pub fn throttle_settings(&self) -> ::std::option::Option<&crate::types::ThrottleSettings> {
        self.throttle_settings.as_ref()
    }
    /// <p>A list of features supported for the account. When usage plans are enabled, the features list will include an entry of <code>"UsagePlans"</code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.features.is_none()`.
    pub fn features(&self) -> &[::std::string::String] {
        self.features.as_deref().unwrap_or_default()
    }
    /// <p>The version of the API keys used for the account.</p>
    pub fn api_key_version(&self) -> ::std::option::Option<&str> {
        self.api_key_version.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetAccountOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAccountOutput {
    /// Creates a new builder-style object to manufacture [`GetAccountOutput`](crate::operation::get_account::GetAccountOutput).
    pub fn builder() -> crate::operation::get_account::builders::GetAccountOutputBuilder {
        crate::operation::get_account::builders::GetAccountOutputBuilder::default()
    }
}

/// A builder for [`GetAccountOutput`](crate::operation::get_account::GetAccountOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetAccountOutputBuilder {
    pub(crate) cloudwatch_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) throttle_settings: ::std::option::Option<crate::types::ThrottleSettings>,
    pub(crate) features: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) api_key_version: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetAccountOutputBuilder {
    /// <p>The ARN of an Amazon CloudWatch role for the current Account.</p>
    pub fn cloudwatch_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cloudwatch_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of an Amazon CloudWatch role for the current Account.</p>
    pub fn set_cloudwatch_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cloudwatch_role_arn = input;
        self
    }
    /// <p>The ARN of an Amazon CloudWatch role for the current Account.</p>
    pub fn get_cloudwatch_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cloudwatch_role_arn
    }
    /// <p>Specifies the API request limits configured for the current Account.</p>
    pub fn throttle_settings(mut self, input: crate::types::ThrottleSettings) -> Self {
        self.throttle_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the API request limits configured for the current Account.</p>
    pub fn set_throttle_settings(mut self, input: ::std::option::Option<crate::types::ThrottleSettings>) -> Self {
        self.throttle_settings = input;
        self
    }
    /// <p>Specifies the API request limits configured for the current Account.</p>
    pub fn get_throttle_settings(&self) -> &::std::option::Option<crate::types::ThrottleSettings> {
        &self.throttle_settings
    }
    /// Appends an item to `features`.
    ///
    /// To override the contents of this collection use [`set_features`](Self::set_features).
    ///
    /// <p>A list of features supported for the account. When usage plans are enabled, the features list will include an entry of <code>"UsagePlans"</code>.</p>
    pub fn features(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.features.unwrap_or_default();
        v.push(input.into());
        self.features = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of features supported for the account. When usage plans are enabled, the features list will include an entry of <code>"UsagePlans"</code>.</p>
    pub fn set_features(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.features = input;
        self
    }
    /// <p>A list of features supported for the account. When usage plans are enabled, the features list will include an entry of <code>"UsagePlans"</code>.</p>
    pub fn get_features(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.features
    }
    /// <p>The version of the API keys used for the account.</p>
    pub fn api_key_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_key_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the API keys used for the account.</p>
    pub fn set_api_key_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_key_version = input;
        self
    }
    /// <p>The version of the API keys used for the account.</p>
    pub fn get_api_key_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_key_version
    }
    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 [`GetAccountOutput`](crate::operation::get_account::GetAccountOutput).
    pub fn build(self) -> crate::operation::get_account::GetAccountOutput {
        crate::operation::get_account::GetAccountOutput {
            cloudwatch_role_arn: self.cloudwatch_role_arn,
            throttle_settings: self.throttle_settings,
            features: self.features,
            api_key_version: self.api_key_version,
            _request_id: self._request_id,
        }
    }
}