-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodel_get_o_auth_client_response.go
834 lines (707 loc) · 24.2 KB
/
model_get_o_auth_client_response.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
/*
Identity Security Cloud Beta API
Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
API version: 3.1.0-beta
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api_beta
import (
"encoding/json"
"fmt"
)
// checks if the GetOAuthClientResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetOAuthClientResponse{}
// GetOAuthClientResponse struct for GetOAuthClientResponse
type GetOAuthClientResponse struct {
// ID of the OAuth client
Id string `json:"id"`
// The name of the business the API Client should belong to
BusinessName NullableString `json:"businessName"`
// The homepage URL associated with the owner of the API Client
HomepageUrl NullableString `json:"homepageUrl"`
// A human-readable name for the API Client
Name string `json:"name"`
// A description of the API Client
Description NullableString `json:"description"`
// The number of seconds an access token generated for this API Client is valid for
AccessTokenValiditySeconds int32 `json:"accessTokenValiditySeconds"`
// The number of seconds a refresh token generated for this API Client is valid for
RefreshTokenValiditySeconds int32 `json:"refreshTokenValiditySeconds"`
// A list of the approved redirect URIs used with the authorization_code flow
RedirectUris []string `json:"redirectUris"`
// A list of OAuth 2.0 grant types this API Client can be used with
GrantTypes []GrantType `json:"grantTypes"`
AccessType AccessType `json:"accessType"`
Type ClientType `json:"type"`
// An indicator of whether the API Client can be used for requests internal to IDN
Internal bool `json:"internal"`
// An indicator of whether the API Client is enabled for use
Enabled bool `json:"enabled"`
// An indicator of whether the API Client supports strong authentication
StrongAuthSupported bool `json:"strongAuthSupported"`
// An indicator of whether the API Client supports the serialization of SAML claims when used with the authorization_code flow
ClaimsSupported bool `json:"claimsSupported"`
// The date and time, down to the millisecond, when the API Client was created
Created SailPointTime `json:"created"`
// The date and time, down to the millisecond, when the API Client was last updated
Modified SailPointTime `json:"modified"`
Secret NullableString `json:"secret,omitempty"`
Metadata NullableString `json:"metadata,omitempty"`
// The date and time, down to the millisecond, when this API Client was last used to generate an access token. This timestamp does not get updated on every API Client usage, but only once a day. This property can be useful for identifying which API Clients are no longer actively used and can be removed.
LastUsed NullableTime `json:"lastUsed,omitempty"`
// Scopes of the API Client.
Scope []string `json:"scope"`
AdditionalProperties map[string]interface{}
}
type _GetOAuthClientResponse GetOAuthClientResponse
// NewGetOAuthClientResponse instantiates a new GetOAuthClientResponse 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 NewGetOAuthClientResponse(id string, businessName NullableString, homepageUrl NullableString, name string, description NullableString, accessTokenValiditySeconds int32, refreshTokenValiditySeconds int32, redirectUris []string, grantTypes []GrantType, accessType AccessType, type_ ClientType, internal bool, enabled bool, strongAuthSupported bool, claimsSupported bool, created SailPointTime, modified SailPointTime, scope []string) *GetOAuthClientResponse {
this := GetOAuthClientResponse{}
this.Id = id
this.BusinessName = businessName
this.HomepageUrl = homepageUrl
this.Name = name
this.Description = description
this.AccessTokenValiditySeconds = accessTokenValiditySeconds
this.RefreshTokenValiditySeconds = refreshTokenValiditySeconds
this.RedirectUris = redirectUris
this.GrantTypes = grantTypes
this.AccessType = accessType
this.Type = type_
this.Internal = internal
this.Enabled = enabled
this.StrongAuthSupported = strongAuthSupported
this.ClaimsSupported = claimsSupported
this.Created = created
this.Modified = modified
this.Scope = scope
return &this
}
// NewGetOAuthClientResponseWithDefaults instantiates a new GetOAuthClientResponse 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 NewGetOAuthClientResponseWithDefaults() *GetOAuthClientResponse {
this := GetOAuthClientResponse{}
return &this
}
// GetId returns the Id field value
func (o *GetOAuthClientResponse) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *GetOAuthClientResponse) SetId(v string) {
o.Id = v
}
// GetBusinessName returns the BusinessName field value
// If the value is explicit nil, the zero value for string will be returned
func (o *GetOAuthClientResponse) GetBusinessName() string {
if o == nil || o.BusinessName.Get() == nil {
var ret string
return ret
}
return *o.BusinessName.Get()
}
// GetBusinessNameOk returns a tuple with the BusinessName field value
// 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 *GetOAuthClientResponse) GetBusinessNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.BusinessName.Get(), o.BusinessName.IsSet()
}
// SetBusinessName sets field value
func (o *GetOAuthClientResponse) SetBusinessName(v string) {
o.BusinessName.Set(&v)
}
// GetHomepageUrl returns the HomepageUrl field value
// If the value is explicit nil, the zero value for string will be returned
func (o *GetOAuthClientResponse) GetHomepageUrl() string {
if o == nil || o.HomepageUrl.Get() == nil {
var ret string
return ret
}
return *o.HomepageUrl.Get()
}
// GetHomepageUrlOk returns a tuple with the HomepageUrl field value
// 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 *GetOAuthClientResponse) GetHomepageUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.HomepageUrl.Get(), o.HomepageUrl.IsSet()
}
// SetHomepageUrl sets field value
func (o *GetOAuthClientResponse) SetHomepageUrl(v string) {
o.HomepageUrl.Set(&v)
}
// GetName returns the Name field value
func (o *GetOAuthClientResponse) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *GetOAuthClientResponse) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value
// If the value is explicit nil, the zero value for string will be returned
func (o *GetOAuthClientResponse) GetDescription() string {
if o == nil || o.Description.Get() == nil {
var ret string
return ret
}
return *o.Description.Get()
}
// GetDescriptionOk returns a tuple with the Description field value
// 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 *GetOAuthClientResponse) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Description.Get(), o.Description.IsSet()
}
// SetDescription sets field value
func (o *GetOAuthClientResponse) SetDescription(v string) {
o.Description.Set(&v)
}
// GetAccessTokenValiditySeconds returns the AccessTokenValiditySeconds field value
func (o *GetOAuthClientResponse) GetAccessTokenValiditySeconds() int32 {
if o == nil {
var ret int32
return ret
}
return o.AccessTokenValiditySeconds
}
// GetAccessTokenValiditySecondsOk returns a tuple with the AccessTokenValiditySeconds field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetAccessTokenValiditySecondsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.AccessTokenValiditySeconds, true
}
// SetAccessTokenValiditySeconds sets field value
func (o *GetOAuthClientResponse) SetAccessTokenValiditySeconds(v int32) {
o.AccessTokenValiditySeconds = v
}
// GetRefreshTokenValiditySeconds returns the RefreshTokenValiditySeconds field value
func (o *GetOAuthClientResponse) GetRefreshTokenValiditySeconds() int32 {
if o == nil {
var ret int32
return ret
}
return o.RefreshTokenValiditySeconds
}
// GetRefreshTokenValiditySecondsOk returns a tuple with the RefreshTokenValiditySeconds field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetRefreshTokenValiditySecondsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.RefreshTokenValiditySeconds, true
}
// SetRefreshTokenValiditySeconds sets field value
func (o *GetOAuthClientResponse) SetRefreshTokenValiditySeconds(v int32) {
o.RefreshTokenValiditySeconds = v
}
// GetRedirectUris returns the RedirectUris field value
// If the value is explicit nil, the zero value for []string will be returned
func (o *GetOAuthClientResponse) GetRedirectUris() []string {
if o == nil {
var ret []string
return ret
}
return o.RedirectUris
}
// GetRedirectUrisOk returns a tuple with the RedirectUris field value
// 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 *GetOAuthClientResponse) GetRedirectUrisOk() ([]string, bool) {
if o == nil || IsNil(o.RedirectUris) {
return nil, false
}
return o.RedirectUris, true
}
// SetRedirectUris sets field value
func (o *GetOAuthClientResponse) SetRedirectUris(v []string) {
o.RedirectUris = v
}
// GetGrantTypes returns the GrantTypes field value
func (o *GetOAuthClientResponse) GetGrantTypes() []GrantType {
if o == nil {
var ret []GrantType
return ret
}
return o.GrantTypes
}
// GetGrantTypesOk returns a tuple with the GrantTypes field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetGrantTypesOk() ([]GrantType, bool) {
if o == nil {
return nil, false
}
return o.GrantTypes, true
}
// SetGrantTypes sets field value
func (o *GetOAuthClientResponse) SetGrantTypes(v []GrantType) {
o.GrantTypes = v
}
// GetAccessType returns the AccessType field value
func (o *GetOAuthClientResponse) GetAccessType() AccessType {
if o == nil {
var ret AccessType
return ret
}
return o.AccessType
}
// GetAccessTypeOk returns a tuple with the AccessType field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetAccessTypeOk() (*AccessType, bool) {
if o == nil {
return nil, false
}
return &o.AccessType, true
}
// SetAccessType sets field value
func (o *GetOAuthClientResponse) SetAccessType(v AccessType) {
o.AccessType = v
}
// GetType returns the Type field value
func (o *GetOAuthClientResponse) GetType() ClientType {
if o == nil {
var ret ClientType
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetTypeOk() (*ClientType, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *GetOAuthClientResponse) SetType(v ClientType) {
o.Type = v
}
// GetInternal returns the Internal field value
func (o *GetOAuthClientResponse) GetInternal() bool {
if o == nil {
var ret bool
return ret
}
return o.Internal
}
// GetInternalOk returns a tuple with the Internal field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetInternalOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Internal, true
}
// SetInternal sets field value
func (o *GetOAuthClientResponse) SetInternal(v bool) {
o.Internal = v
}
// GetEnabled returns the Enabled field value
func (o *GetOAuthClientResponse) GetEnabled() bool {
if o == nil {
var ret bool
return ret
}
return o.Enabled
}
// GetEnabledOk returns a tuple with the Enabled field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Enabled, true
}
// SetEnabled sets field value
func (o *GetOAuthClientResponse) SetEnabled(v bool) {
o.Enabled = v
}
// GetStrongAuthSupported returns the StrongAuthSupported field value
func (o *GetOAuthClientResponse) GetStrongAuthSupported() bool {
if o == nil {
var ret bool
return ret
}
return o.StrongAuthSupported
}
// GetStrongAuthSupportedOk returns a tuple with the StrongAuthSupported field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetStrongAuthSupportedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.StrongAuthSupported, true
}
// SetStrongAuthSupported sets field value
func (o *GetOAuthClientResponse) SetStrongAuthSupported(v bool) {
o.StrongAuthSupported = v
}
// GetClaimsSupported returns the ClaimsSupported field value
func (o *GetOAuthClientResponse) GetClaimsSupported() bool {
if o == nil {
var ret bool
return ret
}
return o.ClaimsSupported
}
// GetClaimsSupportedOk returns a tuple with the ClaimsSupported field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetClaimsSupportedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.ClaimsSupported, true
}
// SetClaimsSupported sets field value
func (o *GetOAuthClientResponse) SetClaimsSupported(v bool) {
o.ClaimsSupported = v
}
// GetCreated returns the Created field value
func (o *GetOAuthClientResponse) GetCreated() SailPointTime {
if o == nil {
var ret SailPointTime
return ret
}
return o.Created
}
// GetCreatedOk returns a tuple with the Created field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetCreatedOk() (*SailPointTime, bool) {
if o == nil {
return nil, false
}
return &o.Created, true
}
// SetCreated sets field value
func (o *GetOAuthClientResponse) SetCreated(v SailPointTime) {
o.Created = v
}
// GetModified returns the Modified field value
func (o *GetOAuthClientResponse) GetModified() SailPointTime {
if o == nil {
var ret SailPointTime
return ret
}
return o.Modified
}
// GetModifiedOk returns a tuple with the Modified field value
// and a boolean to check if the value has been set.
func (o *GetOAuthClientResponse) GetModifiedOk() (*SailPointTime, bool) {
if o == nil {
return nil, false
}
return &o.Modified, true
}
// SetModified sets field value
func (o *GetOAuthClientResponse) SetModified(v SailPointTime) {
o.Modified = v
}
// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetOAuthClientResponse) GetSecret() string {
if o == nil || IsNil(o.Secret.Get()) {
var ret string
return ret
}
return *o.Secret.Get()
}
// GetSecretOk returns a tuple with the Secret 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 *GetOAuthClientResponse) GetSecretOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Secret.Get(), o.Secret.IsSet()
}
// HasSecret returns a boolean if a field has been set.
func (o *GetOAuthClientResponse) HasSecret() bool {
if o != nil && o.Secret.IsSet() {
return true
}
return false
}
// SetSecret gets a reference to the given NullableString and assigns it to the Secret field.
func (o *GetOAuthClientResponse) SetSecret(v string) {
o.Secret.Set(&v)
}
// SetSecretNil sets the value for Secret to be an explicit nil
func (o *GetOAuthClientResponse) SetSecretNil() {
o.Secret.Set(nil)
}
// UnsetSecret ensures that no value is present for Secret, not even an explicit nil
func (o *GetOAuthClientResponse) UnsetSecret() {
o.Secret.Unset()
}
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetOAuthClientResponse) GetMetadata() string {
if o == nil || IsNil(o.Metadata.Get()) {
var ret string
return ret
}
return *o.Metadata.Get()
}
// GetMetadataOk returns a tuple with the Metadata 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 *GetOAuthClientResponse) GetMetadataOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Metadata.Get(), o.Metadata.IsSet()
}
// HasMetadata returns a boolean if a field has been set.
func (o *GetOAuthClientResponse) HasMetadata() bool {
if o != nil && o.Metadata.IsSet() {
return true
}
return false
}
// SetMetadata gets a reference to the given NullableString and assigns it to the Metadata field.
func (o *GetOAuthClientResponse) SetMetadata(v string) {
o.Metadata.Set(&v)
}
// SetMetadataNil sets the value for Metadata to be an explicit nil
func (o *GetOAuthClientResponse) SetMetadataNil() {
o.Metadata.Set(nil)
}
// UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil
func (o *GetOAuthClientResponse) UnsetMetadata() {
o.Metadata.Unset()
}
// GetLastUsed returns the LastUsed field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetOAuthClientResponse) GetLastUsed() SailPointTime {
if o == nil || IsNil(o.LastUsed.Get()) {
var ret SailPointTime
return ret
}
return *o.LastUsed.Get()
}
// GetLastUsedOk returns a tuple with the LastUsed 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 *GetOAuthClientResponse) GetLastUsedOk() (*SailPointTime, bool) {
if o == nil {
return nil, false
}
return o.LastUsed.Get(), o.LastUsed.IsSet()
}
// HasLastUsed returns a boolean if a field has been set.
func (o *GetOAuthClientResponse) HasLastUsed() bool {
if o != nil && o.LastUsed.IsSet() {
return true
}
return false
}
// SetLastUsed gets a reference to the given NullableTime and assigns it to the LastUsed field.
func (o *GetOAuthClientResponse) SetLastUsed(v SailPointTime) {
o.LastUsed.Set(&v)
}
// SetLastUsedNil sets the value for LastUsed to be an explicit nil
func (o *GetOAuthClientResponse) SetLastUsedNil() {
o.LastUsed.Set(nil)
}
// UnsetLastUsed ensures that no value is present for LastUsed, not even an explicit nil
func (o *GetOAuthClientResponse) UnsetLastUsed() {
o.LastUsed.Unset()
}
// GetScope returns the Scope field value
// If the value is explicit nil, the zero value for []string will be returned
func (o *GetOAuthClientResponse) GetScope() []string {
if o == nil {
var ret []string
return ret
}
return o.Scope
}
// GetScopeOk returns a tuple with the Scope field value
// 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 *GetOAuthClientResponse) GetScopeOk() ([]string, bool) {
if o == nil || IsNil(o.Scope) {
return nil, false
}
return o.Scope, true
}
// SetScope sets field value
func (o *GetOAuthClientResponse) SetScope(v []string) {
o.Scope = v
}
func (o GetOAuthClientResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetOAuthClientResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["businessName"] = o.BusinessName.Get()
toSerialize["homepageUrl"] = o.HomepageUrl.Get()
toSerialize["name"] = o.Name
toSerialize["description"] = o.Description.Get()
toSerialize["accessTokenValiditySeconds"] = o.AccessTokenValiditySeconds
toSerialize["refreshTokenValiditySeconds"] = o.RefreshTokenValiditySeconds
if o.RedirectUris != nil {
toSerialize["redirectUris"] = o.RedirectUris
}
toSerialize["grantTypes"] = o.GrantTypes
toSerialize["accessType"] = o.AccessType
toSerialize["type"] = o.Type
toSerialize["internal"] = o.Internal
toSerialize["enabled"] = o.Enabled
toSerialize["strongAuthSupported"] = o.StrongAuthSupported
toSerialize["claimsSupported"] = o.ClaimsSupported
toSerialize["created"] = o.Created
toSerialize["modified"] = o.Modified
if o.Secret.IsSet() {
toSerialize["secret"] = o.Secret.Get()
}
if o.Metadata.IsSet() {
toSerialize["metadata"] = o.Metadata.Get()
}
if o.LastUsed.IsSet() {
toSerialize["lastUsed"] = o.LastUsed.Get()
}
if o.Scope != nil {
toSerialize["scope"] = o.Scope
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GetOAuthClientResponse) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
"businessName",
"homepageUrl",
"name",
"description",
"accessTokenValiditySeconds",
"refreshTokenValiditySeconds",
"redirectUris",
"grantTypes",
"accessType",
"type",
"internal",
"enabled",
"strongAuthSupported",
"claimsSupported",
"created",
"modified",
"scope",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varGetOAuthClientResponse := _GetOAuthClientResponse{}
err = json.Unmarshal(data, &varGetOAuthClientResponse)
if err != nil {
return err
}
*o = GetOAuthClientResponse(varGetOAuthClientResponse)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "businessName")
delete(additionalProperties, "homepageUrl")
delete(additionalProperties, "name")
delete(additionalProperties, "description")
delete(additionalProperties, "accessTokenValiditySeconds")
delete(additionalProperties, "refreshTokenValiditySeconds")
delete(additionalProperties, "redirectUris")
delete(additionalProperties, "grantTypes")
delete(additionalProperties, "accessType")
delete(additionalProperties, "type")
delete(additionalProperties, "internal")
delete(additionalProperties, "enabled")
delete(additionalProperties, "strongAuthSupported")
delete(additionalProperties, "claimsSupported")
delete(additionalProperties, "created")
delete(additionalProperties, "modified")
delete(additionalProperties, "secret")
delete(additionalProperties, "metadata")
delete(additionalProperties, "lastUsed")
delete(additionalProperties, "scope")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGetOAuthClientResponse struct {
value *GetOAuthClientResponse
isSet bool
}
func (v NullableGetOAuthClientResponse) Get() *GetOAuthClientResponse {
return v.value
}
func (v *NullableGetOAuthClientResponse) Set(val *GetOAuthClientResponse) {
v.value = val
v.isSet = true
}
func (v NullableGetOAuthClientResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGetOAuthClientResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetOAuthClientResponse(val *GetOAuthClientResponse) *NullableGetOAuthClientResponse {
return &NullableGetOAuthClientResponse{value: val, isSet: true}
}
func (v NullableGetOAuthClientResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetOAuthClientResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}