/
model_enterprise_osd_cluster_payload.go
200 lines (167 loc) · 6.66 KB
/
model_enterprise_osd_cluster_payload.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
/*
* Kafka Management API
*
* Kafka Management API is a REST API to manage Kafka instances
*
* API version: 1.15.0
* Contact: rhosak-support@redhat.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package kafkamgmtclient
import (
"encoding/json"
)
// EnterpriseOsdClusterPayload Schema for the request body sent to /clusters POST
type EnterpriseOsdClusterPayload struct {
// Sets whether Kafkas created on this data plane cluster have to be accessed via private network
AccessKafkasViaPrivateNetwork bool `json:"access_kafkas_via_private_network"`
// The data plane cluster ID. This is the ID of the cluster obtained from OpenShift Cluster Manager (OCM) API
ClusterId string `json:"cluster_id"`
// dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
ClusterIngressDnsName string `json:"cluster_ingress_dns_name"`
// The node count given to the created kafka machine pool. The machine pool must be created via /api/clusters_mgmt/v1/clusters/<cluster_id>/machine_pools prior to passing this value. The created machine pool must have a `bf2.org/kafkaInstanceProfileType=standard` label and a `bf2.org/kafkaInstanceProfileType=standard:NoExecute` taint. The name of the machine pool must be `kafka-standard` The node count value has to be a multiple of 3 with a minimum of 3 nodes.
KafkaMachinePoolNodeCount int32 `json:"kafka_machine_pool_node_count"`
}
// NewEnterpriseOsdClusterPayload instantiates a new EnterpriseOsdClusterPayload 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 NewEnterpriseOsdClusterPayload(accessKafkasViaPrivateNetwork bool, clusterId string, clusterIngressDnsName string, kafkaMachinePoolNodeCount int32) *EnterpriseOsdClusterPayload {
this := EnterpriseOsdClusterPayload{}
this.AccessKafkasViaPrivateNetwork = accessKafkasViaPrivateNetwork
this.ClusterId = clusterId
this.ClusterIngressDnsName = clusterIngressDnsName
this.KafkaMachinePoolNodeCount = kafkaMachinePoolNodeCount
return &this
}
// NewEnterpriseOsdClusterPayloadWithDefaults instantiates a new EnterpriseOsdClusterPayload 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 NewEnterpriseOsdClusterPayloadWithDefaults() *EnterpriseOsdClusterPayload {
this := EnterpriseOsdClusterPayload{}
return &this
}
// GetAccessKafkasViaPrivateNetwork returns the AccessKafkasViaPrivateNetwork field value
func (o *EnterpriseOsdClusterPayload) GetAccessKafkasViaPrivateNetwork() bool {
if o == nil {
var ret bool
return ret
}
return o.AccessKafkasViaPrivateNetwork
}
// GetAccessKafkasViaPrivateNetworkOk returns a tuple with the AccessKafkasViaPrivateNetwork field value
// and a boolean to check if the value has been set.
func (o *EnterpriseOsdClusterPayload) GetAccessKafkasViaPrivateNetworkOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.AccessKafkasViaPrivateNetwork, true
}
// SetAccessKafkasViaPrivateNetwork sets field value
func (o *EnterpriseOsdClusterPayload) SetAccessKafkasViaPrivateNetwork(v bool) {
o.AccessKafkasViaPrivateNetwork = v
}
// GetClusterId returns the ClusterId field value
func (o *EnterpriseOsdClusterPayload) GetClusterId() string {
if o == nil {
var ret string
return ret
}
return o.ClusterId
}
// GetClusterIdOk returns a tuple with the ClusterId field value
// and a boolean to check if the value has been set.
func (o *EnterpriseOsdClusterPayload) GetClusterIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ClusterId, true
}
// SetClusterId sets field value
func (o *EnterpriseOsdClusterPayload) SetClusterId(v string) {
o.ClusterId = v
}
// GetClusterIngressDnsName returns the ClusterIngressDnsName field value
func (o *EnterpriseOsdClusterPayload) GetClusterIngressDnsName() string {
if o == nil {
var ret string
return ret
}
return o.ClusterIngressDnsName
}
// GetClusterIngressDnsNameOk returns a tuple with the ClusterIngressDnsName field value
// and a boolean to check if the value has been set.
func (o *EnterpriseOsdClusterPayload) GetClusterIngressDnsNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ClusterIngressDnsName, true
}
// SetClusterIngressDnsName sets field value
func (o *EnterpriseOsdClusterPayload) SetClusterIngressDnsName(v string) {
o.ClusterIngressDnsName = v
}
// GetKafkaMachinePoolNodeCount returns the KafkaMachinePoolNodeCount field value
func (o *EnterpriseOsdClusterPayload) GetKafkaMachinePoolNodeCount() int32 {
if o == nil {
var ret int32
return ret
}
return o.KafkaMachinePoolNodeCount
}
// GetKafkaMachinePoolNodeCountOk returns a tuple with the KafkaMachinePoolNodeCount field value
// and a boolean to check if the value has been set.
func (o *EnterpriseOsdClusterPayload) GetKafkaMachinePoolNodeCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.KafkaMachinePoolNodeCount, true
}
// SetKafkaMachinePoolNodeCount sets field value
func (o *EnterpriseOsdClusterPayload) SetKafkaMachinePoolNodeCount(v int32) {
o.KafkaMachinePoolNodeCount = v
}
func (o EnterpriseOsdClusterPayload) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["access_kafkas_via_private_network"] = o.AccessKafkasViaPrivateNetwork
}
if true {
toSerialize["cluster_id"] = o.ClusterId
}
if true {
toSerialize["cluster_ingress_dns_name"] = o.ClusterIngressDnsName
}
if true {
toSerialize["kafka_machine_pool_node_count"] = o.KafkaMachinePoolNodeCount
}
return json.Marshal(toSerialize)
}
type NullableEnterpriseOsdClusterPayload struct {
value *EnterpriseOsdClusterPayload
isSet bool
}
func (v NullableEnterpriseOsdClusterPayload) Get() *EnterpriseOsdClusterPayload {
return v.value
}
func (v *NullableEnterpriseOsdClusterPayload) Set(val *EnterpriseOsdClusterPayload) {
v.value = val
v.isSet = true
}
func (v NullableEnterpriseOsdClusterPayload) IsSet() bool {
return v.isSet
}
func (v *NullableEnterpriseOsdClusterPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEnterpriseOsdClusterPayload(val *EnterpriseOsdClusterPayload) *NullableEnterpriseOsdClusterPayload {
return &NullableEnterpriseOsdClusterPayload{value: val, isSet: true}
}
func (v NullableEnterpriseOsdClusterPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEnterpriseOsdClusterPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}