-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_gcp_access_rules.go
379 lines (322 loc) · 11.2 KB
/
model_gcp_access_rules.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
/*
* Akeyless API
*
* The purpose of this application is to provide access to Akeyless API.
*
* API version: 2.0
* Contact: support@akeyless.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package akeyless
import (
"encoding/json"
)
// GCPAccessRules struct for GCPAccessRules
type GCPAccessRules struct {
// The audience in the JWT
Audience *string `json:"audience,omitempty"`
// A map of GCP labels formatted as \"key:value\" strings that must be set on authorized GCE instances. TODO: Because GCP labels are not currently ACL'd ....
BoundLabels *map[string]string `json:"bound_labels,omitempty"`
// Human and Machine authentication section Array of GCP project IDs. Only entities belonging to any of the provided projects can authenticate.
BoundProjects *[]string `json:"bound_projects,omitempty"`
// List of regions that a GCE instance must belong to in order to be authenticated. TODO: If bound_instance_groups is provided, it is assumed to be a regional group and the group must belong to this region. If bound_zones are provided, this attribute is ignored.
BoundRegions *[]string `json:"bound_regions,omitempty"`
// List of service accounts the service account must be part of in order to be authenticated
BoundServiceAccounts *[]string `json:"bound_service_accounts,omitempty"`
// === Machine authentication section === List of zones that a GCE instance must belong to in order to be authenticated. TODO: If bound_instance_groups is provided, it is assumed to be a zonal group and the group must belong to this zone.
BoundZones *[]string `json:"bound_zones,omitempty"`
// ServiceAccount holds the credentials file contents to be used by Akeyless to validate IAM (Human) and GCE (Machine) logins against GCP base64 encoded string
ServiceAccount *string `json:"service_account,omitempty"`
Type *string `json:"type,omitempty"`
}
// NewGCPAccessRules instantiates a new GCPAccessRules 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 NewGCPAccessRules() *GCPAccessRules {
this := GCPAccessRules{}
var audience string = "akeyless.io"
this.Audience = &audience
return &this
}
// NewGCPAccessRulesWithDefaults instantiates a new GCPAccessRules 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 NewGCPAccessRulesWithDefaults() *GCPAccessRules {
this := GCPAccessRules{}
var audience string = "akeyless.io"
this.Audience = &audience
return &this
}
// GetAudience returns the Audience field value if set, zero value otherwise.
func (o *GCPAccessRules) GetAudience() string {
if o == nil || o.Audience == nil {
var ret string
return ret
}
return *o.Audience
}
// GetAudienceOk returns a tuple with the Audience field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetAudienceOk() (*string, bool) {
if o == nil || o.Audience == nil {
return nil, false
}
return o.Audience, true
}
// HasAudience returns a boolean if a field has been set.
func (o *GCPAccessRules) HasAudience() bool {
if o != nil && o.Audience != nil {
return true
}
return false
}
// SetAudience gets a reference to the given string and assigns it to the Audience field.
func (o *GCPAccessRules) SetAudience(v string) {
o.Audience = &v
}
// GetBoundLabels returns the BoundLabels field value if set, zero value otherwise.
func (o *GCPAccessRules) GetBoundLabels() map[string]string {
if o == nil || o.BoundLabels == nil {
var ret map[string]string
return ret
}
return *o.BoundLabels
}
// GetBoundLabelsOk returns a tuple with the BoundLabels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetBoundLabelsOk() (*map[string]string, bool) {
if o == nil || o.BoundLabels == nil {
return nil, false
}
return o.BoundLabels, true
}
// HasBoundLabels returns a boolean if a field has been set.
func (o *GCPAccessRules) HasBoundLabels() bool {
if o != nil && o.BoundLabels != nil {
return true
}
return false
}
// SetBoundLabels gets a reference to the given map[string]string and assigns it to the BoundLabels field.
func (o *GCPAccessRules) SetBoundLabels(v map[string]string) {
o.BoundLabels = &v
}
// GetBoundProjects returns the BoundProjects field value if set, zero value otherwise.
func (o *GCPAccessRules) GetBoundProjects() []string {
if o == nil || o.BoundProjects == nil {
var ret []string
return ret
}
return *o.BoundProjects
}
// GetBoundProjectsOk returns a tuple with the BoundProjects field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetBoundProjectsOk() (*[]string, bool) {
if o == nil || o.BoundProjects == nil {
return nil, false
}
return o.BoundProjects, true
}
// HasBoundProjects returns a boolean if a field has been set.
func (o *GCPAccessRules) HasBoundProjects() bool {
if o != nil && o.BoundProjects != nil {
return true
}
return false
}
// SetBoundProjects gets a reference to the given []string and assigns it to the BoundProjects field.
func (o *GCPAccessRules) SetBoundProjects(v []string) {
o.BoundProjects = &v
}
// GetBoundRegions returns the BoundRegions field value if set, zero value otherwise.
func (o *GCPAccessRules) GetBoundRegions() []string {
if o == nil || o.BoundRegions == nil {
var ret []string
return ret
}
return *o.BoundRegions
}
// GetBoundRegionsOk returns a tuple with the BoundRegions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetBoundRegionsOk() (*[]string, bool) {
if o == nil || o.BoundRegions == nil {
return nil, false
}
return o.BoundRegions, true
}
// HasBoundRegions returns a boolean if a field has been set.
func (o *GCPAccessRules) HasBoundRegions() bool {
if o != nil && o.BoundRegions != nil {
return true
}
return false
}
// SetBoundRegions gets a reference to the given []string and assigns it to the BoundRegions field.
func (o *GCPAccessRules) SetBoundRegions(v []string) {
o.BoundRegions = &v
}
// GetBoundServiceAccounts returns the BoundServiceAccounts field value if set, zero value otherwise.
func (o *GCPAccessRules) GetBoundServiceAccounts() []string {
if o == nil || o.BoundServiceAccounts == nil {
var ret []string
return ret
}
return *o.BoundServiceAccounts
}
// GetBoundServiceAccountsOk returns a tuple with the BoundServiceAccounts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetBoundServiceAccountsOk() (*[]string, bool) {
if o == nil || o.BoundServiceAccounts == nil {
return nil, false
}
return o.BoundServiceAccounts, true
}
// HasBoundServiceAccounts returns a boolean if a field has been set.
func (o *GCPAccessRules) HasBoundServiceAccounts() bool {
if o != nil && o.BoundServiceAccounts != nil {
return true
}
return false
}
// SetBoundServiceAccounts gets a reference to the given []string and assigns it to the BoundServiceAccounts field.
func (o *GCPAccessRules) SetBoundServiceAccounts(v []string) {
o.BoundServiceAccounts = &v
}
// GetBoundZones returns the BoundZones field value if set, zero value otherwise.
func (o *GCPAccessRules) GetBoundZones() []string {
if o == nil || o.BoundZones == nil {
var ret []string
return ret
}
return *o.BoundZones
}
// GetBoundZonesOk returns a tuple with the BoundZones field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetBoundZonesOk() (*[]string, bool) {
if o == nil || o.BoundZones == nil {
return nil, false
}
return o.BoundZones, true
}
// HasBoundZones returns a boolean if a field has been set.
func (o *GCPAccessRules) HasBoundZones() bool {
if o != nil && o.BoundZones != nil {
return true
}
return false
}
// SetBoundZones gets a reference to the given []string and assigns it to the BoundZones field.
func (o *GCPAccessRules) SetBoundZones(v []string) {
o.BoundZones = &v
}
// GetServiceAccount returns the ServiceAccount field value if set, zero value otherwise.
func (o *GCPAccessRules) GetServiceAccount() string {
if o == nil || o.ServiceAccount == nil {
var ret string
return ret
}
return *o.ServiceAccount
}
// GetServiceAccountOk returns a tuple with the ServiceAccount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetServiceAccountOk() (*string, bool) {
if o == nil || o.ServiceAccount == nil {
return nil, false
}
return o.ServiceAccount, true
}
// HasServiceAccount returns a boolean if a field has been set.
func (o *GCPAccessRules) HasServiceAccount() bool {
if o != nil && o.ServiceAccount != nil {
return true
}
return false
}
// SetServiceAccount gets a reference to the given string and assigns it to the ServiceAccount field.
func (o *GCPAccessRules) SetServiceAccount(v string) {
o.ServiceAccount = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *GCPAccessRules) GetType() string {
if o == nil || o.Type == nil {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccessRules) GetTypeOk() (*string, bool) {
if o == nil || o.Type == nil {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *GCPAccessRules) HasType() bool {
if o != nil && o.Type != nil {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *GCPAccessRules) SetType(v string) {
o.Type = &v
}
func (o GCPAccessRules) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Audience != nil {
toSerialize["audience"] = o.Audience
}
if o.BoundLabels != nil {
toSerialize["bound_labels"] = o.BoundLabels
}
if o.BoundProjects != nil {
toSerialize["bound_projects"] = o.BoundProjects
}
if o.BoundRegions != nil {
toSerialize["bound_regions"] = o.BoundRegions
}
if o.BoundServiceAccounts != nil {
toSerialize["bound_service_accounts"] = o.BoundServiceAccounts
}
if o.BoundZones != nil {
toSerialize["bound_zones"] = o.BoundZones
}
if o.ServiceAccount != nil {
toSerialize["service_account"] = o.ServiceAccount
}
if o.Type != nil {
toSerialize["type"] = o.Type
}
return json.Marshal(toSerialize)
}
type NullableGCPAccessRules struct {
value *GCPAccessRules
isSet bool
}
func (v NullableGCPAccessRules) Get() *GCPAccessRules {
return v.value
}
func (v *NullableGCPAccessRules) Set(val *GCPAccessRules) {
v.value = val
v.isSet = true
}
func (v NullableGCPAccessRules) IsSet() bool {
return v.isSet
}
func (v *NullableGCPAccessRules) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGCPAccessRules(val *GCPAccessRules) *NullableGCPAccessRules {
return &NullableGCPAccessRules{value: val, isSet: true}
}
func (v NullableGCPAccessRules) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGCPAccessRules) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}