-
Notifications
You must be signed in to change notification settings - Fork 156
/
kubermatic_kubernetes_platform_api_client.go
327 lines (264 loc) · 11.4 KB
/
kubermatic_kubernetes_platform_api_client.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
// Code generated by go-swagger; DO NOT EDIT.
package client
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
httptransport "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/addon"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/admin"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/aks"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/alibaba"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/allowedregistries"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/allowedregistry"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/anexia"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/aws"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/azure"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/backupcredentials"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/cniversion"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/constraint"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/constraints"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/constrainttemplates"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/credentials"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/datacenter"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/digitalocean"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/eks"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/etcdbackupconfig"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/etcdrestore"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/gcp"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/get"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/gke"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/hetzner"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/kubevirt"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/metering"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/metric"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/mlaadminsetting"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/nutanix"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/openstack"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/operations"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/packet"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/preset"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/project"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/rulegroup"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/seed"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/serviceaccounts"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/settings"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/tokens"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/user"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/users"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/version"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/versions"
"k8c.io/kubermatic/v2/pkg/test/e2e/utils/apiclient/client/vsphere"
)
// Default kubermatic kubernetes platform API HTTP client.
var Default = NewHTTPClient(nil)
const (
// DefaultHost is the default Host
// found in Meta (info) section of spec file
DefaultHost string = "dev.kubermatic.io"
// DefaultBasePath is the default BasePath
// found in Meta (info) section of spec file
DefaultBasePath string = "/"
)
// DefaultSchemes are the default schemes found in Meta (info) section of spec file
var DefaultSchemes = []string{"https"}
// NewHTTPClient creates a new kubermatic kubernetes platform API HTTP client.
func NewHTTPClient(formats strfmt.Registry) *KubermaticKubernetesPlatformAPI {
return NewHTTPClientWithConfig(formats, nil)
}
// NewHTTPClientWithConfig creates a new kubermatic kubernetes platform API HTTP client,
// using a customizable transport config.
func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *KubermaticKubernetesPlatformAPI {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
}
// New creates a new kubermatic kubernetes platform API client
func New(transport runtime.ClientTransport, formats strfmt.Registry) *KubermaticKubernetesPlatformAPI {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(KubermaticKubernetesPlatformAPI)
cli.Transport = transport
cli.Addon = addon.New(transport, formats)
cli.Admin = admin.New(transport, formats)
cli.Aks = aks.New(transport, formats)
cli.Alibaba = alibaba.New(transport, formats)
cli.Allowedregistries = allowedregistries.New(transport, formats)
cli.Allowedregistry = allowedregistry.New(transport, formats)
cli.Anexia = anexia.New(transport, formats)
cli.Aws = aws.New(transport, formats)
cli.Azure = azure.New(transport, formats)
cli.Backupcredentials = backupcredentials.New(transport, formats)
cli.Cniversion = cniversion.New(transport, formats)
cli.Constraint = constraint.New(transport, formats)
cli.Constraints = constraints.New(transport, formats)
cli.Constrainttemplates = constrainttemplates.New(transport, formats)
cli.Credentials = credentials.New(transport, formats)
cli.Datacenter = datacenter.New(transport, formats)
cli.Digitalocean = digitalocean.New(transport, formats)
cli.Eks = eks.New(transport, formats)
cli.Etcdbackupconfig = etcdbackupconfig.New(transport, formats)
cli.Etcdrestore = etcdrestore.New(transport, formats)
cli.Gcp = gcp.New(transport, formats)
cli.Get = get.New(transport, formats)
cli.Gke = gke.New(transport, formats)
cli.Hetzner = hetzner.New(transport, formats)
cli.Kubevirt = kubevirt.New(transport, formats)
cli.Metering = metering.New(transport, formats)
cli.Metric = metric.New(transport, formats)
cli.Mlaadminsetting = mlaadminsetting.New(transport, formats)
cli.Nutanix = nutanix.New(transport, formats)
cli.Openstack = openstack.New(transport, formats)
cli.Operations = operations.New(transport, formats)
cli.Packet = packet.New(transport, formats)
cli.Preset = preset.New(transport, formats)
cli.Project = project.New(transport, formats)
cli.Rulegroup = rulegroup.New(transport, formats)
cli.Seed = seed.New(transport, formats)
cli.Serviceaccounts = serviceaccounts.New(transport, formats)
cli.Settings = settings.New(transport, formats)
cli.Tokens = tokens.New(transport, formats)
cli.User = user.New(transport, formats)
cli.Users = users.New(transport, formats)
cli.Version = version.New(transport, formats)
cli.Versions = versions.New(transport, formats)
cli.Vsphere = vsphere.New(transport, formats)
return cli
}
// DefaultTransportConfig creates a TransportConfig with the
// default settings taken from the meta section of the spec file.
func DefaultTransportConfig() *TransportConfig {
return &TransportConfig{
Host: DefaultHost,
BasePath: DefaultBasePath,
Schemes: DefaultSchemes,
}
}
// TransportConfig contains the transport related info,
// found in the meta section of the spec file.
type TransportConfig struct {
Host string
BasePath string
Schemes []string
}
// WithHost overrides the default host,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
}
// WithBasePath overrides the default basePath,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
}
// WithSchemes overrides the default schemes,
// provided by the meta section of the spec file.
func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
}
// KubermaticKubernetesPlatformAPI is a client for kubermatic kubernetes platform API
type KubermaticKubernetesPlatformAPI struct {
Addon addon.ClientService
Admin admin.ClientService
Aks aks.ClientService
Alibaba alibaba.ClientService
Allowedregistries allowedregistries.ClientService
Allowedregistry allowedregistry.ClientService
Anexia anexia.ClientService
Aws aws.ClientService
Azure azure.ClientService
Backupcredentials backupcredentials.ClientService
Cniversion cniversion.ClientService
Constraint constraint.ClientService
Constraints constraints.ClientService
Constrainttemplates constrainttemplates.ClientService
Credentials credentials.ClientService
Datacenter datacenter.ClientService
Digitalocean digitalocean.ClientService
Eks eks.ClientService
Etcdbackupconfig etcdbackupconfig.ClientService
Etcdrestore etcdrestore.ClientService
Gcp gcp.ClientService
Get get.ClientService
Gke gke.ClientService
Hetzner hetzner.ClientService
Kubevirt kubevirt.ClientService
Metering metering.ClientService
Metric metric.ClientService
Mlaadminsetting mlaadminsetting.ClientService
Nutanix nutanix.ClientService
Openstack openstack.ClientService
Operations operations.ClientService
Packet packet.ClientService
Preset preset.ClientService
Project project.ClientService
Rulegroup rulegroup.ClientService
Seed seed.ClientService
Serviceaccounts serviceaccounts.ClientService
Settings settings.ClientService
Tokens tokens.ClientService
User user.ClientService
Users users.ClientService
Version version.ClientService
Versions versions.ClientService
Vsphere vsphere.ClientService
Transport runtime.ClientTransport
}
// SetTransport changes the transport on the client and all its subresources
func (c *KubermaticKubernetesPlatformAPI) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.Addon.SetTransport(transport)
c.Admin.SetTransport(transport)
c.Aks.SetTransport(transport)
c.Alibaba.SetTransport(transport)
c.Allowedregistries.SetTransport(transport)
c.Allowedregistry.SetTransport(transport)
c.Anexia.SetTransport(transport)
c.Aws.SetTransport(transport)
c.Azure.SetTransport(transport)
c.Backupcredentials.SetTransport(transport)
c.Cniversion.SetTransport(transport)
c.Constraint.SetTransport(transport)
c.Constraints.SetTransport(transport)
c.Constrainttemplates.SetTransport(transport)
c.Credentials.SetTransport(transport)
c.Datacenter.SetTransport(transport)
c.Digitalocean.SetTransport(transport)
c.Eks.SetTransport(transport)
c.Etcdbackupconfig.SetTransport(transport)
c.Etcdrestore.SetTransport(transport)
c.Gcp.SetTransport(transport)
c.Get.SetTransport(transport)
c.Gke.SetTransport(transport)
c.Hetzner.SetTransport(transport)
c.Kubevirt.SetTransport(transport)
c.Metering.SetTransport(transport)
c.Metric.SetTransport(transport)
c.Mlaadminsetting.SetTransport(transport)
c.Nutanix.SetTransport(transport)
c.Openstack.SetTransport(transport)
c.Operations.SetTransport(transport)
c.Packet.SetTransport(transport)
c.Preset.SetTransport(transport)
c.Project.SetTransport(transport)
c.Rulegroup.SetTransport(transport)
c.Seed.SetTransport(transport)
c.Serviceaccounts.SetTransport(transport)
c.Settings.SetTransport(transport)
c.Tokens.SetTransport(transport)
c.User.SetTransport(transport)
c.Users.SetTransport(transport)
c.Version.SetTransport(transport)
c.Versions.SetTransport(transport)
c.Vsphere.SetTransport(transport)
}