-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodel_atlas_entity_with_ext_info.go
More file actions
191 lines (158 loc) · 5.39 KB
/
model_atlas_entity_with_ext_info.go
File metadata and controls
191 lines (158 loc) · 5.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
/*
Confluent Schema Registry
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package schemaregistry
import (
"encoding/json"
)
import (
"reflect"
)
// AtlasEntityWithExtInfo struct for AtlasEntityWithExtInfo
type AtlasEntityWithExtInfo struct {
ReferredEntities *map[string]AtlasEntity `json:"referredEntities,omitempty"`
Entity *AtlasEntity `json:"entity,omitempty"`
}
// NewAtlasEntityWithExtInfo instantiates a new AtlasEntityWithExtInfo 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 NewAtlasEntityWithExtInfo() *AtlasEntityWithExtInfo {
this := AtlasEntityWithExtInfo{}
return &this
}
// NewAtlasEntityWithExtInfoWithDefaults instantiates a new AtlasEntityWithExtInfo 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 NewAtlasEntityWithExtInfoWithDefaults() *AtlasEntityWithExtInfo {
this := AtlasEntityWithExtInfo{}
return &this
}
// GetReferredEntities returns the ReferredEntities field value if set, zero value otherwise.
func (o *AtlasEntityWithExtInfo) GetReferredEntities() map[string]AtlasEntity {
if o == nil || o.ReferredEntities == nil {
var ret map[string]AtlasEntity
return ret
}
return *o.ReferredEntities
}
// GetReferredEntitiesOk returns a tuple with the ReferredEntities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AtlasEntityWithExtInfo) GetReferredEntitiesOk() (*map[string]AtlasEntity, bool) {
if o == nil || o.ReferredEntities == nil {
return nil, false
}
return o.ReferredEntities, true
}
// HasReferredEntities returns a boolean if a field has been set.
func (o *AtlasEntityWithExtInfo) HasReferredEntities() bool {
if o != nil && o.ReferredEntities != nil {
return true
}
return false
}
// SetReferredEntities gets a reference to the given map[string]AtlasEntity and assigns it to the ReferredEntities field.
func (o *AtlasEntityWithExtInfo) SetReferredEntities(v map[string]AtlasEntity) {
o.ReferredEntities = &v
}
// GetEntity returns the Entity field value if set, zero value otherwise.
func (o *AtlasEntityWithExtInfo) GetEntity() AtlasEntity {
if o == nil || o.Entity == nil {
var ret AtlasEntity
return ret
}
return *o.Entity
}
// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AtlasEntityWithExtInfo) GetEntityOk() (*AtlasEntity, bool) {
if o == nil || o.Entity == nil {
return nil, false
}
return o.Entity, true
}
// HasEntity returns a boolean if a field has been set.
func (o *AtlasEntityWithExtInfo) HasEntity() bool {
if o != nil && o.Entity != nil {
return true
}
return false
}
// SetEntity gets a reference to the given AtlasEntity and assigns it to the Entity field.
func (o *AtlasEntityWithExtInfo) SetEntity(v AtlasEntity) {
o.Entity = &v
}
// Redact resets all sensitive fields to their zero value.
func (o *AtlasEntityWithExtInfo) Redact() {
o.recurseRedact(o.ReferredEntities)
o.recurseRedact(o.Entity)
}
func (o *AtlasEntityWithExtInfo) recurseRedact(v interface{}) {
type redactor interface {
Redact()
}
if r, ok := v.(redactor); ok {
r.Redact()
} else {
val := reflect.ValueOf(v)
if val.Kind() == reflect.Ptr {
val = val.Elem()
}
switch val.Kind() {
case reflect.Slice, reflect.Array:
for i := 0; i < val.Len(); i++ {
// support data types declared without pointers
o.recurseRedact(val.Index(i).Interface())
// ... and data types that were declared without but need pointers (for Redact)
if val.Index(i).CanAddr() {
o.recurseRedact(val.Index(i).Addr().Interface())
}
}
}
}
}
func (o AtlasEntityWithExtInfo) zeroField(v interface{}) {
p := reflect.ValueOf(v).Elem()
p.Set(reflect.Zero(p.Type()))
}
func (o AtlasEntityWithExtInfo) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.ReferredEntities != nil {
toSerialize["referredEntities"] = o.ReferredEntities
}
if o.Entity != nil {
toSerialize["entity"] = o.Entity
}
return json.Marshal(toSerialize)
}
type NullableAtlasEntityWithExtInfo struct {
value *AtlasEntityWithExtInfo
isSet bool
}
func (v NullableAtlasEntityWithExtInfo) Get() *AtlasEntityWithExtInfo {
return v.value
}
func (v *NullableAtlasEntityWithExtInfo) Set(val *AtlasEntityWithExtInfo) {
v.value = val
v.isSet = true
}
func (v NullableAtlasEntityWithExtInfo) IsSet() bool {
return v.isSet
}
func (v *NullableAtlasEntityWithExtInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAtlasEntityWithExtInfo(val *AtlasEntityWithExtInfo) *NullableAtlasEntityWithExtInfo {
return &NullableAtlasEntityWithExtInfo{value: val, isSet: true}
}
func (v NullableAtlasEntityWithExtInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAtlasEntityWithExtInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}