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
222
223
224
225
226
// 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 CheckoutLicenseOutput {
    /// <p>Checkout type.</p>
    pub checkout_type: ::std::option::Option<crate::types::CheckoutType>,
    /// <p>License consumption token.</p>
    pub license_consumption_token: ::std::option::Option<::std::string::String>,
    /// <p>Allowed license entitlements.</p>
    pub entitlements_allowed: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
    /// <p>Signed token.</p>
    pub signed_token: ::std::option::Option<::std::string::String>,
    /// <p>Node ID.</p>
    pub node_id: ::std::option::Option<::std::string::String>,
    /// <p>Date and time at which the license checkout is issued.</p>
    pub issued_at: ::std::option::Option<::std::string::String>,
    /// <p>Date and time at which the license checkout expires.</p>
    pub expiration: ::std::option::Option<::std::string::String>,
    /// <p>Amazon Resource Name (ARN) of the checkout license.</p>
    pub license_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CheckoutLicenseOutput {
    /// <p>Checkout type.</p>
    pub fn checkout_type(&self) -> ::std::option::Option<&crate::types::CheckoutType> {
        self.checkout_type.as_ref()
    }
    /// <p>License consumption token.</p>
    pub fn license_consumption_token(&self) -> ::std::option::Option<&str> {
        self.license_consumption_token.as_deref()
    }
    /// <p>Allowed license entitlements.</p>
    pub fn entitlements_allowed(&self) -> ::std::option::Option<&[crate::types::EntitlementData]> {
        self.entitlements_allowed.as_deref()
    }
    /// <p>Signed token.</p>
    pub fn signed_token(&self) -> ::std::option::Option<&str> {
        self.signed_token.as_deref()
    }
    /// <p>Node ID.</p>
    pub fn node_id(&self) -> ::std::option::Option<&str> {
        self.node_id.as_deref()
    }
    /// <p>Date and time at which the license checkout is issued.</p>
    pub fn issued_at(&self) -> ::std::option::Option<&str> {
        self.issued_at.as_deref()
    }
    /// <p>Date and time at which the license checkout expires.</p>
    pub fn expiration(&self) -> ::std::option::Option<&str> {
        self.expiration.as_deref()
    }
    /// <p>Amazon Resource Name (ARN) of the checkout license.</p>
    pub fn license_arn(&self) -> ::std::option::Option<&str> {
        self.license_arn.as_deref()
    }
}
impl ::aws_http::request_id::RequestId for CheckoutLicenseOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CheckoutLicenseOutput {
    /// Creates a new builder-style object to manufacture [`CheckoutLicenseOutput`](crate::operation::checkout_license::CheckoutLicenseOutput).
    pub fn builder() -> crate::operation::checkout_license::builders::CheckoutLicenseOutputBuilder {
        crate::operation::checkout_license::builders::CheckoutLicenseOutputBuilder::default()
    }
}

/// A builder for [`CheckoutLicenseOutput`](crate::operation::checkout_license::CheckoutLicenseOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CheckoutLicenseOutputBuilder {
    pub(crate) checkout_type: ::std::option::Option<crate::types::CheckoutType>,
    pub(crate) license_consumption_token: ::std::option::Option<::std::string::String>,
    pub(crate) entitlements_allowed: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
    pub(crate) signed_token: ::std::option::Option<::std::string::String>,
    pub(crate) node_id: ::std::option::Option<::std::string::String>,
    pub(crate) issued_at: ::std::option::Option<::std::string::String>,
    pub(crate) expiration: ::std::option::Option<::std::string::String>,
    pub(crate) license_arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CheckoutLicenseOutputBuilder {
    /// <p>Checkout type.</p>
    pub fn checkout_type(mut self, input: crate::types::CheckoutType) -> Self {
        self.checkout_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Checkout type.</p>
    pub fn set_checkout_type(mut self, input: ::std::option::Option<crate::types::CheckoutType>) -> Self {
        self.checkout_type = input;
        self
    }
    /// <p>Checkout type.</p>
    pub fn get_checkout_type(&self) -> &::std::option::Option<crate::types::CheckoutType> {
        &self.checkout_type
    }
    /// <p>License consumption token.</p>
    pub fn license_consumption_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_consumption_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>License consumption token.</p>
    pub fn set_license_consumption_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_consumption_token = input;
        self
    }
    /// <p>License consumption token.</p>
    pub fn get_license_consumption_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_consumption_token
    }
    /// Appends an item to `entitlements_allowed`.
    ///
    /// To override the contents of this collection use [`set_entitlements_allowed`](Self::set_entitlements_allowed).
    ///
    /// <p>Allowed license entitlements.</p>
    pub fn entitlements_allowed(mut self, input: crate::types::EntitlementData) -> Self {
        let mut v = self.entitlements_allowed.unwrap_or_default();
        v.push(input);
        self.entitlements_allowed = ::std::option::Option::Some(v);
        self
    }
    /// <p>Allowed license entitlements.</p>
    pub fn set_entitlements_allowed(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>) -> Self {
        self.entitlements_allowed = input;
        self
    }
    /// <p>Allowed license entitlements.</p>
    pub fn get_entitlements_allowed(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>> {
        &self.entitlements_allowed
    }
    /// <p>Signed token.</p>
    pub fn signed_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.signed_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Signed token.</p>
    pub fn set_signed_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.signed_token = input;
        self
    }
    /// <p>Signed token.</p>
    pub fn get_signed_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.signed_token
    }
    /// <p>Node ID.</p>
    pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Node ID.</p>
    pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_id = input;
        self
    }
    /// <p>Node ID.</p>
    pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_id
    }
    /// <p>Date and time at which the license checkout is issued.</p>
    pub fn issued_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.issued_at = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Date and time at which the license checkout is issued.</p>
    pub fn set_issued_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.issued_at = input;
        self
    }
    /// <p>Date and time at which the license checkout is issued.</p>
    pub fn get_issued_at(&self) -> &::std::option::Option<::std::string::String> {
        &self.issued_at
    }
    /// <p>Date and time at which the license checkout expires.</p>
    pub fn expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.expiration = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Date and time at which the license checkout expires.</p>
    pub fn set_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.expiration = input;
        self
    }
    /// <p>Date and time at which the license checkout expires.</p>
    pub fn get_expiration(&self) -> &::std::option::Option<::std::string::String> {
        &self.expiration
    }
    /// <p>Amazon Resource Name (ARN) of the checkout license.</p>
    pub fn license_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Resource Name (ARN) of the checkout license.</p>
    pub fn set_license_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_arn = input;
        self
    }
    /// <p>Amazon Resource Name (ARN) of the checkout license.</p>
    pub fn get_license_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_arn
    }
    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 [`CheckoutLicenseOutput`](crate::operation::checkout_license::CheckoutLicenseOutput).
    pub fn build(self) -> crate::operation::checkout_license::CheckoutLicenseOutput {
        crate::operation::checkout_license::CheckoutLicenseOutput {
            checkout_type: self.checkout_type,
            license_consumption_token: self.license_consumption_token,
            entitlements_allowed: self.entitlements_allowed,
            signed_token: self.signed_token,
            node_id: self.node_id,
            issued_at: self.issued_at,
            expiration: self.expiration,
            license_arn: self.license_arn,
            _request_id: self._request_id,
        }
    }
}