// -*- mode: protobuf; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.19.0
// source: interservice/deployment/certificate_authority.proto

package deployment

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type RootCertRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RootCertRequest) Reset() {
	*x = RootCertRequest{}
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RootCertRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RootCertRequest) ProtoMessage() {}

func (x *RootCertRequest) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RootCertRequest.ProtoReflect.Descriptor instead.
func (*RootCertRequest) Descriptor() ([]byte, []int) {
	return file_interservice_deployment_certificate_authority_proto_rawDescGZIP(), []int{0}
}

type RootCertResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Cert          string                 `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty" toml:"cert,omitempty" mapstructure:"cert,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RootCertResponse) Reset() {
	*x = RootCertResponse{}
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RootCertResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RootCertResponse) ProtoMessage() {}

func (x *RootCertResponse) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RootCertResponse.ProtoReflect.Descriptor instead.
func (*RootCertResponse) Descriptor() ([]byte, []int) {
	return file_interservice_deployment_certificate_authority_proto_rawDescGZIP(), []int{1}
}

func (x *RootCertResponse) GetCert() string {
	if x != nil {
		return x.Cert
	}
	return ""
}

type RegenerateRootRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RegenerateRootRequest) Reset() {
	*x = RegenerateRootRequest{}
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RegenerateRootRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RegenerateRootRequest) ProtoMessage() {}

func (x *RegenerateRootRequest) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RegenerateRootRequest.ProtoReflect.Descriptor instead.
func (*RegenerateRootRequest) Descriptor() ([]byte, []int) {
	return file_interservice_deployment_certificate_authority_proto_rawDescGZIP(), []int{2}
}

type RegenerateRootResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RegenerateRootResponse) Reset() {
	*x = RegenerateRootResponse{}
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RegenerateRootResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RegenerateRootResponse) ProtoMessage() {}

func (x *RegenerateRootResponse) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_deployment_certificate_authority_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RegenerateRootResponse.ProtoReflect.Descriptor instead.
func (*RegenerateRootResponse) Descriptor() ([]byte, []int) {
	return file_interservice_deployment_certificate_authority_proto_rawDescGZIP(), []int{3}
}

var File_interservice_deployment_certificate_authority_proto protoreflect.FileDescriptor

const file_interservice_deployment_certificate_authority_proto_rawDesc = "" +
	"\n" +
	"3interservice/deployment/certificate_authority.proto\x12\x1fchef.automate.domain.deployment\"\x11\n" +
	"\x0fRootCertRequest\"&\n" +
	"\x10RootCertResponse\x12\x12\n" +
	"\x04cert\x18\x01 \x01(\tR\x04cert\"\x17\n" +
	"\x15RegenerateRootRequest\"\x18\n" +
	"\x16RegenerateRootResponse2\x95\x02\n" +
	"\x1bCertificateAuthorityService\x12r\n" +
	"\vGetRootCert\x120.chef.automate.domain.deployment.RootCertRequest\x1a1.chef.automate.domain.deployment.RootCertResponse\x12\x81\x01\n" +
	"\x0eRegenerateRoot\x126.chef.automate.domain.deployment.RegenerateRootRequest\x1a7.chef.automate.domain.deployment.RegenerateRootResponseB6Z4github.com/chef/automate/api/interservice/deploymentb\x06proto3"

var (
	file_interservice_deployment_certificate_authority_proto_rawDescOnce sync.Once
	file_interservice_deployment_certificate_authority_proto_rawDescData []byte
)

func file_interservice_deployment_certificate_authority_proto_rawDescGZIP() []byte {
	file_interservice_deployment_certificate_authority_proto_rawDescOnce.Do(func() {
		file_interservice_deployment_certificate_authority_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_interservice_deployment_certificate_authority_proto_rawDesc), len(file_interservice_deployment_certificate_authority_proto_rawDesc)))
	})
	return file_interservice_deployment_certificate_authority_proto_rawDescData
}

var file_interservice_deployment_certificate_authority_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_interservice_deployment_certificate_authority_proto_goTypes = []any{
	(*RootCertRequest)(nil),        // 0: chef.automate.domain.deployment.RootCertRequest
	(*RootCertResponse)(nil),       // 1: chef.automate.domain.deployment.RootCertResponse
	(*RegenerateRootRequest)(nil),  // 2: chef.automate.domain.deployment.RegenerateRootRequest
	(*RegenerateRootResponse)(nil), // 3: chef.automate.domain.deployment.RegenerateRootResponse
}
var file_interservice_deployment_certificate_authority_proto_depIdxs = []int32{
	0, // 0: chef.automate.domain.deployment.CertificateAuthorityService.GetRootCert:input_type -> chef.automate.domain.deployment.RootCertRequest
	2, // 1: chef.automate.domain.deployment.CertificateAuthorityService.RegenerateRoot:input_type -> chef.automate.domain.deployment.RegenerateRootRequest
	1, // 2: chef.automate.domain.deployment.CertificateAuthorityService.GetRootCert:output_type -> chef.automate.domain.deployment.RootCertResponse
	3, // 3: chef.automate.domain.deployment.CertificateAuthorityService.RegenerateRoot:output_type -> chef.automate.domain.deployment.RegenerateRootResponse
	2, // [2:4] is the sub-list for method output_type
	0, // [0:2] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_interservice_deployment_certificate_authority_proto_init() }
func file_interservice_deployment_certificate_authority_proto_init() {
	if File_interservice_deployment_certificate_authority_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_interservice_deployment_certificate_authority_proto_rawDesc), len(file_interservice_deployment_certificate_authority_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_interservice_deployment_certificate_authority_proto_goTypes,
		DependencyIndexes: file_interservice_deployment_certificate_authority_proto_depIdxs,
		MessageInfos:      file_interservice_deployment_certificate_authority_proto_msgTypes,
	}.Build()
	File_interservice_deployment_certificate_authority_proto = out.File
	file_interservice_deployment_certificate_authority_proto_goTypes = nil
	file_interservice_deployment_certificate_authority_proto_depIdxs = nil
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6

// CertificateAuthorityServiceClient is the client API for CertificateAuthorityService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CertificateAuthorityServiceClient interface {
	GetRootCert(ctx context.Context, in *RootCertRequest, opts ...grpc.CallOption) (*RootCertResponse, error)
	RegenerateRoot(ctx context.Context, in *RegenerateRootRequest, opts ...grpc.CallOption) (*RegenerateRootResponse, error)
}

type certificateAuthorityServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCertificateAuthorityServiceClient(cc grpc.ClientConnInterface) CertificateAuthorityServiceClient {
	return &certificateAuthorityServiceClient{cc}
}

func (c *certificateAuthorityServiceClient) GetRootCert(ctx context.Context, in *RootCertRequest, opts ...grpc.CallOption) (*RootCertResponse, error) {
	out := new(RootCertResponse)
	err := c.cc.Invoke(ctx, "/chef.automate.domain.deployment.CertificateAuthorityService/GetRootCert", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *certificateAuthorityServiceClient) RegenerateRoot(ctx context.Context, in *RegenerateRootRequest, opts ...grpc.CallOption) (*RegenerateRootResponse, error) {
	out := new(RegenerateRootResponse)
	err := c.cc.Invoke(ctx, "/chef.automate.domain.deployment.CertificateAuthorityService/RegenerateRoot", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CertificateAuthorityServiceServer is the server API for CertificateAuthorityService service.
type CertificateAuthorityServiceServer interface {
	GetRootCert(context.Context, *RootCertRequest) (*RootCertResponse, error)
	RegenerateRoot(context.Context, *RegenerateRootRequest) (*RegenerateRootResponse, error)
}

// UnimplementedCertificateAuthorityServiceServer can be embedded to have forward compatible implementations.
type UnimplementedCertificateAuthorityServiceServer struct {
}

func (*UnimplementedCertificateAuthorityServiceServer) GetRootCert(context.Context, *RootCertRequest) (*RootCertResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRootCert not implemented")
}
func (*UnimplementedCertificateAuthorityServiceServer) RegenerateRoot(context.Context, *RegenerateRootRequest) (*RegenerateRootResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegenerateRoot not implemented")
}

func RegisterCertificateAuthorityServiceServer(s *grpc.Server, srv CertificateAuthorityServiceServer) {
	s.RegisterService(&_CertificateAuthorityService_serviceDesc, srv)
}

func _CertificateAuthorityService_GetRootCert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RootCertRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CertificateAuthorityServiceServer).GetRootCert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.domain.deployment.CertificateAuthorityService/GetRootCert",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CertificateAuthorityServiceServer).GetRootCert(ctx, req.(*RootCertRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CertificateAuthorityService_RegenerateRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegenerateRootRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CertificateAuthorityServiceServer).RegenerateRoot(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.domain.deployment.CertificateAuthorityService/RegenerateRoot",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CertificateAuthorityServiceServer).RegenerateRoot(ctx, req.(*RegenerateRootRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _CertificateAuthorityService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.domain.deployment.CertificateAuthorityService",
	HandlerType: (*CertificateAuthorityServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRootCert",
			Handler:    _CertificateAuthorityService_GetRootCert_Handler,
		},
		{
			MethodName: "RegenerateRoot",
			Handler:    _CertificateAuthorityService_RegenerateRoot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "interservice/deployment/certificate_authority.proto",
}
