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