-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_auth_token_response_model.go
325 lines (274 loc) · 9.63 KB
/
model_auth_token_response_model.go
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
/*
Citrix Virtual Apps and Desktops Rest API for Developer Portal
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: devportal-onprem-ga
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package citrixorchestration
import (
"encoding/json"
)
// checks if the AuthTokenResponseModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthTokenResponseModel{}
// AuthTokenResponseModel Authorization and authentication JSON Web Token model.
type AuthTokenResponseModel struct {
// The FMA token.
Token NullableString `json:"Token,omitempty"`
// The user principal.
Principal NullableString `json:"Principal,omitempty"`
// The user id.
UserId NullableString `json:"UserId,omitempty"`
// The customer id.
CustomerId NullableString `json:"CustomerId,omitempty"`
// The token will expire at the UTC time.
ExpiresAt NullableString `json:"ExpiresAt,omitempty"`
}
// NewAuthTokenResponseModel instantiates a new AuthTokenResponseModel object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAuthTokenResponseModel() *AuthTokenResponseModel {
this := AuthTokenResponseModel{}
return &this
}
// NewAuthTokenResponseModelWithDefaults instantiates a new AuthTokenResponseModel object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAuthTokenResponseModelWithDefaults() *AuthTokenResponseModel {
this := AuthTokenResponseModel{}
return &this
}
// GetToken returns the Token field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthTokenResponseModel) GetToken() string {
if o == nil || IsNil(o.Token.Get()) {
var ret string
return ret
}
return *o.Token.Get()
}
// GetTokenOk returns a tuple with the Token field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AuthTokenResponseModel) GetTokenOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Token.Get(), o.Token.IsSet()
}
// HasToken returns a boolean if a field has been set.
func (o *AuthTokenResponseModel) HasToken() bool {
if o != nil && o.Token.IsSet() {
return true
}
return false
}
// SetToken gets a reference to the given NullableString and assigns it to the Token field.
func (o *AuthTokenResponseModel) SetToken(v string) {
o.Token.Set(&v)
}
// SetTokenNil sets the value for Token to be an explicit nil
func (o *AuthTokenResponseModel) SetTokenNil() {
o.Token.Set(nil)
}
// UnsetToken ensures that no value is present for Token, not even an explicit nil
func (o *AuthTokenResponseModel) UnsetToken() {
o.Token.Unset()
}
// GetPrincipal returns the Principal field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthTokenResponseModel) GetPrincipal() string {
if o == nil || IsNil(o.Principal.Get()) {
var ret string
return ret
}
return *o.Principal.Get()
}
// GetPrincipalOk returns a tuple with the Principal field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AuthTokenResponseModel) GetPrincipalOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Principal.Get(), o.Principal.IsSet()
}
// HasPrincipal returns a boolean if a field has been set.
func (o *AuthTokenResponseModel) HasPrincipal() bool {
if o != nil && o.Principal.IsSet() {
return true
}
return false
}
// SetPrincipal gets a reference to the given NullableString and assigns it to the Principal field.
func (o *AuthTokenResponseModel) SetPrincipal(v string) {
o.Principal.Set(&v)
}
// SetPrincipalNil sets the value for Principal to be an explicit nil
func (o *AuthTokenResponseModel) SetPrincipalNil() {
o.Principal.Set(nil)
}
// UnsetPrincipal ensures that no value is present for Principal, not even an explicit nil
func (o *AuthTokenResponseModel) UnsetPrincipal() {
o.Principal.Unset()
}
// GetUserId returns the UserId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthTokenResponseModel) GetUserId() string {
if o == nil || IsNil(o.UserId.Get()) {
var ret string
return ret
}
return *o.UserId.Get()
}
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AuthTokenResponseModel) GetUserIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.UserId.Get(), o.UserId.IsSet()
}
// HasUserId returns a boolean if a field has been set.
func (o *AuthTokenResponseModel) HasUserId() bool {
if o != nil && o.UserId.IsSet() {
return true
}
return false
}
// SetUserId gets a reference to the given NullableString and assigns it to the UserId field.
func (o *AuthTokenResponseModel) SetUserId(v string) {
o.UserId.Set(&v)
}
// SetUserIdNil sets the value for UserId to be an explicit nil
func (o *AuthTokenResponseModel) SetUserIdNil() {
o.UserId.Set(nil)
}
// UnsetUserId ensures that no value is present for UserId, not even an explicit nil
func (o *AuthTokenResponseModel) UnsetUserId() {
o.UserId.Unset()
}
// GetCustomerId returns the CustomerId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthTokenResponseModel) GetCustomerId() string {
if o == nil || IsNil(o.CustomerId.Get()) {
var ret string
return ret
}
return *o.CustomerId.Get()
}
// GetCustomerIdOk returns a tuple with the CustomerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AuthTokenResponseModel) GetCustomerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CustomerId.Get(), o.CustomerId.IsSet()
}
// HasCustomerId returns a boolean if a field has been set.
func (o *AuthTokenResponseModel) HasCustomerId() bool {
if o != nil && o.CustomerId.IsSet() {
return true
}
return false
}
// SetCustomerId gets a reference to the given NullableString and assigns it to the CustomerId field.
func (o *AuthTokenResponseModel) SetCustomerId(v string) {
o.CustomerId.Set(&v)
}
// SetCustomerIdNil sets the value for CustomerId to be an explicit nil
func (o *AuthTokenResponseModel) SetCustomerIdNil() {
o.CustomerId.Set(nil)
}
// UnsetCustomerId ensures that no value is present for CustomerId, not even an explicit nil
func (o *AuthTokenResponseModel) UnsetCustomerId() {
o.CustomerId.Unset()
}
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AuthTokenResponseModel) GetExpiresAt() string {
if o == nil || IsNil(o.ExpiresAt.Get()) {
var ret string
return ret
}
return *o.ExpiresAt.Get()
}
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AuthTokenResponseModel) GetExpiresAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ExpiresAt.Get(), o.ExpiresAt.IsSet()
}
// HasExpiresAt returns a boolean if a field has been set.
func (o *AuthTokenResponseModel) HasExpiresAt() bool {
if o != nil && o.ExpiresAt.IsSet() {
return true
}
return false
}
// SetExpiresAt gets a reference to the given NullableString and assigns it to the ExpiresAt field.
func (o *AuthTokenResponseModel) SetExpiresAt(v string) {
o.ExpiresAt.Set(&v)
}
// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil
func (o *AuthTokenResponseModel) SetExpiresAtNil() {
o.ExpiresAt.Set(nil)
}
// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil
func (o *AuthTokenResponseModel) UnsetExpiresAt() {
o.ExpiresAt.Unset()
}
func (o AuthTokenResponseModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthTokenResponseModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Token.IsSet() {
toSerialize["Token"] = o.Token.Get()
}
if o.Principal.IsSet() {
toSerialize["Principal"] = o.Principal.Get()
}
if o.UserId.IsSet() {
toSerialize["UserId"] = o.UserId.Get()
}
if o.CustomerId.IsSet() {
toSerialize["CustomerId"] = o.CustomerId.Get()
}
if o.ExpiresAt.IsSet() {
toSerialize["ExpiresAt"] = o.ExpiresAt.Get()
}
return toSerialize, nil
}
type NullableAuthTokenResponseModel struct {
value *AuthTokenResponseModel
isSet bool
}
func (v NullableAuthTokenResponseModel) Get() *AuthTokenResponseModel {
return v.value
}
func (v *NullableAuthTokenResponseModel) Set(val *AuthTokenResponseModel) {
v.value = val
v.isSet = true
}
func (v NullableAuthTokenResponseModel) IsSet() bool {
return v.isSet
}
func (v *NullableAuthTokenResponseModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAuthTokenResponseModel(val *AuthTokenResponseModel) *NullableAuthTokenResponseModel {
return &NullableAuthTokenResponseModel{value: val, isSet: true}
}
func (v NullableAuthTokenResponseModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAuthTokenResponseModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}