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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// 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,
}
}
}