-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodel_name.go
298 lines (251 loc) · 8.01 KB
/
model_name.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
/*
* Akeyless API
*
* The purpose of this application is to provide access to Akeyless API.
*
* API version: 2.0
* Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package akeyless
import (
"encoding/json"
)
// Name Name represents an X.509 distinguished name. This only includes the common elements of a DN. Note that Name is only an approximation of the X.509 structure. If an accurate representation is needed, asn1.Unmarshal the raw subject or issuer as an RDNSequence.
type Name struct {
Country *[]string `json:"Country,omitempty"`
// ExtraNames contains attributes to be copied, raw, into any marshaled distinguished names. Values override any attributes with the same OID. The ExtraNames field is not populated when parsing, see Names.
ExtraNames *[]AttributeTypeAndValue `json:"ExtraNames,omitempty"`
Locality *[]string `json:"Locality,omitempty"`
// Names contains all parsed attributes. When parsing distinguished names, this can be used to extract non-standard attributes that are not parsed by this package. When marshaling to RDNSequences, the Names field is ignored, see ExtraNames.
Names *[]AttributeTypeAndValue `json:"Names,omitempty"`
SerialNumber *string `json:"SerialNumber,omitempty"`
StreetAddress *[]string `json:"StreetAddress,omitempty"`
}
// NewName instantiates a new Name 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 NewName() *Name {
this := Name{}
return &this
}
// NewNameWithDefaults instantiates a new Name 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 NewNameWithDefaults() *Name {
this := Name{}
return &this
}
// GetCountry returns the Country field value if set, zero value otherwise.
func (o *Name) GetCountry() []string {
if o == nil || o.Country == nil {
var ret []string
return ret
}
return *o.Country
}
// GetCountryOk returns a tuple with the Country field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetCountryOk() (*[]string, bool) {
if o == nil || o.Country == nil {
return nil, false
}
return o.Country, true
}
// HasCountry returns a boolean if a field has been set.
func (o *Name) HasCountry() bool {
if o != nil && o.Country != nil {
return true
}
return false
}
// SetCountry gets a reference to the given []string and assigns it to the Country field.
func (o *Name) SetCountry(v []string) {
o.Country = &v
}
// GetExtraNames returns the ExtraNames field value if set, zero value otherwise.
func (o *Name) GetExtraNames() []AttributeTypeAndValue {
if o == nil || o.ExtraNames == nil {
var ret []AttributeTypeAndValue
return ret
}
return *o.ExtraNames
}
// GetExtraNamesOk returns a tuple with the ExtraNames field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetExtraNamesOk() (*[]AttributeTypeAndValue, bool) {
if o == nil || o.ExtraNames == nil {
return nil, false
}
return o.ExtraNames, true
}
// HasExtraNames returns a boolean if a field has been set.
func (o *Name) HasExtraNames() bool {
if o != nil && o.ExtraNames != nil {
return true
}
return false
}
// SetExtraNames gets a reference to the given []AttributeTypeAndValue and assigns it to the ExtraNames field.
func (o *Name) SetExtraNames(v []AttributeTypeAndValue) {
o.ExtraNames = &v
}
// GetLocality returns the Locality field value if set, zero value otherwise.
func (o *Name) GetLocality() []string {
if o == nil || o.Locality == nil {
var ret []string
return ret
}
return *o.Locality
}
// GetLocalityOk returns a tuple with the Locality field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetLocalityOk() (*[]string, bool) {
if o == nil || o.Locality == nil {
return nil, false
}
return o.Locality, true
}
// HasLocality returns a boolean if a field has been set.
func (o *Name) HasLocality() bool {
if o != nil && o.Locality != nil {
return true
}
return false
}
// SetLocality gets a reference to the given []string and assigns it to the Locality field.
func (o *Name) SetLocality(v []string) {
o.Locality = &v
}
// GetNames returns the Names field value if set, zero value otherwise.
func (o *Name) GetNames() []AttributeTypeAndValue {
if o == nil || o.Names == nil {
var ret []AttributeTypeAndValue
return ret
}
return *o.Names
}
// GetNamesOk returns a tuple with the Names field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetNamesOk() (*[]AttributeTypeAndValue, bool) {
if o == nil || o.Names == nil {
return nil, false
}
return o.Names, true
}
// HasNames returns a boolean if a field has been set.
func (o *Name) HasNames() bool {
if o != nil && o.Names != nil {
return true
}
return false
}
// SetNames gets a reference to the given []AttributeTypeAndValue and assigns it to the Names field.
func (o *Name) SetNames(v []AttributeTypeAndValue) {
o.Names = &v
}
// GetSerialNumber returns the SerialNumber field value if set, zero value otherwise.
func (o *Name) GetSerialNumber() string {
if o == nil || o.SerialNumber == nil {
var ret string
return ret
}
return *o.SerialNumber
}
// GetSerialNumberOk returns a tuple with the SerialNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetSerialNumberOk() (*string, bool) {
if o == nil || o.SerialNumber == nil {
return nil, false
}
return o.SerialNumber, true
}
// HasSerialNumber returns a boolean if a field has been set.
func (o *Name) HasSerialNumber() bool {
if o != nil && o.SerialNumber != nil {
return true
}
return false
}
// SetSerialNumber gets a reference to the given string and assigns it to the SerialNumber field.
func (o *Name) SetSerialNumber(v string) {
o.SerialNumber = &v
}
// GetStreetAddress returns the StreetAddress field value if set, zero value otherwise.
func (o *Name) GetStreetAddress() []string {
if o == nil || o.StreetAddress == nil {
var ret []string
return ret
}
return *o.StreetAddress
}
// GetStreetAddressOk returns a tuple with the StreetAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Name) GetStreetAddressOk() (*[]string, bool) {
if o == nil || o.StreetAddress == nil {
return nil, false
}
return o.StreetAddress, true
}
// HasStreetAddress returns a boolean if a field has been set.
func (o *Name) HasStreetAddress() bool {
if o != nil && o.StreetAddress != nil {
return true
}
return false
}
// SetStreetAddress gets a reference to the given []string and assigns it to the StreetAddress field.
func (o *Name) SetStreetAddress(v []string) {
o.StreetAddress = &v
}
func (o Name) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Country != nil {
toSerialize["Country"] = o.Country
}
if o.ExtraNames != nil {
toSerialize["ExtraNames"] = o.ExtraNames
}
if o.Locality != nil {
toSerialize["Locality"] = o.Locality
}
if o.Names != nil {
toSerialize["Names"] = o.Names
}
if o.SerialNumber != nil {
toSerialize["SerialNumber"] = o.SerialNumber
}
if o.StreetAddress != nil {
toSerialize["StreetAddress"] = o.StreetAddress
}
return json.Marshal(toSerialize)
}
type NullableName struct {
value *Name
isSet bool
}
func (v NullableName) Get() *Name {
return v.value
}
func (v *NullableName) Set(val *Name) {
v.value = val
v.isSet = true
}
func (v NullableName) IsSet() bool {
return v.isSet
}
func (v *NullableName) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableName(val *Name) *NullableName {
return &NullableName{value: val, isSet: true}
}
func (v NullableName) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableName) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}