/
model_dedicated_cluster_create_specification.go
122 lines (105 loc) · 4.91 KB
/
model_dedicated_cluster_create_specification.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
// Copyright 2023 The Cockroach Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
// CockroachDB Cloud API
// API version: 2023-04-10
package client
// DedicatedClusterCreateSpecification struct for DedicatedClusterCreateSpecification.
type DedicatedClusterCreateSpecification struct {
// The CockroachDB version for the cluster. The current version is used if omitted.
CockroachVersion *string `json:"cockroach_version,omitempty"`
Hardware DedicatedHardwareCreateSpecification `json:"hardware"`
NetworkVisibility *NetworkVisibilityType `json:"network_visibility,omitempty"`
// Region keys should match the cloud provider's zone code. For example, for Oregon, set region_name to \"us-west2\" for GCP and \"us-west-2\" for AWS. Values represent the node count.
RegionNodes map[string]int32 `json:"region_nodes"`
// Preview: RestrictEgressTraffic if set, results in an egress traffic policy of default-deny at creation time.
RestrictEgressTraffic *bool `json:"restrict_egress_traffic,omitempty"`
}
// NewDedicatedClusterCreateSpecification instantiates a new DedicatedClusterCreateSpecification 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 NewDedicatedClusterCreateSpecification(hardware DedicatedHardwareCreateSpecification, regionNodes map[string]int32) *DedicatedClusterCreateSpecification {
p := DedicatedClusterCreateSpecification{}
p.Hardware = hardware
p.RegionNodes = regionNodes
return &p
}
// NewDedicatedClusterCreateSpecificationWithDefaults instantiates a new DedicatedClusterCreateSpecification 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 NewDedicatedClusterCreateSpecificationWithDefaults() *DedicatedClusterCreateSpecification {
p := DedicatedClusterCreateSpecification{}
return &p
}
// GetCockroachVersion returns the CockroachVersion field value if set, zero value otherwise.
func (o *DedicatedClusterCreateSpecification) GetCockroachVersion() string {
if o == nil || o.CockroachVersion == nil {
var ret string
return ret
}
return *o.CockroachVersion
}
// SetCockroachVersion gets a reference to the given string and assigns it to the CockroachVersion field.
func (o *DedicatedClusterCreateSpecification) SetCockroachVersion(v string) {
o.CockroachVersion = &v
}
// GetHardware returns the Hardware field value.
func (o *DedicatedClusterCreateSpecification) GetHardware() DedicatedHardwareCreateSpecification {
if o == nil {
var ret DedicatedHardwareCreateSpecification
return ret
}
return o.Hardware
}
// SetHardware sets field value.
func (o *DedicatedClusterCreateSpecification) SetHardware(v DedicatedHardwareCreateSpecification) {
o.Hardware = v
}
// GetNetworkVisibility returns the NetworkVisibility field value if set, zero value otherwise.
func (o *DedicatedClusterCreateSpecification) GetNetworkVisibility() NetworkVisibilityType {
if o == nil || o.NetworkVisibility == nil {
var ret NetworkVisibilityType
return ret
}
return *o.NetworkVisibility
}
// SetNetworkVisibility gets a reference to the given NetworkVisibilityType and assigns it to the NetworkVisibility field.
func (o *DedicatedClusterCreateSpecification) SetNetworkVisibility(v NetworkVisibilityType) {
o.NetworkVisibility = &v
}
// GetRegionNodes returns the RegionNodes field value.
func (o *DedicatedClusterCreateSpecification) GetRegionNodes() map[string]int32 {
if o == nil {
var ret map[string]int32
return ret
}
return o.RegionNodes
}
// SetRegionNodes sets field value.
func (o *DedicatedClusterCreateSpecification) SetRegionNodes(v map[string]int32) {
o.RegionNodes = v
}
// GetRestrictEgressTraffic returns the RestrictEgressTraffic field value if set, zero value otherwise.
func (o *DedicatedClusterCreateSpecification) GetRestrictEgressTraffic() bool {
if o == nil || o.RestrictEgressTraffic == nil {
var ret bool
return ret
}
return *o.RestrictEgressTraffic
}
// SetRestrictEgressTraffic gets a reference to the given bool and assigns it to the RestrictEgressTraffic field.
func (o *DedicatedClusterCreateSpecification) SetRestrictEgressTraffic(v bool) {
o.RestrictEgressTraffic = &v
}