/*
Copyright AppsCode Inc. and Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Code generated by client-gen. DO NOT EDIT.

package v1alpha1

import (
	"context"

	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	rest "k8s.io/client-go/rest"
	v1alpha1 "kmodules.xyz/resource-metadata/apis/identity/v1alpha1"
	scheme "kmodules.xyz/resource-metadata/client/clientset/versioned/scheme"
)

// AuditTokenRequestsGetter has a method to return a AuditTokenRequestInterface.
// A group's client should implement this interface.
type AuditTokenRequestsGetter interface {
	AuditTokenRequests() AuditTokenRequestInterface
}

// AuditTokenRequestInterface has methods to work with AuditTokenRequest resources.
type AuditTokenRequestInterface interface {
	Create(ctx context.Context, auditTokenRequest *v1alpha1.AuditTokenRequest, opts v1.CreateOptions) (*v1alpha1.AuditTokenRequest, error)
	AuditTokenRequestExpansion
}

// auditTokenRequests implements AuditTokenRequestInterface
type auditTokenRequests struct {
	client rest.Interface
}

// newAuditTokenRequests returns a AuditTokenRequests
func newAuditTokenRequests(c *IdentityV1alpha1Client) *auditTokenRequests {
	return &auditTokenRequests{
		client: c.RESTClient(),
	}
}

// Create takes the representation of a auditTokenRequest and creates it.  Returns the server's representation of the auditTokenRequest, and an error, if there is any.
func (c *auditTokenRequests) Create(ctx context.Context, auditTokenRequest *v1alpha1.AuditTokenRequest, opts v1.CreateOptions) (result *v1alpha1.AuditTokenRequest, err error) {
	result = &v1alpha1.AuditTokenRequest{}
	err = c.client.Post().
		Resource("audittokenrequests").
		VersionedParams(&opts, scheme.ParameterCodec).
		Body(auditTokenRequest).
		Do(ctx).
		Into(result)
	return
}
