-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathmodel_kms_key_payload.go
More file actions
261 lines (211 loc) · 8.39 KB
/
model_kms_key_payload.go
File metadata and controls
261 lines (211 loc) · 8.39 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
/*
STACKIT Secrets Manager API
This API provides endpoints for managing the Secrets-Manager.
API version: 1.4.2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package secretsmanager
import (
"encoding/json"
)
// checks if the KmsKeyPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &KmsKeyPayload{}
/*
types and functions for keyId
*/
// isNotNullableString
type KmsKeyPayloadGetKeyIdAttributeType = *string
func getKmsKeyPayloadGetKeyIdAttributeTypeOk(arg KmsKeyPayloadGetKeyIdAttributeType) (ret KmsKeyPayloadGetKeyIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setKmsKeyPayloadGetKeyIdAttributeType(arg *KmsKeyPayloadGetKeyIdAttributeType, val KmsKeyPayloadGetKeyIdRetType) {
*arg = &val
}
type KmsKeyPayloadGetKeyIdArgType = string
type KmsKeyPayloadGetKeyIdRetType = string
/*
types and functions for keyRingId
*/
// isNotNullableString
type KmsKeyPayloadGetKeyRingIdAttributeType = *string
func getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(arg KmsKeyPayloadGetKeyRingIdAttributeType) (ret KmsKeyPayloadGetKeyRingIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setKmsKeyPayloadGetKeyRingIdAttributeType(arg *KmsKeyPayloadGetKeyRingIdAttributeType, val KmsKeyPayloadGetKeyRingIdRetType) {
*arg = &val
}
type KmsKeyPayloadGetKeyRingIdArgType = string
type KmsKeyPayloadGetKeyRingIdRetType = string
/*
types and functions for keyVersion
*/
// isLong
type KmsKeyPayloadGetKeyVersionAttributeType = *int64
type KmsKeyPayloadGetKeyVersionArgType = int64
type KmsKeyPayloadGetKeyVersionRetType = int64
func getKmsKeyPayloadGetKeyVersionAttributeTypeOk(arg KmsKeyPayloadGetKeyVersionAttributeType) (ret KmsKeyPayloadGetKeyVersionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setKmsKeyPayloadGetKeyVersionAttributeType(arg *KmsKeyPayloadGetKeyVersionAttributeType, val KmsKeyPayloadGetKeyVersionRetType) {
*arg = &val
}
/*
types and functions for serviceAccountEmail
*/
// isNotNullableString
type KmsKeyPayloadGetServiceAccountEmailAttributeType = *string
func getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(arg KmsKeyPayloadGetServiceAccountEmailAttributeType) (ret KmsKeyPayloadGetServiceAccountEmailRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setKmsKeyPayloadGetServiceAccountEmailAttributeType(arg *KmsKeyPayloadGetServiceAccountEmailAttributeType, val KmsKeyPayloadGetServiceAccountEmailRetType) {
*arg = &val
}
type KmsKeyPayloadGetServiceAccountEmailArgType = string
type KmsKeyPayloadGetServiceAccountEmailRetType = string
// KmsKeyPayload The key for secret encryption and decryption.
type KmsKeyPayload struct {
// The key UUID.
// REQUIRED
KeyId KmsKeyPayloadGetKeyIdAttributeType `json:"keyId" required:"true"`
// The key ring UUID the key is part of.
// REQUIRED
KeyRingId KmsKeyPayloadGetKeyRingIdAttributeType `json:"keyRingId" required:"true"`
// The Key version number.
// REQUIRED
KeyVersion KmsKeyPayloadGetKeyVersionAttributeType `json:"keyVersion" required:"true"`
// The Service account email that will consume the key. Must be in the same project as the Secrets Manager instance.
// REQUIRED
ServiceAccountEmail KmsKeyPayloadGetServiceAccountEmailAttributeType `json:"serviceAccountEmail" required:"true"`
}
type _KmsKeyPayload KmsKeyPayload
// NewKmsKeyPayload instantiates a new KmsKeyPayload 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 NewKmsKeyPayload(keyId KmsKeyPayloadGetKeyIdArgType, keyRingId KmsKeyPayloadGetKeyRingIdArgType, keyVersion KmsKeyPayloadGetKeyVersionArgType, serviceAccountEmail KmsKeyPayloadGetServiceAccountEmailArgType) *KmsKeyPayload {
this := KmsKeyPayload{}
setKmsKeyPayloadGetKeyIdAttributeType(&this.KeyId, keyId)
setKmsKeyPayloadGetKeyRingIdAttributeType(&this.KeyRingId, keyRingId)
setKmsKeyPayloadGetKeyVersionAttributeType(&this.KeyVersion, keyVersion)
setKmsKeyPayloadGetServiceAccountEmailAttributeType(&this.ServiceAccountEmail, serviceAccountEmail)
return &this
}
// NewKmsKeyPayloadWithDefaults instantiates a new KmsKeyPayload 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 NewKmsKeyPayloadWithDefaults() *KmsKeyPayload {
this := KmsKeyPayload{}
return &this
}
// GetKeyId returns the KeyId field value
func (o *KmsKeyPayload) GetKeyId() (ret KmsKeyPayloadGetKeyIdRetType) {
ret, _ = o.GetKeyIdOk()
return ret
}
// GetKeyIdOk returns a tuple with the KeyId field value
// and a boolean to check if the value has been set.
func (o *KmsKeyPayload) GetKeyIdOk() (ret KmsKeyPayloadGetKeyIdRetType, ok bool) {
return getKmsKeyPayloadGetKeyIdAttributeTypeOk(o.KeyId)
}
// SetKeyId sets field value
func (o *KmsKeyPayload) SetKeyId(v KmsKeyPayloadGetKeyIdRetType) {
setKmsKeyPayloadGetKeyIdAttributeType(&o.KeyId, v)
}
// GetKeyRingId returns the KeyRingId field value
func (o *KmsKeyPayload) GetKeyRingId() (ret KmsKeyPayloadGetKeyRingIdRetType) {
ret, _ = o.GetKeyRingIdOk()
return ret
}
// GetKeyRingIdOk returns a tuple with the KeyRingId field value
// and a boolean to check if the value has been set.
func (o *KmsKeyPayload) GetKeyRingIdOk() (ret KmsKeyPayloadGetKeyRingIdRetType, ok bool) {
return getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(o.KeyRingId)
}
// SetKeyRingId sets field value
func (o *KmsKeyPayload) SetKeyRingId(v KmsKeyPayloadGetKeyRingIdRetType) {
setKmsKeyPayloadGetKeyRingIdAttributeType(&o.KeyRingId, v)
}
// GetKeyVersion returns the KeyVersion field value
func (o *KmsKeyPayload) GetKeyVersion() (ret KmsKeyPayloadGetKeyVersionRetType) {
ret, _ = o.GetKeyVersionOk()
return ret
}
// GetKeyVersionOk returns a tuple with the KeyVersion field value
// and a boolean to check if the value has been set.
func (o *KmsKeyPayload) GetKeyVersionOk() (ret KmsKeyPayloadGetKeyVersionRetType, ok bool) {
return getKmsKeyPayloadGetKeyVersionAttributeTypeOk(o.KeyVersion)
}
// SetKeyVersion sets field value
func (o *KmsKeyPayload) SetKeyVersion(v KmsKeyPayloadGetKeyVersionRetType) {
setKmsKeyPayloadGetKeyVersionAttributeType(&o.KeyVersion, v)
}
// GetServiceAccountEmail returns the ServiceAccountEmail field value
func (o *KmsKeyPayload) GetServiceAccountEmail() (ret KmsKeyPayloadGetServiceAccountEmailRetType) {
ret, _ = o.GetServiceAccountEmailOk()
return ret
}
// GetServiceAccountEmailOk returns a tuple with the ServiceAccountEmail field value
// and a boolean to check if the value has been set.
func (o *KmsKeyPayload) GetServiceAccountEmailOk() (ret KmsKeyPayloadGetServiceAccountEmailRetType, ok bool) {
return getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(o.ServiceAccountEmail)
}
// SetServiceAccountEmail sets field value
func (o *KmsKeyPayload) SetServiceAccountEmail(v KmsKeyPayloadGetServiceAccountEmailRetType) {
setKmsKeyPayloadGetServiceAccountEmailAttributeType(&o.ServiceAccountEmail, v)
}
func (o KmsKeyPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getKmsKeyPayloadGetKeyIdAttributeTypeOk(o.KeyId); ok {
toSerialize["KeyId"] = val
}
if val, ok := getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(o.KeyRingId); ok {
toSerialize["KeyRingId"] = val
}
if val, ok := getKmsKeyPayloadGetKeyVersionAttributeTypeOk(o.KeyVersion); ok {
toSerialize["KeyVersion"] = val
}
if val, ok := getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(o.ServiceAccountEmail); ok {
toSerialize["ServiceAccountEmail"] = val
}
return toSerialize, nil
}
type NullableKmsKeyPayload struct {
value *KmsKeyPayload
isSet bool
}
func (v NullableKmsKeyPayload) Get() *KmsKeyPayload {
return v.value
}
func (v *NullableKmsKeyPayload) Set(val *KmsKeyPayload) {
v.value = val
v.isSet = true
}
func (v NullableKmsKeyPayload) IsSet() bool {
return v.isSet
}
func (v *NullableKmsKeyPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKmsKeyPayload(val *KmsKeyPayload) *NullableKmsKeyPayload {
return &NullableKmsKeyPayload{value: val, isSet: true}
}
func (v NullableKmsKeyPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKmsKeyPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}