blob: 25d99f7b5255af97e2661e1f62b5f72ba1ad444a [file] [log] [blame]
Matteo Scandoloa4285862020-12-01 18:10:10 -08001/*
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 v1
20
21import (
22 "context"
23
24 v1 "k8s.io/api/authorization/v1"
25 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26 scheme "k8s.io/client-go/kubernetes/scheme"
27 rest "k8s.io/client-go/rest"
28)
29
30// SelfSubjectRulesReviewsGetter has a method to return a SelfSubjectRulesReviewInterface.
31// A group's client should implement this interface.
32type SelfSubjectRulesReviewsGetter interface {
33 SelfSubjectRulesReviews() SelfSubjectRulesReviewInterface
34}
35
36// SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources.
37type SelfSubjectRulesReviewInterface interface {
38 Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (*v1.SelfSubjectRulesReview, error)
39 SelfSubjectRulesReviewExpansion
40}
41
42// selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface
43type selfSubjectRulesReviews struct {
44 client rest.Interface
45}
46
47// newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews
48func newSelfSubjectRulesReviews(c *AuthorizationV1Client) *selfSubjectRulesReviews {
49 return &selfSubjectRulesReviews{
50 client: c.RESTClient(),
51 }
52}
53
54// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
55func (c *selfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) {
56 result = &v1.SelfSubjectRulesReview{}
57 err = c.client.Post().
58 Resource("selfsubjectrulesreviews").
59 VersionedParams(&opts, scheme.ParameterCodec).
60 Body(selfSubjectRulesReview).
61 Do(ctx).
62 Into(result)
63 return
64}