// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.0
// source: internal/module/managed_resources/rpc/rpc.proto

package rpc

import (
	context "context"

	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Provisioner_GetDefaultEnvironmentTemplate_FullMethodName = "/gitlab.agent.managed_resources.rpc.Provisioner/GetDefaultEnvironmentTemplate"
	Provisioner_ListEnvironmentTemplates_FullMethodName      = "/gitlab.agent.managed_resources.rpc.Provisioner/ListEnvironmentTemplates"
	Provisioner_GetEnvironmentTemplate_FullMethodName        = "/gitlab.agent.managed_resources.rpc.Provisioner/GetEnvironmentTemplate"
	Provisioner_RenderEnvironmentTemplate_FullMethodName     = "/gitlab.agent.managed_resources.rpc.Provisioner/RenderEnvironmentTemplate"
	Provisioner_EnsureEnvironment_FullMethodName             = "/gitlab.agent.managed_resources.rpc.Provisioner/EnsureEnvironment"
	Provisioner_DeleteEnvironment_FullMethodName             = "/gitlab.agent.managed_resources.rpc.Provisioner/DeleteEnvironment"
)

// ProvisionerClient is the client API for Provisioner service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ProvisionerClient interface {
	GetDefaultEnvironmentTemplate(ctx context.Context, in *GetDefaultEnvironmentTemplateRequest, opts ...grpc.CallOption) (*GetDefaultEnvironmentTemplateResponse, error)
	ListEnvironmentTemplates(ctx context.Context, in *ListEnvironmentTemplatesRequest, opts ...grpc.CallOption) (*ListEnvironmentTemplatesResponse, error)
	GetEnvironmentTemplate(ctx context.Context, in *GetEnvironmentTemplateRequest, opts ...grpc.CallOption) (*GetEnvironmentTemplateResponse, error)
	RenderEnvironmentTemplate(ctx context.Context, in *RenderEnvironmentTemplateRequest, opts ...grpc.CallOption) (*RenderEnvironmentTemplateResponse, error)
	EnsureEnvironment(ctx context.Context, in *EnsureEnvironmentRequest, opts ...grpc.CallOption) (*EnsureEnvironmentResponse, error)
	DeleteEnvironment(ctx context.Context, in *DeleteEnvironmentRequest, opts ...grpc.CallOption) (*DeleteEnvironmentResponse, error)
}

type provisionerClient struct {
	cc grpc.ClientConnInterface
}

func NewProvisionerClient(cc grpc.ClientConnInterface) ProvisionerClient {
	return &provisionerClient{cc}
}

func (c *provisionerClient) GetDefaultEnvironmentTemplate(ctx context.Context, in *GetDefaultEnvironmentTemplateRequest, opts ...grpc.CallOption) (*GetDefaultEnvironmentTemplateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetDefaultEnvironmentTemplateResponse)
	err := c.cc.Invoke(ctx, Provisioner_GetDefaultEnvironmentTemplate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *provisionerClient) ListEnvironmentTemplates(ctx context.Context, in *ListEnvironmentTemplatesRequest, opts ...grpc.CallOption) (*ListEnvironmentTemplatesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListEnvironmentTemplatesResponse)
	err := c.cc.Invoke(ctx, Provisioner_ListEnvironmentTemplates_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *provisionerClient) GetEnvironmentTemplate(ctx context.Context, in *GetEnvironmentTemplateRequest, opts ...grpc.CallOption) (*GetEnvironmentTemplateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetEnvironmentTemplateResponse)
	err := c.cc.Invoke(ctx, Provisioner_GetEnvironmentTemplate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *provisionerClient) RenderEnvironmentTemplate(ctx context.Context, in *RenderEnvironmentTemplateRequest, opts ...grpc.CallOption) (*RenderEnvironmentTemplateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RenderEnvironmentTemplateResponse)
	err := c.cc.Invoke(ctx, Provisioner_RenderEnvironmentTemplate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *provisionerClient) EnsureEnvironment(ctx context.Context, in *EnsureEnvironmentRequest, opts ...grpc.CallOption) (*EnsureEnvironmentResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EnsureEnvironmentResponse)
	err := c.cc.Invoke(ctx, Provisioner_EnsureEnvironment_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *provisionerClient) DeleteEnvironment(ctx context.Context, in *DeleteEnvironmentRequest, opts ...grpc.CallOption) (*DeleteEnvironmentResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteEnvironmentResponse)
	err := c.cc.Invoke(ctx, Provisioner_DeleteEnvironment_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ProvisionerServer is the server API for Provisioner service.
// All implementations must embed UnimplementedProvisionerServer
// for forward compatibility.
type ProvisionerServer interface {
	GetDefaultEnvironmentTemplate(context.Context, *GetDefaultEnvironmentTemplateRequest) (*GetDefaultEnvironmentTemplateResponse, error)
	ListEnvironmentTemplates(context.Context, *ListEnvironmentTemplatesRequest) (*ListEnvironmentTemplatesResponse, error)
	GetEnvironmentTemplate(context.Context, *GetEnvironmentTemplateRequest) (*GetEnvironmentTemplateResponse, error)
	RenderEnvironmentTemplate(context.Context, *RenderEnvironmentTemplateRequest) (*RenderEnvironmentTemplateResponse, error)
	EnsureEnvironment(context.Context, *EnsureEnvironmentRequest) (*EnsureEnvironmentResponse, error)
	DeleteEnvironment(context.Context, *DeleteEnvironmentRequest) (*DeleteEnvironmentResponse, error)
	mustEmbedUnimplementedProvisionerServer()
}

// UnimplementedProvisionerServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedProvisionerServer struct{}

func (UnimplementedProvisionerServer) GetDefaultEnvironmentTemplate(context.Context, *GetDefaultEnvironmentTemplateRequest) (*GetDefaultEnvironmentTemplateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDefaultEnvironmentTemplate not implemented")
}
func (UnimplementedProvisionerServer) ListEnvironmentTemplates(context.Context, *ListEnvironmentTemplatesRequest) (*ListEnvironmentTemplatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListEnvironmentTemplates not implemented")
}
func (UnimplementedProvisionerServer) GetEnvironmentTemplate(context.Context, *GetEnvironmentTemplateRequest) (*GetEnvironmentTemplateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetEnvironmentTemplate not implemented")
}
func (UnimplementedProvisionerServer) RenderEnvironmentTemplate(context.Context, *RenderEnvironmentTemplateRequest) (*RenderEnvironmentTemplateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RenderEnvironmentTemplate not implemented")
}
func (UnimplementedProvisionerServer) EnsureEnvironment(context.Context, *EnsureEnvironmentRequest) (*EnsureEnvironmentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EnsureEnvironment not implemented")
}
func (UnimplementedProvisionerServer) DeleteEnvironment(context.Context, *DeleteEnvironmentRequest) (*DeleteEnvironmentResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteEnvironment not implemented")
}
func (UnimplementedProvisionerServer) mustEmbedUnimplementedProvisionerServer() {}
func (UnimplementedProvisionerServer) testEmbeddedByValue()                     {}

// UnsafeProvisionerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ProvisionerServer will
// result in compilation errors.
type UnsafeProvisionerServer interface {
	mustEmbedUnimplementedProvisionerServer()
}

func RegisterProvisionerServer(s grpc.ServiceRegistrar, srv ProvisionerServer) {
	// If the following call pancis, it indicates UnimplementedProvisionerServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Provisioner_ServiceDesc, srv)
}

func _Provisioner_GetDefaultEnvironmentTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDefaultEnvironmentTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).GetDefaultEnvironmentTemplate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_GetDefaultEnvironmentTemplate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).GetDefaultEnvironmentTemplate(ctx, req.(*GetDefaultEnvironmentTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Provisioner_ListEnvironmentTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListEnvironmentTemplatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).ListEnvironmentTemplates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_ListEnvironmentTemplates_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).ListEnvironmentTemplates(ctx, req.(*ListEnvironmentTemplatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Provisioner_GetEnvironmentTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetEnvironmentTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).GetEnvironmentTemplate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_GetEnvironmentTemplate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).GetEnvironmentTemplate(ctx, req.(*GetEnvironmentTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Provisioner_RenderEnvironmentTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RenderEnvironmentTemplateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).RenderEnvironmentTemplate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_RenderEnvironmentTemplate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).RenderEnvironmentTemplate(ctx, req.(*RenderEnvironmentTemplateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Provisioner_EnsureEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EnsureEnvironmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).EnsureEnvironment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_EnsureEnvironment_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).EnsureEnvironment(ctx, req.(*EnsureEnvironmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Provisioner_DeleteEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteEnvironmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProvisionerServer).DeleteEnvironment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Provisioner_DeleteEnvironment_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProvisionerServer).DeleteEnvironment(ctx, req.(*DeleteEnvironmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Provisioner_ServiceDesc is the grpc.ServiceDesc for Provisioner service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Provisioner_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gitlab.agent.managed_resources.rpc.Provisioner",
	HandlerType: (*ProvisionerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDefaultEnvironmentTemplate",
			Handler:    _Provisioner_GetDefaultEnvironmentTemplate_Handler,
		},
		{
			MethodName: "ListEnvironmentTemplates",
			Handler:    _Provisioner_ListEnvironmentTemplates_Handler,
		},
		{
			MethodName: "GetEnvironmentTemplate",
			Handler:    _Provisioner_GetEnvironmentTemplate_Handler,
		},
		{
			MethodName: "RenderEnvironmentTemplate",
			Handler:    _Provisioner_RenderEnvironmentTemplate_Handler,
		},
		{
			MethodName: "EnsureEnvironment",
			Handler:    _Provisioner_EnsureEnvironment_Handler,
		},
		{
			MethodName: "DeleteEnvironment",
			Handler:    _Provisioner_DeleteEnvironment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/module/managed_resources/rpc/rpc.proto",
}
