1 // SPDX-License-Identifier: Apache-2.0
\r
2 // Copyright (c) 2020 Intel Corporation
\r
3 // Code generated by client-gen. DO NOT EDIT.
\r
8 v1alpha1 "github.com/open-ness/EMCO/src/monitor/pkg/apis/k8splugin/v1alpha1"
\r
9 "github.com/open-ness/EMCO/src/monitor/pkg/generated/clientset/versioned/scheme"
\r
11 //"k8s.io/apimachinery/pkg/runtime/serializer"
\r
12 rest "k8s.io/client-go/rest"
\r
15 type K8spluginV1alpha1Interface interface {
\r
16 RESTClient() rest.Interface
\r
17 ResourceBundleStatesGetter
\r
20 // K8spluginV1alpha1Client is used to interact with features provided by the k8splugin.io group.
\r
21 type K8spluginV1alpha1Client struct {
\r
22 restClient rest.Interface
\r
25 func (c *K8spluginV1alpha1Client) ResourceBundleStates(namespace string) ResourceBundleStateInterface {
\r
26 return newResourceBundleStates(c, namespace)
\r
29 // NewForConfig creates a new K8spluginV1alpha1Client for the given config.
\r
30 func NewForConfig(c *rest.Config) (*K8spluginV1alpha1Client, error) {
\r
32 if err := setConfigDefaults(&config); err != nil {
\r
35 client, err := rest.RESTClientFor(&config)
\r
39 return &K8spluginV1alpha1Client{client}, nil
\r
42 // NewForConfigOrDie creates a new K8spluginV1alpha1Client for the given config and
\r
43 // panics if there is an error in the config.
\r
44 func NewForConfigOrDie(c *rest.Config) *K8spluginV1alpha1Client {
\r
45 client, err := NewForConfig(c)
\r
52 // New creates a new K8spluginV1alpha1Client for the given RESTClient.
\r
53 func New(c rest.Interface) *K8spluginV1alpha1Client {
\r
54 return &K8spluginV1alpha1Client{c}
\r
57 func setConfigDefaults(config *rest.Config) error {
\r
58 gv := v1alpha1.SchemeGroupVersion
\r
59 config.GroupVersion = &gv
\r
60 config.APIPath = "/apis"
\r
61 //config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
\r
62 config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
\r
64 if config.UserAgent == "" {
\r
65 config.UserAgent = rest.DefaultKubernetesUserAgent()
\r
71 // RESTClient returns a RESTClient that is used to communicate
\r
72 // with API server by this client implementation.
\r
73 func (c *K8spluginV1alpha1Client) RESTClient() rest.Interface {
\r