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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>An invitation to an Amazon Web Services account to create a member and join the network.</p>
/// <p>Applies only to Hyperledger Fabric.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Invitation {
/// <p>The unique identifier for the invitation.</p>
pub invitation_id: ::std::option::Option<::std::string::String>,
/// <p>The date and time that the invitation was created.</p>
pub creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time that the invitation expires. This is the <code>CreationDate</code> plus the <code>ProposalDurationInHours</code> that is specified in the <code>ProposalThresholdPolicy</code>. After this date and time, the invitee can no longer create a member and join the network using this <code>InvitationId</code>.</p>
pub expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The status of the invitation:</p>
/// <ul>
/// <li>
/// <p><code>PENDING</code> - The invitee hasn't created a member to join the network, and the invitation hasn't yet expired.</p></li>
/// <li>
/// <p><code>ACCEPTING</code> - The invitee has begun creating a member, and creation hasn't yet completed.</p></li>
/// <li>
/// <p><code>ACCEPTED</code> - The invitee created a member and joined the network using the <code>InvitationID</code>.</p></li>
/// <li>
/// <p><code>REJECTED</code> - The invitee rejected the invitation.</p></li>
/// <li>
/// <p><code>EXPIRED</code> - The invitee neither created a member nor rejected the invitation before the <code>ExpirationDate</code>.</p></li>
/// </ul>
pub status: ::std::option::Option<crate::types::InvitationStatus>,
/// <p>A summary of network configuration properties.</p>
pub network_summary: ::std::option::Option<crate::types::NetworkSummary>,
/// <p>The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub arn: ::std::option::Option<::std::string::String>,
}
impl Invitation {
/// <p>The unique identifier for the invitation.</p>
pub fn invitation_id(&self) -> ::std::option::Option<&str> {
self.invitation_id.as_deref()
}
/// <p>The date and time that the invitation was created.</p>
pub fn creation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_date.as_ref()
}
/// <p>The date and time that the invitation expires. This is the <code>CreationDate</code> plus the <code>ProposalDurationInHours</code> that is specified in the <code>ProposalThresholdPolicy</code>. After this date and time, the invitee can no longer create a member and join the network using this <code>InvitationId</code>.</p>
pub fn expiration_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expiration_date.as_ref()
}
/// <p>The status of the invitation:</p>
/// <ul>
/// <li>
/// <p><code>PENDING</code> - The invitee hasn't created a member to join the network, and the invitation hasn't yet expired.</p></li>
/// <li>
/// <p><code>ACCEPTING</code> - The invitee has begun creating a member, and creation hasn't yet completed.</p></li>
/// <li>
/// <p><code>ACCEPTED</code> - The invitee created a member and joined the network using the <code>InvitationID</code>.</p></li>
/// <li>
/// <p><code>REJECTED</code> - The invitee rejected the invitation.</p></li>
/// <li>
/// <p><code>EXPIRED</code> - The invitee neither created a member nor rejected the invitation before the <code>ExpirationDate</code>.</p></li>
/// </ul>
pub fn status(&self) -> ::std::option::Option<&crate::types::InvitationStatus> {
self.status.as_ref()
}
/// <p>A summary of network configuration properties.</p>
pub fn network_summary(&self) -> ::std::option::Option<&crate::types::NetworkSummary> {
self.network_summary.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
}
impl Invitation {
/// Creates a new builder-style object to manufacture [`Invitation`](crate::types::Invitation).
pub fn builder() -> crate::types::builders::InvitationBuilder {
crate::types::builders::InvitationBuilder::default()
}
}
/// A builder for [`Invitation`](crate::types::Invitation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InvitationBuilder {
pub(crate) invitation_id: ::std::option::Option<::std::string::String>,
pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::InvitationStatus>,
pub(crate) network_summary: ::std::option::Option<crate::types::NetworkSummary>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
}
impl InvitationBuilder {
/// <p>The unique identifier for the invitation.</p>
pub fn invitation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.invitation_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier for the invitation.</p>
pub fn set_invitation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.invitation_id = input;
self
}
/// <p>The unique identifier for the invitation.</p>
pub fn get_invitation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.invitation_id
}
/// <p>The date and time that the invitation was created.</p>
pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time that the invitation was created.</p>
pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_date = input;
self
}
/// <p>The date and time that the invitation was created.</p>
pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_date
}
/// <p>The date and time that the invitation expires. This is the <code>CreationDate</code> plus the <code>ProposalDurationInHours</code> that is specified in the <code>ProposalThresholdPolicy</code>. After this date and time, the invitee can no longer create a member and join the network using this <code>InvitationId</code>.</p>
pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expiration_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time that the invitation expires. This is the <code>CreationDate</code> plus the <code>ProposalDurationInHours</code> that is specified in the <code>ProposalThresholdPolicy</code>. After this date and time, the invitee can no longer create a member and join the network using this <code>InvitationId</code>.</p>
pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expiration_date = input;
self
}
/// <p>The date and time that the invitation expires. This is the <code>CreationDate</code> plus the <code>ProposalDurationInHours</code> that is specified in the <code>ProposalThresholdPolicy</code>. After this date and time, the invitee can no longer create a member and join the network using this <code>InvitationId</code>.</p>
pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expiration_date
}
/// <p>The status of the invitation:</p>
/// <ul>
/// <li>
/// <p><code>PENDING</code> - The invitee hasn't created a member to join the network, and the invitation hasn't yet expired.</p></li>
/// <li>
/// <p><code>ACCEPTING</code> - The invitee has begun creating a member, and creation hasn't yet completed.</p></li>
/// <li>
/// <p><code>ACCEPTED</code> - The invitee created a member and joined the network using the <code>InvitationID</code>.</p></li>
/// <li>
/// <p><code>REJECTED</code> - The invitee rejected the invitation.</p></li>
/// <li>
/// <p><code>EXPIRED</code> - The invitee neither created a member nor rejected the invitation before the <code>ExpirationDate</code>.</p></li>
/// </ul>
pub fn status(mut self, input: crate::types::InvitationStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The status of the invitation:</p>
/// <ul>
/// <li>
/// <p><code>PENDING</code> - The invitee hasn't created a member to join the network, and the invitation hasn't yet expired.</p></li>
/// <li>
/// <p><code>ACCEPTING</code> - The invitee has begun creating a member, and creation hasn't yet completed.</p></li>
/// <li>
/// <p><code>ACCEPTED</code> - The invitee created a member and joined the network using the <code>InvitationID</code>.</p></li>
/// <li>
/// <p><code>REJECTED</code> - The invitee rejected the invitation.</p></li>
/// <li>
/// <p><code>EXPIRED</code> - The invitee neither created a member nor rejected the invitation before the <code>ExpirationDate</code>.</p></li>
/// </ul>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::InvitationStatus>) -> Self {
self.status = input;
self
}
/// <p>The status of the invitation:</p>
/// <ul>
/// <li>
/// <p><code>PENDING</code> - The invitee hasn't created a member to join the network, and the invitation hasn't yet expired.</p></li>
/// <li>
/// <p><code>ACCEPTING</code> - The invitee has begun creating a member, and creation hasn't yet completed.</p></li>
/// <li>
/// <p><code>ACCEPTED</code> - The invitee created a member and joined the network using the <code>InvitationID</code>.</p></li>
/// <li>
/// <p><code>REJECTED</code> - The invitee rejected the invitation.</p></li>
/// <li>
/// <p><code>EXPIRED</code> - The invitee neither created a member nor rejected the invitation before the <code>ExpirationDate</code>.</p></li>
/// </ul>
pub fn get_status(&self) -> &::std::option::Option<crate::types::InvitationStatus> {
&self.status
}
/// <p>A summary of network configuration properties.</p>
pub fn network_summary(mut self, input: crate::types::NetworkSummary) -> Self {
self.network_summary = ::std::option::Option::Some(input);
self
}
/// <p>A summary of network configuration properties.</p>
pub fn set_network_summary(mut self, input: ::std::option::Option<crate::types::NetworkSummary>) -> Self {
self.network_summary = input;
self
}
/// <p>A summary of network configuration properties.</p>
pub fn get_network_summary(&self) -> &::std::option::Option<crate::types::NetworkSummary> {
&self.network_summary
}
/// <p>The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the invitation. For more information about ARNs and their format, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i>.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// Consumes the builder and constructs a [`Invitation`](crate::types::Invitation).
pub fn build(self) -> crate::types::Invitation {
crate::types::Invitation {
invitation_id: self.invitation_id,
creation_date: self.creation_date,
expiration_date: self.expiration_date,
status: self.status,
network_summary: self.network_summary,
arn: self.arn,
}
}
}