-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmodel_service_account.go
More file actions
312 lines (257 loc) · 15.2 KB
/
model_service_account.go
File metadata and controls
312 lines (257 loc) · 15.2 KB
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
/*
STACKIT Service Account API
API to manage Service Accounts and their Access Tokens. ### System for Cross-domain Identity Management (SCIM) Service Account Service offers SCIM APIs to query state. The SCIM protocol was created as standard for automating the exchange of user identity information between identity domains, or IT systems. Service accounts are be handled as indentites similar to SCIM users. A custom SCIM schema has been created: `/ServiceAccounts` #### Syntax ##### Attribute operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | eq | equal | | ne | not equal | | co | contains | | sw | starts with | | ew | ends with | ##### Logical operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | and | logical \"and\" | | or | logical \"or\" | ##### Grouping operators | OPERATOR | DESCRIPTION | |----------|--------------------------| | () | precending grouping | ##### Example ``` filter=email eq \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email ne \"my-service-account-aBc2defg@sa.stackit.cloud\" filter=email co \"my-service-account\" filter=name sw \"my\" filter=name ew \"account\" filter=email co \"my-service-account\" and name sw \"my\" filter=email co \"my-service-account\" and (name sw \"my\" or name ew \"account\") ``` #### Sorting > Sorting is optional | PARAMETER | DESCRIPTION | |-----------|--------------------------------------| | sortBy | attribute response is ordered by | | sortOrder | 'ASCENDING' (default) or 'DESCENDING'| #### Pagination | PARAMETER | DESCRIPTION | |--------------|----------------------------------------------| | startIndex | index of first query result, default: 1 | | count | maximum number of query results, default: 100|
API version: 2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
package serviceaccount
import (
"encoding/json"
)
// checks if the ServiceAccount type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ServiceAccount{}
/*
types and functions for email
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetEmailAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getServiceAccountGetEmailAttributeTypeOk(arg ServiceAccountGetEmailAttributeType) (ret ServiceAccountGetEmailRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setServiceAccountGetEmailAttributeType(arg *ServiceAccountGetEmailAttributeType, val ServiceAccountGetEmailRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetEmailArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetEmailRetType = string
/*
types and functions for id
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetIdAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getServiceAccountGetIdAttributeTypeOk(arg ServiceAccountGetIdAttributeType) (ret ServiceAccountGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setServiceAccountGetIdAttributeType(arg *ServiceAccountGetIdAttributeType, val ServiceAccountGetIdRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetIdArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetIdRetType = string
/*
types and functions for internal
*/
// isBoolean
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountgetInternalAttributeType = *bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountgetInternalArgType = bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountgetInternalRetType = bool
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getServiceAccountgetInternalAttributeTypeOk(arg ServiceAccountgetInternalAttributeType) (ret ServiceAccountgetInternalRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setServiceAccountgetInternalAttributeType(arg *ServiceAccountgetInternalAttributeType, val ServiceAccountgetInternalRetType) {
*arg = &val
}
/*
types and functions for projectId
*/
// isNotNullableString
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetProjectIdAttributeType = *string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func getServiceAccountGetProjectIdAttributeTypeOk(arg ServiceAccountGetProjectIdAttributeType) (ret ServiceAccountGetProjectIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func setServiceAccountGetProjectIdAttributeType(arg *ServiceAccountGetProjectIdAttributeType, val ServiceAccountGetProjectIdRetType) {
*arg = &val
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetProjectIdArgType = string
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccountGetProjectIdRetType = string
// ServiceAccount struct for ServiceAccount
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type ServiceAccount struct {
// Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation.
// REQUIRED
Email ServiceAccountGetEmailAttributeType `json:"email" required:"true"`
// Unique ID of the service account. It is also used in the 'sub' field of the service accounts access tokens.
// REQUIRED
Id ServiceAccountGetIdAttributeType `json:"id" required:"true"`
// Flag indicating internal service accounts
// REQUIRED
Internal ServiceAccountgetInternalAttributeType `json:"internal" required:"true"`
// ID of the related project
// REQUIRED
ProjectId ServiceAccountGetProjectIdAttributeType `json:"projectId" required:"true"`
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type _ServiceAccount ServiceAccount
// NewServiceAccount instantiates a new ServiceAccount 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
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewServiceAccount(email ServiceAccountGetEmailArgType, id ServiceAccountGetIdArgType, internal ServiceAccountgetInternalArgType, projectId ServiceAccountGetProjectIdArgType) *ServiceAccount {
this := ServiceAccount{}
setServiceAccountGetEmailAttributeType(&this.Email, email)
setServiceAccountGetIdAttributeType(&this.Id, id)
setServiceAccountgetInternalAttributeType(&this.Internal, internal)
setServiceAccountGetProjectIdAttributeType(&this.ProjectId, projectId)
return &this
}
// NewServiceAccountWithDefaults instantiates a new ServiceAccount 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
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewServiceAccountWithDefaults() *ServiceAccount {
this := ServiceAccount{}
return &this
}
// GetEmail returns the Email field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetEmail() (ret ServiceAccountGetEmailRetType) {
ret, _ = o.GetEmailOk()
return ret
}
// GetEmailOk returns a tuple with the Email field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetEmailOk() (ret ServiceAccountGetEmailRetType, ok bool) {
return getServiceAccountGetEmailAttributeTypeOk(o.Email)
}
// SetEmail sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) SetEmail(v ServiceAccountGetEmailRetType) {
setServiceAccountGetEmailAttributeType(&o.Email, v)
}
// GetId returns the Id field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetId() (ret ServiceAccountGetIdRetType) {
ret, _ = o.GetIdOk()
return ret
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetIdOk() (ret ServiceAccountGetIdRetType, ok bool) {
return getServiceAccountGetIdAttributeTypeOk(o.Id)
}
// SetId sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) SetId(v ServiceAccountGetIdRetType) {
setServiceAccountGetIdAttributeType(&o.Id, v)
}
// GetInternal returns the Internal field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetInternal() (ret ServiceAccountgetInternalRetType) {
ret, _ = o.GetInternalOk()
return ret
}
// GetInternalOk returns a tuple with the Internal field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetInternalOk() (ret ServiceAccountgetInternalRetType, ok bool) {
return getServiceAccountgetInternalAttributeTypeOk(o.Internal)
}
// SetInternal sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) SetInternal(v ServiceAccountgetInternalRetType) {
setServiceAccountgetInternalAttributeType(&o.Internal, v)
}
// GetProjectId returns the ProjectId field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetProjectId() (ret ServiceAccountGetProjectIdRetType) {
ret, _ = o.GetProjectIdOk()
return ret
}
// GetProjectIdOk returns a tuple with the ProjectId field value
// and a boolean to check if the value has been set.
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) GetProjectIdOk() (ret ServiceAccountGetProjectIdRetType, ok bool) {
return getServiceAccountGetProjectIdAttributeTypeOk(o.ProjectId)
}
// SetProjectId sets field value
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o *ServiceAccount) SetProjectId(v ServiceAccountGetProjectIdRetType) {
setServiceAccountGetProjectIdAttributeType(&o.ProjectId, v)
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (o ServiceAccount) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getServiceAccountGetEmailAttributeTypeOk(o.Email); ok {
toSerialize["Email"] = val
}
if val, ok := getServiceAccountGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getServiceAccountgetInternalAttributeTypeOk(o.Internal); ok {
toSerialize["Internal"] = val
}
if val, ok := getServiceAccountGetProjectIdAttributeTypeOk(o.ProjectId); ok {
toSerialize["ProjectId"] = val
}
return toSerialize, nil
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
type NullableServiceAccount struct {
value *ServiceAccount
isSet bool
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableServiceAccount) Get() *ServiceAccount {
return v.value
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableServiceAccount) Set(val *ServiceAccount) {
v.value = val
v.isSet = true
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableServiceAccount) IsSet() bool {
return v.isSet
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableServiceAccount) Unset() {
v.value = nil
v.isSet = false
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func NewNullableServiceAccount(val *ServiceAccount) *NullableServiceAccount {
return &NullableServiceAccount{value: val, isSet: true}
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v NullableServiceAccount) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead
func (v *NullableServiceAccount) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}