// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.19.0
// source: automate-gateway/api/gateway/gateway.proto

package gateway

import (
	context "context"
	_ "github.com/chef/automate/api/external/annotations/iam"
	_ "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)
)

// Version message
//
// The service version constructed with:
// * Service name
// * Built time
// * Semantic version
// * Git SHA
type Version struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Version       string                 `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Built         string                 `protobuf:"bytes,1,opt,name=built,proto3" json:"built,omitempty"`
	Name          string                 `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Sha           string                 `protobuf:"bytes,4,opt,name=sha,proto3" json:"sha,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Version) ProtoMessage() {}

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

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

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

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

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

// Health message
//
// The automate-gateway service health is constructed with:
//   - Status:
//     => ok:             Everything is alright
//     => initialization: The service is in its initialization process
//     => warning:        Something might be wrong?
//     => critical:       Something is wrong!
//
// @afiune: Here we can add more health information to the response
type Health struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Status        string                 `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Health) ProtoMessage() {}

func (x *Health) ProtoReflect() protoreflect.Message {
	mi := &file_automate_gateway_api_gateway_gateway_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 Health.ProtoReflect.Descriptor instead.
func (*Health) Descriptor() ([]byte, []int) {
	return file_automate_gateway_api_gateway_gateway_proto_rawDescGZIP(), []int{1}
}

func (x *Health) GetStatus() string {
	if x != nil {
		return x.Status
	}
	return ""
}

var File_automate_gateway_api_gateway_gateway_proto protoreflect.FileDescriptor

const file_automate_gateway_api_gateway_gateway_proto_rawDesc = "" +
	"\n" +
	"*automate-gateway/api/gateway/gateway.proto\x12\x11chef.automate.api\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a*external/annotations/iam/annotations.proto\"_\n" +
	"\aVersion\x12\x18\n" +
	"\aversion\x18\x02 \x01(\tR\aversion\x12\x14\n" +
	"\x05built\x18\x01 \x01(\tR\x05built\x12\x12\n" +
	"\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n" +
	"\x03sha\x18\x04 \x01(\tR\x03sha\" \n" +
	"\x06Health\x12\x16\n" +
	"\x06status\x18\x01 \x01(\tR\x06status2\xab\x02\n" +
	"\aGateway\x12\x98\x01\n" +
	"\n" +
	"GetVersion\x12\x16.google.protobuf.Empty\x1a\x1a.chef.automate.api.Version\"V\x8a\xb5\x183\n" +
	"\x16system:service:version\x12\x19system:serviceVersion:get\x82\xd3\xe4\x93\x02\x19\x12\x17/api/v0/gateway/version\x12\x84\x01\n" +
	"\tGetHealth\x12\x16.google.protobuf.Empty\x1a\x19.chef.automate.api.Health\"D\x8a\xb5\x18\"\n" +
	"\rsystem:health\x12\x11system:health:get\x82\xd3\xe4\x93\x02\x18\x12\x16/api/v0/gateway/healthBBZ@github.com/chef/automate/components/automate-gateway/api/gatewayb\x06proto3"

var (
	file_automate_gateway_api_gateway_gateway_proto_rawDescOnce sync.Once
	file_automate_gateway_api_gateway_gateway_proto_rawDescData []byte
)

func file_automate_gateway_api_gateway_gateway_proto_rawDescGZIP() []byte {
	file_automate_gateway_api_gateway_gateway_proto_rawDescOnce.Do(func() {
		file_automate_gateway_api_gateway_gateway_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_automate_gateway_api_gateway_gateway_proto_rawDesc), len(file_automate_gateway_api_gateway_gateway_proto_rawDesc)))
	})
	return file_automate_gateway_api_gateway_gateway_proto_rawDescData
}

var file_automate_gateway_api_gateway_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_automate_gateway_api_gateway_gateway_proto_goTypes = []any{
	(*Version)(nil),       // 0: chef.automate.api.Version
	(*Health)(nil),        // 1: chef.automate.api.Health
	(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_automate_gateway_api_gateway_gateway_proto_depIdxs = []int32{
	2, // 0: chef.automate.api.Gateway.GetVersion:input_type -> google.protobuf.Empty
	2, // 1: chef.automate.api.Gateway.GetHealth:input_type -> google.protobuf.Empty
	0, // 2: chef.automate.api.Gateway.GetVersion:output_type -> chef.automate.api.Version
	1, // 3: chef.automate.api.Gateway.GetHealth:output_type -> chef.automate.api.Health
	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_automate_gateway_api_gateway_gateway_proto_init() }
func file_automate_gateway_api_gateway_gateway_proto_init() {
	if File_automate_gateway_api_gateway_gateway_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_automate_gateway_api_gateway_gateway_proto_rawDesc), len(file_automate_gateway_api_gateway_gateway_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_automate_gateway_api_gateway_gateway_proto_goTypes,
		DependencyIndexes: file_automate_gateway_api_gateway_gateway_proto_depIdxs,
		MessageInfos:      file_automate_gateway_api_gateway_gateway_proto_msgTypes,
	}.Build()
	File_automate_gateway_api_gateway_gateway_proto = out.File
	file_automate_gateway_api_gateway_gateway_proto_goTypes = nil
	file_automate_gateway_api_gateway_gateway_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

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

type gatewayClient struct {
	cc grpc.ClientConnInterface
}

func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient {
	return &gatewayClient{cc}
}

func (c *gatewayClient) GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Version, error) {
	out := new(Version)
	err := c.cc.Invoke(ctx, "/chef.automate.api.Gateway/GetVersion", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *gatewayClient) GetHealth(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Health, error) {
	out := new(Health)
	err := c.cc.Invoke(ctx, "/chef.automate.api.Gateway/GetHealth", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GatewayServer is the server API for Gateway service.
type GatewayServer interface {
	GetVersion(context.Context, *emptypb.Empty) (*Version, error)
	GetHealth(context.Context, *emptypb.Empty) (*Health, error)
}

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

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

func RegisterGatewayServer(s *grpc.Server, srv GatewayServer) {
	s.RegisterService(&_Gateway_serviceDesc, srv)
}

func _Gateway_GetVersion_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.(GatewayServer).GetVersion(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.Gateway/GetVersion",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServer).GetVersion(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _Gateway_GetHealth_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.(GatewayServer).GetHealth(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.Gateway/GetHealth",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GatewayServer).GetHealth(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

var _Gateway_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.api.Gateway",
	HandlerType: (*GatewayServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVersion",
			Handler:    _Gateway_GetVersion_Handler,
		},
		{
			MethodName: "GetHealth",
			Handler:    _Gateway_GetHealth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "automate-gateway/api/gateway/gateway.proto",
}
