-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_atlas_cluster_outage_simulation_outage_filter.go
154 lines (130 loc) · 4.98 KB
/
model_atlas_cluster_outage_simulation_outage_filter.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
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
)
// AtlasClusterOutageSimulationOutageFilter struct for AtlasClusterOutageSimulationOutageFilter
type AtlasClusterOutageSimulationOutageFilter struct {
// The cloud provider of the region that undergoes the outage simulation.
CloudProvider *string `json:"cloudProvider,omitempty"`
// The name of the region to undergo an outage simulation.
RegionName *string `json:"regionName,omitempty"`
// The type of cluster outage to simulate. | Type | Description | |------------|-------------| | `REGION` | Simulates a cluster outage for a region.|
Type *string `json:"type,omitempty"`
}
// NewAtlasClusterOutageSimulationOutageFilter instantiates a new AtlasClusterOutageSimulationOutageFilter 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 NewAtlasClusterOutageSimulationOutageFilter() *AtlasClusterOutageSimulationOutageFilter {
this := AtlasClusterOutageSimulationOutageFilter{}
return &this
}
// NewAtlasClusterOutageSimulationOutageFilterWithDefaults instantiates a new AtlasClusterOutageSimulationOutageFilter 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 NewAtlasClusterOutageSimulationOutageFilterWithDefaults() *AtlasClusterOutageSimulationOutageFilter {
this := AtlasClusterOutageSimulationOutageFilter{}
return &this
}
// GetCloudProvider returns the CloudProvider field value if set, zero value otherwise
func (o *AtlasClusterOutageSimulationOutageFilter) GetCloudProvider() string {
if o == nil || IsNil(o.CloudProvider) {
var ret string
return ret
}
return *o.CloudProvider
}
// GetCloudProviderOk returns a tuple with the CloudProvider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) GetCloudProviderOk() (*string, bool) {
if o == nil || IsNil(o.CloudProvider) {
return nil, false
}
return o.CloudProvider, true
}
// HasCloudProvider returns a boolean if a field has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) HasCloudProvider() bool {
if o != nil && !IsNil(o.CloudProvider) {
return true
}
return false
}
// SetCloudProvider gets a reference to the given string and assigns it to the CloudProvider field.
func (o *AtlasClusterOutageSimulationOutageFilter) SetCloudProvider(v string) {
o.CloudProvider = &v
}
// GetRegionName returns the RegionName field value if set, zero value otherwise
func (o *AtlasClusterOutageSimulationOutageFilter) GetRegionName() string {
if o == nil || IsNil(o.RegionName) {
var ret string
return ret
}
return *o.RegionName
}
// GetRegionNameOk returns a tuple with the RegionName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) GetRegionNameOk() (*string, bool) {
if o == nil || IsNil(o.RegionName) {
return nil, false
}
return o.RegionName, true
}
// HasRegionName returns a boolean if a field has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) HasRegionName() bool {
if o != nil && !IsNil(o.RegionName) {
return true
}
return false
}
// SetRegionName gets a reference to the given string and assigns it to the RegionName field.
func (o *AtlasClusterOutageSimulationOutageFilter) SetRegionName(v string) {
o.RegionName = &v
}
// GetType returns the Type field value if set, zero value otherwise
func (o *AtlasClusterOutageSimulationOutageFilter) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *AtlasClusterOutageSimulationOutageFilter) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *AtlasClusterOutageSimulationOutageFilter) SetType(v string) {
o.Type = &v
}
func (o AtlasClusterOutageSimulationOutageFilter) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AtlasClusterOutageSimulationOutageFilter) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CloudProvider) {
toSerialize["cloudProvider"] = o.CloudProvider
}
if !IsNil(o.RegionName) {
toSerialize["regionName"] = o.RegionName
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
return toSerialize, nil
}