-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
model_credential_supported_draft00.go
271 lines (220 loc) · 8.8 KB
/
model_credential_supported_draft00.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
/*
Ory Hydra API
Documentation for all of Ory Hydra's APIs.
API version: v2.2.1
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// checks if the CredentialSupportedDraft00 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CredentialSupportedDraft00{}
// CredentialSupportedDraft00 Includes information about the supported verifiable credentials.
type CredentialSupportedDraft00 struct {
// OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.
CryptographicBindingMethodsSupported []string `json:"cryptographic_binding_methods_supported,omitempty"`
// OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.
CryptographicSuitesSupported []string `json:"cryptographic_suites_supported,omitempty"`
// OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.
Format *string `json:"format,omitempty"`
// OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.
Types []string `json:"types,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CredentialSupportedDraft00 CredentialSupportedDraft00
// NewCredentialSupportedDraft00 instantiates a new CredentialSupportedDraft00 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 NewCredentialSupportedDraft00() *CredentialSupportedDraft00 {
this := CredentialSupportedDraft00{}
return &this
}
// NewCredentialSupportedDraft00WithDefaults instantiates a new CredentialSupportedDraft00 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 NewCredentialSupportedDraft00WithDefaults() *CredentialSupportedDraft00 {
this := CredentialSupportedDraft00{}
return &this
}
// GetCryptographicBindingMethodsSupported returns the CryptographicBindingMethodsSupported field value if set, zero value otherwise.
func (o *CredentialSupportedDraft00) GetCryptographicBindingMethodsSupported() []string {
if o == nil || IsNil(o.CryptographicBindingMethodsSupported) {
var ret []string
return ret
}
return o.CryptographicBindingMethodsSupported
}
// GetCryptographicBindingMethodsSupportedOk returns a tuple with the CryptographicBindingMethodsSupported field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CredentialSupportedDraft00) GetCryptographicBindingMethodsSupportedOk() ([]string, bool) {
if o == nil || IsNil(o.CryptographicBindingMethodsSupported) {
return nil, false
}
return o.CryptographicBindingMethodsSupported, true
}
// HasCryptographicBindingMethodsSupported returns a boolean if a field has been set.
func (o *CredentialSupportedDraft00) HasCryptographicBindingMethodsSupported() bool {
if o != nil && !IsNil(o.CryptographicBindingMethodsSupported) {
return true
}
return false
}
// SetCryptographicBindingMethodsSupported gets a reference to the given []string and assigns it to the CryptographicBindingMethodsSupported field.
func (o *CredentialSupportedDraft00) SetCryptographicBindingMethodsSupported(v []string) {
o.CryptographicBindingMethodsSupported = v
}
// GetCryptographicSuitesSupported returns the CryptographicSuitesSupported field value if set, zero value otherwise.
func (o *CredentialSupportedDraft00) GetCryptographicSuitesSupported() []string {
if o == nil || IsNil(o.CryptographicSuitesSupported) {
var ret []string
return ret
}
return o.CryptographicSuitesSupported
}
// GetCryptographicSuitesSupportedOk returns a tuple with the CryptographicSuitesSupported field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CredentialSupportedDraft00) GetCryptographicSuitesSupportedOk() ([]string, bool) {
if o == nil || IsNil(o.CryptographicSuitesSupported) {
return nil, false
}
return o.CryptographicSuitesSupported, true
}
// HasCryptographicSuitesSupported returns a boolean if a field has been set.
func (o *CredentialSupportedDraft00) HasCryptographicSuitesSupported() bool {
if o != nil && !IsNil(o.CryptographicSuitesSupported) {
return true
}
return false
}
// SetCryptographicSuitesSupported gets a reference to the given []string and assigns it to the CryptographicSuitesSupported field.
func (o *CredentialSupportedDraft00) SetCryptographicSuitesSupported(v []string) {
o.CryptographicSuitesSupported = v
}
// GetFormat returns the Format field value if set, zero value otherwise.
func (o *CredentialSupportedDraft00) GetFormat() string {
if o == nil || IsNil(o.Format) {
var ret string
return ret
}
return *o.Format
}
// GetFormatOk returns a tuple with the Format field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CredentialSupportedDraft00) GetFormatOk() (*string, bool) {
if o == nil || IsNil(o.Format) {
return nil, false
}
return o.Format, true
}
// HasFormat returns a boolean if a field has been set.
func (o *CredentialSupportedDraft00) HasFormat() bool {
if o != nil && !IsNil(o.Format) {
return true
}
return false
}
// SetFormat gets a reference to the given string and assigns it to the Format field.
func (o *CredentialSupportedDraft00) SetFormat(v string) {
o.Format = &v
}
// GetTypes returns the Types field value if set, zero value otherwise.
func (o *CredentialSupportedDraft00) GetTypes() []string {
if o == nil || IsNil(o.Types) {
var ret []string
return ret
}
return o.Types
}
// GetTypesOk returns a tuple with the Types field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CredentialSupportedDraft00) GetTypesOk() ([]string, bool) {
if o == nil || IsNil(o.Types) {
return nil, false
}
return o.Types, true
}
// HasTypes returns a boolean if a field has been set.
func (o *CredentialSupportedDraft00) HasTypes() bool {
if o != nil && !IsNil(o.Types) {
return true
}
return false
}
// SetTypes gets a reference to the given []string and assigns it to the Types field.
func (o *CredentialSupportedDraft00) SetTypes(v []string) {
o.Types = v
}
func (o CredentialSupportedDraft00) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CredentialSupportedDraft00) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CryptographicBindingMethodsSupported) {
toSerialize["cryptographic_binding_methods_supported"] = o.CryptographicBindingMethodsSupported
}
if !IsNil(o.CryptographicSuitesSupported) {
toSerialize["cryptographic_suites_supported"] = o.CryptographicSuitesSupported
}
if !IsNil(o.Format) {
toSerialize["format"] = o.Format
}
if !IsNil(o.Types) {
toSerialize["types"] = o.Types
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CredentialSupportedDraft00) UnmarshalJSON(data []byte) (err error) {
varCredentialSupportedDraft00 := _CredentialSupportedDraft00{}
err = json.Unmarshal(data, &varCredentialSupportedDraft00)
if err != nil {
return err
}
*o = CredentialSupportedDraft00(varCredentialSupportedDraft00)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "cryptographic_binding_methods_supported")
delete(additionalProperties, "cryptographic_suites_supported")
delete(additionalProperties, "format")
delete(additionalProperties, "types")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCredentialSupportedDraft00 struct {
value *CredentialSupportedDraft00
isSet bool
}
func (v NullableCredentialSupportedDraft00) Get() *CredentialSupportedDraft00 {
return v.value
}
func (v *NullableCredentialSupportedDraft00) Set(val *CredentialSupportedDraft00) {
v.value = val
v.isSet = true
}
func (v NullableCredentialSupportedDraft00) IsSet() bool {
return v.isSet
}
func (v *NullableCredentialSupportedDraft00) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCredentialSupportedDraft00(val *CredentialSupportedDraft00) *NullableCredentialSupportedDraft00 {
return &NullableCredentialSupportedDraft00{value: val, isSet: true}
}
func (v NullableCredentialSupportedDraft00) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCredentialSupportedDraft00) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}