-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmodel_target_item_association.go
296 lines (249 loc) · 8.13 KB
/
model_target_item_association.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
/*
* 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"
)
// TargetItemAssociation TargetItemAssociation includes details of an association between a target and an item. Also, between targets in case of CredentialsLess target or Linked target.
type TargetItemAssociation struct {
AssocId *string `json:"assoc_id,omitempty"`
Attributes *map[string]string `json:"attributes,omitempty"`
ClusterId *int64 `json:"cluster_id,omitempty"`
ItemName *string `json:"item_name,omitempty"`
ItemType *string `json:"item_type,omitempty"`
Relationship *string `json:"relationship,omitempty"`
}
// NewTargetItemAssociation instantiates a new TargetItemAssociation 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 NewTargetItemAssociation() *TargetItemAssociation {
this := TargetItemAssociation{}
return &this
}
// NewTargetItemAssociationWithDefaults instantiates a new TargetItemAssociation 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 NewTargetItemAssociationWithDefaults() *TargetItemAssociation {
this := TargetItemAssociation{}
return &this
}
// GetAssocId returns the AssocId field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetAssocId() string {
if o == nil || o.AssocId == nil {
var ret string
return ret
}
return *o.AssocId
}
// GetAssocIdOk returns a tuple with the AssocId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetAssocIdOk() (*string, bool) {
if o == nil || o.AssocId == nil {
return nil, false
}
return o.AssocId, true
}
// HasAssocId returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasAssocId() bool {
if o != nil && o.AssocId != nil {
return true
}
return false
}
// SetAssocId gets a reference to the given string and assigns it to the AssocId field.
func (o *TargetItemAssociation) SetAssocId(v string) {
o.AssocId = &v
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetAttributes() map[string]string {
if o == nil || o.Attributes == nil {
var ret map[string]string
return ret
}
return *o.Attributes
}
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetAttributesOk() (*map[string]string, bool) {
if o == nil || o.Attributes == nil {
return nil, false
}
return o.Attributes, true
}
// HasAttributes returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasAttributes() bool {
if o != nil && o.Attributes != nil {
return true
}
return false
}
// SetAttributes gets a reference to the given map[string]string and assigns it to the Attributes field.
func (o *TargetItemAssociation) SetAttributes(v map[string]string) {
o.Attributes = &v
}
// GetClusterId returns the ClusterId field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetClusterId() int64 {
if o == nil || o.ClusterId == nil {
var ret int64
return ret
}
return *o.ClusterId
}
// GetClusterIdOk returns a tuple with the ClusterId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetClusterIdOk() (*int64, bool) {
if o == nil || o.ClusterId == nil {
return nil, false
}
return o.ClusterId, true
}
// HasClusterId returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasClusterId() bool {
if o != nil && o.ClusterId != nil {
return true
}
return false
}
// SetClusterId gets a reference to the given int64 and assigns it to the ClusterId field.
func (o *TargetItemAssociation) SetClusterId(v int64) {
o.ClusterId = &v
}
// GetItemName returns the ItemName field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetItemName() string {
if o == nil || o.ItemName == nil {
var ret string
return ret
}
return *o.ItemName
}
// GetItemNameOk returns a tuple with the ItemName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetItemNameOk() (*string, bool) {
if o == nil || o.ItemName == nil {
return nil, false
}
return o.ItemName, true
}
// HasItemName returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasItemName() bool {
if o != nil && o.ItemName != nil {
return true
}
return false
}
// SetItemName gets a reference to the given string and assigns it to the ItemName field.
func (o *TargetItemAssociation) SetItemName(v string) {
o.ItemName = &v
}
// GetItemType returns the ItemType field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetItemType() string {
if o == nil || o.ItemType == nil {
var ret string
return ret
}
return *o.ItemType
}
// GetItemTypeOk returns a tuple with the ItemType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetItemTypeOk() (*string, bool) {
if o == nil || o.ItemType == nil {
return nil, false
}
return o.ItemType, true
}
// HasItemType returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasItemType() bool {
if o != nil && o.ItemType != nil {
return true
}
return false
}
// SetItemType gets a reference to the given string and assigns it to the ItemType field.
func (o *TargetItemAssociation) SetItemType(v string) {
o.ItemType = &v
}
// GetRelationship returns the Relationship field value if set, zero value otherwise.
func (o *TargetItemAssociation) GetRelationship() string {
if o == nil || o.Relationship == nil {
var ret string
return ret
}
return *o.Relationship
}
// GetRelationshipOk returns a tuple with the Relationship field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TargetItemAssociation) GetRelationshipOk() (*string, bool) {
if o == nil || o.Relationship == nil {
return nil, false
}
return o.Relationship, true
}
// HasRelationship returns a boolean if a field has been set.
func (o *TargetItemAssociation) HasRelationship() bool {
if o != nil && o.Relationship != nil {
return true
}
return false
}
// SetRelationship gets a reference to the given string and assigns it to the Relationship field.
func (o *TargetItemAssociation) SetRelationship(v string) {
o.Relationship = &v
}
func (o TargetItemAssociation) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.AssocId != nil {
toSerialize["assoc_id"] = o.AssocId
}
if o.Attributes != nil {
toSerialize["attributes"] = o.Attributes
}
if o.ClusterId != nil {
toSerialize["cluster_id"] = o.ClusterId
}
if o.ItemName != nil {
toSerialize["item_name"] = o.ItemName
}
if o.ItemType != nil {
toSerialize["item_type"] = o.ItemType
}
if o.Relationship != nil {
toSerialize["relationship"] = o.Relationship
}
return json.Marshal(toSerialize)
}
type NullableTargetItemAssociation struct {
value *TargetItemAssociation
isSet bool
}
func (v NullableTargetItemAssociation) Get() *TargetItemAssociation {
return v.value
}
func (v *NullableTargetItemAssociation) Set(val *TargetItemAssociation) {
v.value = val
v.isSet = true
}
func (v NullableTargetItemAssociation) IsSet() bool {
return v.isSet
}
func (v *NullableTargetItemAssociation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTargetItemAssociation(val *TargetItemAssociation) *NullableTargetItemAssociation {
return &NullableTargetItemAssociation{value: val, isSet: true}
}
func (v NullableTargetItemAssociation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTargetItemAssociation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}