-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_me_response_model.go
314 lines (262 loc) · 8.96 KB
/
model_me_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
/*
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 MeResponseModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MeResponseModel{}
// MeResponseModel Details about the currently logged-in administrator.
type MeResponseModel struct {
// Id of the logged-in user. Internally: this is the *sub* from the bearer token. NOT the user_id.
UserId string `json:"UserId"`
// Display name of the user. Internally: the *displayname* from the bearer token.
DisplayName string `json:"DisplayName"`
// Time when the login token expires. RFC 3339 compatible format. Internally: the *exp* from the bearer token, converted to RFC 3339.
ExpiryTime string `json:"ExpiryTime"`
// Time after which the login token can no longer be refreshed. RFC 3339 compatible format. Internally: the *refresh_expiration* from the bearer token, converted to RFC 3339.
RefreshExpirationTime string `json:"RefreshExpirationTime"`
// Verified email of the user.
VerifiedEmail NullableString `json:"VerifiedEmail,omitempty"`
// True if the current customer is a csp customer(partner/tenant)
IsCspCustomer *bool `json:"IsCspCustomer,omitempty"`
// List of customers and sites accessible by the user.
Customers []MyCustomerResponseModel `json:"Customers"`
}
// NewMeResponseModel instantiates a new MeResponseModel 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 NewMeResponseModel(userId string, displayName string, expiryTime string, refreshExpirationTime string, customers []MyCustomerResponseModel) *MeResponseModel {
this := MeResponseModel{}
this.UserId = userId
this.DisplayName = displayName
this.ExpiryTime = expiryTime
this.RefreshExpirationTime = refreshExpirationTime
this.Customers = customers
return &this
}
// NewMeResponseModelWithDefaults instantiates a new MeResponseModel 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 NewMeResponseModelWithDefaults() *MeResponseModel {
this := MeResponseModel{}
return &this
}
// GetUserId returns the UserId field value
func (o *MeResponseModel) GetUserId() string {
if o == nil {
var ret string
return ret
}
return o.UserId
}
// GetUserIdOk returns a tuple with the UserId field value
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetUserIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UserId, true
}
// SetUserId sets field value
func (o *MeResponseModel) SetUserId(v string) {
o.UserId = v
}
// GetDisplayName returns the DisplayName field value
func (o *MeResponseModel) GetDisplayName() string {
if o == nil {
var ret string
return ret
}
return o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetDisplayNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DisplayName, true
}
// SetDisplayName sets field value
func (o *MeResponseModel) SetDisplayName(v string) {
o.DisplayName = v
}
// GetExpiryTime returns the ExpiryTime field value
func (o *MeResponseModel) GetExpiryTime() string {
if o == nil {
var ret string
return ret
}
return o.ExpiryTime
}
// GetExpiryTimeOk returns a tuple with the ExpiryTime field value
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetExpiryTimeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExpiryTime, true
}
// SetExpiryTime sets field value
func (o *MeResponseModel) SetExpiryTime(v string) {
o.ExpiryTime = v
}
// GetRefreshExpirationTime returns the RefreshExpirationTime field value
func (o *MeResponseModel) GetRefreshExpirationTime() string {
if o == nil {
var ret string
return ret
}
return o.RefreshExpirationTime
}
// GetRefreshExpirationTimeOk returns a tuple with the RefreshExpirationTime field value
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetRefreshExpirationTimeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RefreshExpirationTime, true
}
// SetRefreshExpirationTime sets field value
func (o *MeResponseModel) SetRefreshExpirationTime(v string) {
o.RefreshExpirationTime = v
}
// GetVerifiedEmail returns the VerifiedEmail field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MeResponseModel) GetVerifiedEmail() string {
if o == nil || IsNil(o.VerifiedEmail.Get()) {
var ret string
return ret
}
return *o.VerifiedEmail.Get()
}
// GetVerifiedEmailOk returns a tuple with the VerifiedEmail 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 *MeResponseModel) GetVerifiedEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.VerifiedEmail.Get(), o.VerifiedEmail.IsSet()
}
// HasVerifiedEmail returns a boolean if a field has been set.
func (o *MeResponseModel) HasVerifiedEmail() bool {
if o != nil && o.VerifiedEmail.IsSet() {
return true
}
return false
}
// SetVerifiedEmail gets a reference to the given NullableString and assigns it to the VerifiedEmail field.
func (o *MeResponseModel) SetVerifiedEmail(v string) {
o.VerifiedEmail.Set(&v)
}
// SetVerifiedEmailNil sets the value for VerifiedEmail to be an explicit nil
func (o *MeResponseModel) SetVerifiedEmailNil() {
o.VerifiedEmail.Set(nil)
}
// UnsetVerifiedEmail ensures that no value is present for VerifiedEmail, not even an explicit nil
func (o *MeResponseModel) UnsetVerifiedEmail() {
o.VerifiedEmail.Unset()
}
// GetIsCspCustomer returns the IsCspCustomer field value if set, zero value otherwise.
func (o *MeResponseModel) GetIsCspCustomer() bool {
if o == nil || IsNil(o.IsCspCustomer) {
var ret bool
return ret
}
return *o.IsCspCustomer
}
// GetIsCspCustomerOk returns a tuple with the IsCspCustomer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetIsCspCustomerOk() (*bool, bool) {
if o == nil || IsNil(o.IsCspCustomer) {
return nil, false
}
return o.IsCspCustomer, true
}
// HasIsCspCustomer returns a boolean if a field has been set.
func (o *MeResponseModel) HasIsCspCustomer() bool {
if o != nil && !IsNil(o.IsCspCustomer) {
return true
}
return false
}
// SetIsCspCustomer gets a reference to the given bool and assigns it to the IsCspCustomer field.
func (o *MeResponseModel) SetIsCspCustomer(v bool) {
o.IsCspCustomer = &v
}
// GetCustomers returns the Customers field value
func (o *MeResponseModel) GetCustomers() []MyCustomerResponseModel {
if o == nil {
var ret []MyCustomerResponseModel
return ret
}
return o.Customers
}
// GetCustomersOk returns a tuple with the Customers field value
// and a boolean to check if the value has been set.
func (o *MeResponseModel) GetCustomersOk() ([]MyCustomerResponseModel, bool) {
if o == nil {
return nil, false
}
return o.Customers, true
}
// SetCustomers sets field value
func (o *MeResponseModel) SetCustomers(v []MyCustomerResponseModel) {
o.Customers = v
}
func (o MeResponseModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MeResponseModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["UserId"] = o.UserId
toSerialize["DisplayName"] = o.DisplayName
toSerialize["ExpiryTime"] = o.ExpiryTime
toSerialize["RefreshExpirationTime"] = o.RefreshExpirationTime
if o.VerifiedEmail.IsSet() {
toSerialize["VerifiedEmail"] = o.VerifiedEmail.Get()
}
if !IsNil(o.IsCspCustomer) {
toSerialize["IsCspCustomer"] = o.IsCspCustomer
}
toSerialize["Customers"] = o.Customers
return toSerialize, nil
}
type NullableMeResponseModel struct {
value *MeResponseModel
isSet bool
}
func (v NullableMeResponseModel) Get() *MeResponseModel {
return v.value
}
func (v *NullableMeResponseModel) Set(val *MeResponseModel) {
v.value = val
v.isSet = true
}
func (v NullableMeResponseModel) IsSet() bool {
return v.isSet
}
func (v *NullableMeResponseModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMeResponseModel(val *MeResponseModel) *NullableMeResponseModel {
return &NullableMeResponseModel{value: val, isSet: true}
}
func (v NullableMeResponseModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMeResponseModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}