blob: 1961ffc7cda0a118f78590191dbf97956aa926a9 [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Code generated by client-gen. DO NOT EDIT.
18
19package v1beta1
20
21import (
22 v1beta1 "k8s.io/api/extensions/v1beta1"
23 serializer "k8s.io/apimachinery/pkg/runtime/serializer"
24 "k8s.io/client-go/kubernetes/scheme"
25 rest "k8s.io/client-go/rest"
26)
27
28type ExtensionsV1beta1Interface interface {
29 RESTClient() rest.Interface
30 DaemonSetsGetter
31 DeploymentsGetter
32 IngressesGetter
33 PodSecurityPoliciesGetter
34 ReplicaSetsGetter
35 ScalesGetter
36}
37
38// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
39type ExtensionsV1beta1Client struct {
40 restClient rest.Interface
41}
42
43func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
44 return newDaemonSets(c, namespace)
45}
46
47func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface {
48 return newDeployments(c, namespace)
49}
50
51func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface {
52 return newIngresses(c, namespace)
53}
54
55func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
56 return newPodSecurityPolicies(c)
57}
58
59func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
60 return newReplicaSets(c, namespace)
61}
62
63func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface {
64 return newScales(c, namespace)
65}
66
67// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
68func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
69 config := *c
70 if err := setConfigDefaults(&config); err != nil {
71 return nil, err
72 }
73 client, err := rest.RESTClientFor(&config)
74 if err != nil {
75 return nil, err
76 }
77 return &ExtensionsV1beta1Client{client}, nil
78}
79
80// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
81// panics if there is an error in the config.
82func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
83 client, err := NewForConfig(c)
84 if err != nil {
85 panic(err)
86 }
87 return client
88}
89
90// New creates a new ExtensionsV1beta1Client for the given RESTClient.
91func New(c rest.Interface) *ExtensionsV1beta1Client {
92 return &ExtensionsV1beta1Client{c}
93}
94
95func setConfigDefaults(config *rest.Config) error {
96 gv := v1beta1.SchemeGroupVersion
97 config.GroupVersion = &gv
98 config.APIPath = "/apis"
99 config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
100
101 if config.UserAgent == "" {
102 config.UserAgent = rest.DefaultKubernetesUserAgent()
103 }
104
105 return nil
106}
107
108// RESTClient returns a RESTClient that is used to communicate
109// with API server by this client implementation.
110func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
111 if c == nil {
112 return nil
113 }
114 return c.restClient
115}