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

package version

import (
	context "context"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	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"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	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 VersionInfo struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Name          string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Version       string                 `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty" toml:"version,omitempty" mapstructure:"version,omitempty"`
	Sha           string                 `protobuf:"bytes,3,opt,name=sha,proto3" json:"sha,omitempty" toml:"sha,omitempty" mapstructure:"sha,omitempty"`
	Built         string                 `protobuf:"bytes,4,opt,name=built,proto3" json:"built,omitempty" toml:"built,omitempty" mapstructure:"built,omitempty"`
	Api           string                 `protobuf:"bytes,5,opt,name=api,proto3" json:"api,omitempty" toml:"api,omitempty" mapstructure:"api,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*VersionInfo) ProtoMessage() {}

func (x *VersionInfo) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_compliance_version_version_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 VersionInfo.ProtoReflect.Descriptor instead.
func (*VersionInfo) Descriptor() ([]byte, []int) {
	return file_interservice_compliance_version_version_proto_rawDescGZIP(), []int{0}
}

func (x *VersionInfo) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *VersionInfo) GetVersion() string {
	if x != nil {
		return x.Version
	}
	return ""
}

func (x *VersionInfo) GetSha() string {
	if x != nil {
		return x.Sha
	}
	return ""
}

func (x *VersionInfo) GetBuilt() string {
	if x != nil {
		return x.Built
	}
	return ""
}

func (x *VersionInfo) GetApi() string {
	if x != nil {
		return x.Api
	}
	return ""
}

var File_interservice_compliance_version_version_proto protoreflect.FileDescriptor

const file_interservice_compliance_version_version_proto_rawDesc = "" +
	"\n" +
	"-interservice/compliance/version/version.proto\x12'chef.automate.domain.compliance.version\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"u\n" +
	"\vVersionInfo\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
	"\aversion\x18\x02 \x01(\tR\aversion\x12\x10\n" +
	"\x03sha\x18\x03 \x01(\tR\x03sha\x12\x14\n" +
	"\x05built\x18\x04 \x01(\tR\x05built\x12\x10\n" +
	"\x03api\x18\x05 \x01(\tR\x03api2k\n" +
	"\x0eVersionService\x12Y\n" +
	"\aVersion\x12\x16.google.protobuf.Empty\x1a4.chef.automate.domain.compliance.version.VersionInfo\"\x00B>Z<github.com/chef/automate/api/interservice/compliance/versionb\x06proto3"

var (
	file_interservice_compliance_version_version_proto_rawDescOnce sync.Once
	file_interservice_compliance_version_version_proto_rawDescData []byte
)

func file_interservice_compliance_version_version_proto_rawDescGZIP() []byte {
	file_interservice_compliance_version_version_proto_rawDescOnce.Do(func() {
		file_interservice_compliance_version_version_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_interservice_compliance_version_version_proto_rawDesc), len(file_interservice_compliance_version_version_proto_rawDesc)))
	})
	return file_interservice_compliance_version_version_proto_rawDescData
}

var file_interservice_compliance_version_version_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_interservice_compliance_version_version_proto_goTypes = []any{
	(*VersionInfo)(nil),   // 0: chef.automate.domain.compliance.version.VersionInfo
	(*emptypb.Empty)(nil), // 1: google.protobuf.Empty
}
var file_interservice_compliance_version_version_proto_depIdxs = []int32{
	1, // 0: chef.automate.domain.compliance.version.VersionService.Version:input_type -> google.protobuf.Empty
	0, // 1: chef.automate.domain.compliance.version.VersionService.Version:output_type -> chef.automate.domain.compliance.version.VersionInfo
	1, // [1:2] is the sub-list for method output_type
	0, // [0:1] 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_compliance_version_version_proto_init() }
func file_interservice_compliance_version_version_proto_init() {
	if File_interservice_compliance_version_version_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_interservice_compliance_version_version_proto_rawDesc), len(file_interservice_compliance_version_version_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_interservice_compliance_version_version_proto_goTypes,
		DependencyIndexes: file_interservice_compliance_version_version_proto_depIdxs,
		MessageInfos:      file_interservice_compliance_version_version_proto_msgTypes,
	}.Build()
	File_interservice_compliance_version_version_proto = out.File
	file_interservice_compliance_version_version_proto_goTypes = nil
	file_interservice_compliance_version_version_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

// VersionServiceClient is the client API for VersionService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type VersionServiceClient interface {
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionInfo, error)
}

type versionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient {
	return &versionServiceClient{cc}
}

func (c *versionServiceClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionInfo, error) {
	out := new(VersionInfo)
	err := c.cc.Invoke(ctx, "/chef.automate.domain.compliance.version.VersionService/Version", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// VersionServiceServer is the server API for VersionService service.
type VersionServiceServer interface {
	Version(context.Context, *emptypb.Empty) (*VersionInfo, error)
}

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

func (*UnimplementedVersionServiceServer) Version(context.Context, *emptypb.Empty) (*VersionInfo, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Version not implemented")
}

func RegisterVersionServiceServer(s *grpc.Server, srv VersionServiceServer) {
	s.RegisterService(&_VersionService_serviceDesc, srv)
}

func _VersionService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VersionServiceServer).Version(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.domain.compliance.version.VersionService/Version",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VersionServiceServer).Version(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

var _VersionService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.domain.compliance.version.VersionService",
	HandlerType: (*VersionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _VersionService_Version_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "interservice/compliance/version/version.proto",
}
