-
Notifications
You must be signed in to change notification settings - Fork 200
/
compute_client.go
380 lines (310 loc) · 13.2 KB
/
compute_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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
// Copyright 2020 Google LLC
//
// 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.
// *** DISCLAIMER ***
// Config Connector's go-client for CRDs is currently in ALPHA, which means
// that future versions of the go-client may include breaking changes.
// Please try it out and give us feedback!
// Code generated by main. DO NOT EDIT.
package v1beta1
import (
"net/http"
v1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/compute/v1beta1"
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type ComputeV1beta1Interface interface {
RESTClient() rest.Interface
ComputeAddressesGetter
ComputeBackendBucketsGetter
ComputeBackendServicesGetter
ComputeDisksGetter
ComputeExternalVPNGatewaysGetter
ComputeFirewallsGetter
ComputeFirewallPoliciesGetter
ComputeFirewallPolicyAssociationsGetter
ComputeFirewallPolicyRulesGetter
ComputeForwardingRulesGetter
ComputeHTTPHealthChecksGetter
ComputeHTTPSHealthChecksGetter
ComputeHealthChecksGetter
ComputeImagesGetter
ComputeInstancesGetter
ComputeInstanceGroupsGetter
ComputeInstanceGroupManagersGetter
ComputeInstanceTemplatesGetter
ComputeInterconnectAttachmentsGetter
ComputeNetworksGetter
ComputeNetworkEndpointGroupsGetter
ComputeNetworkFirewallPoliciesGetter
ComputeNetworkFirewallPolicyAssociationsGetter
ComputeNetworkPeeringsGetter
ComputeNodeGroupsGetter
ComputeNodeTemplatesGetter
ComputePacketMirroringsGetter
ComputeProjectMetadatasGetter
ComputeRegionNetworkEndpointGroupsGetter
ComputeReservationsGetter
ComputeResourcePoliciesGetter
ComputeRoutesGetter
ComputeRoutersGetter
ComputeRouterInterfacesGetter
ComputeRouterNATsGetter
ComputeRouterPeersGetter
ComputeSSLCertificatesGetter
ComputeSSLPoliciesGetter
ComputeSecurityPoliciesGetter
ComputeServiceAttachmentsGetter
ComputeSharedVPCHostProjectsGetter
ComputeSharedVPCServiceProjectsGetter
ComputeSnapshotsGetter
ComputeSubnetworksGetter
ComputeTargetGRPCProxiesGetter
ComputeTargetHTTPProxiesGetter
ComputeTargetHTTPSProxiesGetter
ComputeTargetInstancesGetter
ComputeTargetPoolsGetter
ComputeTargetSSLProxiesGetter
ComputeTargetTCPProxiesGetter
ComputeTargetVPNGatewaysGetter
ComputeURLMapsGetter
ComputeVPNGatewaysGetter
ComputeVPNTunnelsGetter
}
// ComputeV1beta1Client is used to interact with features provided by the compute.cnrm.cloud.google.com group.
type ComputeV1beta1Client struct {
restClient rest.Interface
}
func (c *ComputeV1beta1Client) ComputeAddresses(namespace string) ComputeAddressInterface {
return newComputeAddresses(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeBackendBuckets(namespace string) ComputeBackendBucketInterface {
return newComputeBackendBuckets(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeBackendServices(namespace string) ComputeBackendServiceInterface {
return newComputeBackendServices(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeDisks(namespace string) ComputeDiskInterface {
return newComputeDisks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeExternalVPNGateways(namespace string) ComputeExternalVPNGatewayInterface {
return newComputeExternalVPNGateways(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeFirewalls(namespace string) ComputeFirewallInterface {
return newComputeFirewalls(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeFirewallPolicies(namespace string) ComputeFirewallPolicyInterface {
return newComputeFirewallPolicies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeFirewallPolicyAssociations(namespace string) ComputeFirewallPolicyAssociationInterface {
return newComputeFirewallPolicyAssociations(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeFirewallPolicyRules(namespace string) ComputeFirewallPolicyRuleInterface {
return newComputeFirewallPolicyRules(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeForwardingRules(namespace string) ComputeForwardingRuleInterface {
return newComputeForwardingRules(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeHTTPHealthChecks(namespace string) ComputeHTTPHealthCheckInterface {
return newComputeHTTPHealthChecks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeHTTPSHealthChecks(namespace string) ComputeHTTPSHealthCheckInterface {
return newComputeHTTPSHealthChecks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeHealthChecks(namespace string) ComputeHealthCheckInterface {
return newComputeHealthChecks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeImages(namespace string) ComputeImageInterface {
return newComputeImages(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeInstances(namespace string) ComputeInstanceInterface {
return newComputeInstances(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeInstanceGroups(namespace string) ComputeInstanceGroupInterface {
return newComputeInstanceGroups(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeInstanceGroupManagers(namespace string) ComputeInstanceGroupManagerInterface {
return newComputeInstanceGroupManagers(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeInstanceTemplates(namespace string) ComputeInstanceTemplateInterface {
return newComputeInstanceTemplates(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeInterconnectAttachments(namespace string) ComputeInterconnectAttachmentInterface {
return newComputeInterconnectAttachments(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNetworks(namespace string) ComputeNetworkInterface {
return newComputeNetworks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNetworkEndpointGroups(namespace string) ComputeNetworkEndpointGroupInterface {
return newComputeNetworkEndpointGroups(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNetworkFirewallPolicies(namespace string) ComputeNetworkFirewallPolicyInterface {
return newComputeNetworkFirewallPolicies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNetworkFirewallPolicyAssociations(namespace string) ComputeNetworkFirewallPolicyAssociationInterface {
return newComputeNetworkFirewallPolicyAssociations(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNetworkPeerings(namespace string) ComputeNetworkPeeringInterface {
return newComputeNetworkPeerings(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNodeGroups(namespace string) ComputeNodeGroupInterface {
return newComputeNodeGroups(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeNodeTemplates(namespace string) ComputeNodeTemplateInterface {
return newComputeNodeTemplates(c, namespace)
}
func (c *ComputeV1beta1Client) ComputePacketMirrorings(namespace string) ComputePacketMirroringInterface {
return newComputePacketMirrorings(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeProjectMetadatas(namespace string) ComputeProjectMetadataInterface {
return newComputeProjectMetadatas(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRegionNetworkEndpointGroups(namespace string) ComputeRegionNetworkEndpointGroupInterface {
return newComputeRegionNetworkEndpointGroups(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeReservations(namespace string) ComputeReservationInterface {
return newComputeReservations(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeResourcePolicies(namespace string) ComputeResourcePolicyInterface {
return newComputeResourcePolicies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRoutes(namespace string) ComputeRouteInterface {
return newComputeRoutes(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRouters(namespace string) ComputeRouterInterface {
return newComputeRouters(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRouterInterfaces(namespace string) ComputeRouterInterfaceInterface {
return newComputeRouterInterfaces(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRouterNATs(namespace string) ComputeRouterNATInterface {
return newComputeRouterNATs(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeRouterPeers(namespace string) ComputeRouterPeerInterface {
return newComputeRouterPeers(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSSLCertificates(namespace string) ComputeSSLCertificateInterface {
return newComputeSSLCertificates(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSSLPolicies(namespace string) ComputeSSLPolicyInterface {
return newComputeSSLPolicies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSecurityPolicies(namespace string) ComputeSecurityPolicyInterface {
return newComputeSecurityPolicies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeServiceAttachments(namespace string) ComputeServiceAttachmentInterface {
return newComputeServiceAttachments(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSharedVPCHostProjects(namespace string) ComputeSharedVPCHostProjectInterface {
return newComputeSharedVPCHostProjects(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSharedVPCServiceProjects(namespace string) ComputeSharedVPCServiceProjectInterface {
return newComputeSharedVPCServiceProjects(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSnapshots(namespace string) ComputeSnapshotInterface {
return newComputeSnapshots(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeSubnetworks(namespace string) ComputeSubnetworkInterface {
return newComputeSubnetworks(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetGRPCProxies(namespace string) ComputeTargetGRPCProxyInterface {
return newComputeTargetGRPCProxies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetHTTPProxies(namespace string) ComputeTargetHTTPProxyInterface {
return newComputeTargetHTTPProxies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetHTTPSProxies(namespace string) ComputeTargetHTTPSProxyInterface {
return newComputeTargetHTTPSProxies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetInstances(namespace string) ComputeTargetInstanceInterface {
return newComputeTargetInstances(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetPools(namespace string) ComputeTargetPoolInterface {
return newComputeTargetPools(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetSSLProxies(namespace string) ComputeTargetSSLProxyInterface {
return newComputeTargetSSLProxies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetTCPProxies(namespace string) ComputeTargetTCPProxyInterface {
return newComputeTargetTCPProxies(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeTargetVPNGateways(namespace string) ComputeTargetVPNGatewayInterface {
return newComputeTargetVPNGateways(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeURLMaps(namespace string) ComputeURLMapInterface {
return newComputeURLMaps(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeVPNGateways(namespace string) ComputeVPNGatewayInterface {
return newComputeVPNGateways(c, namespace)
}
func (c *ComputeV1beta1Client) ComputeVPNTunnels(namespace string) ComputeVPNTunnelInterface {
return newComputeVPNTunnels(c, namespace)
}
// NewForConfig creates a new ComputeV1beta1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*ComputeV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
httpClient, err := rest.HTTPClientFor(&config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new ComputeV1beta1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ComputeV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientForConfigAndClient(&config, h)
if err != nil {
return nil, err
}
return &ComputeV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new ComputeV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *ComputeV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ComputeV1beta1Client for the given RESTClient.
func New(c rest.Interface) *ComputeV1beta1Client {
return &ComputeV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ComputeV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}