-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_geo_sharding.go
148 lines (124 loc) · 5.13 KB
/
model_geo_sharding.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// GeoSharding struct for GeoSharding
type GeoSharding struct {
// List that contains comma-separated key value pairs to map zones to geographic regions. These pairs map an ISO 3166-1a2 location code, with an ISO 3166-2 subdivision code when possible, to a unique 24-hexadecimal string that identifies the custom zone. This parameter returns an empty object if no custom zones exist.
// Read only field.
CustomZoneMapping *map[string]string `json:"customZoneMapping,omitempty"`
// List that contains a namespace for a Global Cluster. MongoDB Cloud manages this cluster.
// Read only field.
ManagedNamespaces *[]ManagedNamespaces `json:"managedNamespaces,omitempty"`
// Boolean that controls which management mode the Global Cluster is operating under. If this parameter is true Self-Managed Sharding is enabled and users are in control of the zone sharding within the Global Cluster. If this parameter is false Atlas-Managed Sharding is enabled and Atlas is control of zone sharding within the Global Cluster.
// Read only field.
SelfManagedSharding *bool `json:"selfManagedSharding,omitempty"`
}
// NewGeoSharding instantiates a new GeoSharding 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 NewGeoSharding() *GeoSharding {
this := GeoSharding{}
return &this
}
// NewGeoShardingWithDefaults instantiates a new GeoSharding 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 NewGeoShardingWithDefaults() *GeoSharding {
this := GeoSharding{}
return &this
}
// GetCustomZoneMapping returns the CustomZoneMapping field value if set, zero value otherwise
func (o *GeoSharding) GetCustomZoneMapping() map[string]string {
if o == nil || IsNil(o.CustomZoneMapping) {
var ret map[string]string
return ret
}
return *o.CustomZoneMapping
}
// GetCustomZoneMappingOk returns a tuple with the CustomZoneMapping field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GeoSharding) GetCustomZoneMappingOk() (*map[string]string, bool) {
if o == nil || IsNil(o.CustomZoneMapping) {
return nil, false
}
return o.CustomZoneMapping, true
}
// HasCustomZoneMapping returns a boolean if a field has been set.
func (o *GeoSharding) HasCustomZoneMapping() bool {
if o != nil && !IsNil(o.CustomZoneMapping) {
return true
}
return false
}
// SetCustomZoneMapping gets a reference to the given map[string]string and assigns it to the CustomZoneMapping field.
func (o *GeoSharding) SetCustomZoneMapping(v map[string]string) {
o.CustomZoneMapping = &v
}
// GetManagedNamespaces returns the ManagedNamespaces field value if set, zero value otherwise
func (o *GeoSharding) GetManagedNamespaces() []ManagedNamespaces {
if o == nil || IsNil(o.ManagedNamespaces) {
var ret []ManagedNamespaces
return ret
}
return *o.ManagedNamespaces
}
// GetManagedNamespacesOk returns a tuple with the ManagedNamespaces field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GeoSharding) GetManagedNamespacesOk() (*[]ManagedNamespaces, bool) {
if o == nil || IsNil(o.ManagedNamespaces) {
return nil, false
}
return o.ManagedNamespaces, true
}
// HasManagedNamespaces returns a boolean if a field has been set.
func (o *GeoSharding) HasManagedNamespaces() bool {
if o != nil && !IsNil(o.ManagedNamespaces) {
return true
}
return false
}
// SetManagedNamespaces gets a reference to the given []ManagedNamespaces and assigns it to the ManagedNamespaces field.
func (o *GeoSharding) SetManagedNamespaces(v []ManagedNamespaces) {
o.ManagedNamespaces = &v
}
// GetSelfManagedSharding returns the SelfManagedSharding field value if set, zero value otherwise
func (o *GeoSharding) GetSelfManagedSharding() bool {
if o == nil || IsNil(o.SelfManagedSharding) {
var ret bool
return ret
}
return *o.SelfManagedSharding
}
// GetSelfManagedShardingOk returns a tuple with the SelfManagedSharding field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GeoSharding) GetSelfManagedShardingOk() (*bool, bool) {
if o == nil || IsNil(o.SelfManagedSharding) {
return nil, false
}
return o.SelfManagedSharding, true
}
// HasSelfManagedSharding returns a boolean if a field has been set.
func (o *GeoSharding) HasSelfManagedSharding() bool {
if o != nil && !IsNil(o.SelfManagedSharding) {
return true
}
return false
}
// SetSelfManagedSharding gets a reference to the given bool and assigns it to the SelfManagedSharding field.
func (o *GeoSharding) SetSelfManagedSharding(v bool) {
o.SelfManagedSharding = &v
}
func (o GeoSharding) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GeoSharding) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
return toSerialize, nil
}