blob: e3b22aa44cb13f8d5e2d43b7094a3b25ad0a2bc5 [file] [log] [blame]
Zack Williamse940c7a2019-08-21 14:25:39 -07001/*
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"
Zack Williamse940c7a2019-08-21 14:25:39 -070023 "k8s.io/client-go/kubernetes/scheme"
24 rest "k8s.io/client-go/rest"
25)
26
27type ExtensionsV1beta1Interface interface {
28 RESTClient() rest.Interface
29 DaemonSetsGetter
30 DeploymentsGetter
31 IngressesGetter
David Bainbridge86971522019-09-26 22:09:39 +000032 NetworkPoliciesGetter
Zack Williamse940c7a2019-08-21 14:25:39 -070033 PodSecurityPoliciesGetter
34 ReplicaSetsGetter
35}
36
37// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
38type ExtensionsV1beta1Client struct {
39 restClient rest.Interface
40}
41
42func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
43 return newDaemonSets(c, namespace)
44}
45
46func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface {
47 return newDeployments(c, namespace)
48}
49
50func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface {
51 return newIngresses(c, namespace)
52}
53
David Bainbridge86971522019-09-26 22:09:39 +000054func (c *ExtensionsV1beta1Client) NetworkPolicies(namespace string) NetworkPolicyInterface {
55 return newNetworkPolicies(c, namespace)
56}
57
Zack Williamse940c7a2019-08-21 14:25:39 -070058func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
59 return newPodSecurityPolicies(c)
60}
61
62func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
63 return newReplicaSets(c, namespace)
64}
65
66// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
67func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
68 config := *c
69 if err := setConfigDefaults(&config); err != nil {
70 return nil, err
71 }
72 client, err := rest.RESTClientFor(&config)
73 if err != nil {
74 return nil, err
75 }
76 return &ExtensionsV1beta1Client{client}, nil
77}
78
79// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
80// panics if there is an error in the config.
81func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
82 client, err := NewForConfig(c)
83 if err != nil {
84 panic(err)
85 }
86 return client
87}
88
89// New creates a new ExtensionsV1beta1Client for the given RESTClient.
90func New(c rest.Interface) *ExtensionsV1beta1Client {
91 return &ExtensionsV1beta1Client{c}
92}
93
94func setConfigDefaults(config *rest.Config) error {
95 gv := v1beta1.SchemeGroupVersion
96 config.GroupVersion = &gv
97 config.APIPath = "/apis"
David Bainbridge86971522019-09-26 22:09:39 +000098 config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
Zack Williamse940c7a2019-08-21 14:25:39 -070099
100 if config.UserAgent == "" {
101 config.UserAgent = rest.DefaultKubernetesUserAgent()
102 }
103
104 return nil
105}
106
107// RESTClient returns a RESTClient that is used to communicate
108// with API server by this client implementation.
109func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
110 if c == nil {
111 return nil
112 }
113 return c.restClient
114}