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

package legacy

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)
)

type StatusResponse 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 *StatusResponse) Reset() {
	*x = StatusResponse{}
	mi := &file_automate_gateway_api_legacy_legacy_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*StatusResponse) ProtoMessage() {}

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

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

var File_automate_gateway_api_legacy_legacy_proto protoreflect.FileDescriptor

const file_automate_gateway_api_legacy_legacy_proto_rawDesc = "" +
	"\n" +
	"(automate-gateway/api/legacy/legacy.proto\x12\x18chef.automate.api.legacy\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a*external/annotations/iam/annotations.proto\"(\n" +
	"\x0eStatusResponse\x12\x16\n" +
	"\x06status\x18\x01 \x01(\tR\x06status2\xaf\x01\n" +
	"\x13LegacyDataCollector\x12\x97\x01\n" +
	"\x06Status\x12\x16.google.protobuf.Empty\x1a(.chef.automate.api.legacy.StatusResponse\"K\x8a\xb5\x18\"\n" +
	"\ringest:status\x12\x11ingest:status:get\x82\xd3\xe4\x93\x02\x1f\x12\x1d/api/v0/events/data-collectorBAZ?github.com/chef/automate/components/automate-gateway/api/legacyb\x06proto3"

var (
	file_automate_gateway_api_legacy_legacy_proto_rawDescOnce sync.Once
	file_automate_gateway_api_legacy_legacy_proto_rawDescData []byte
)

func file_automate_gateway_api_legacy_legacy_proto_rawDescGZIP() []byte {
	file_automate_gateway_api_legacy_legacy_proto_rawDescOnce.Do(func() {
		file_automate_gateway_api_legacy_legacy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_automate_gateway_api_legacy_legacy_proto_rawDesc), len(file_automate_gateway_api_legacy_legacy_proto_rawDesc)))
	})
	return file_automate_gateway_api_legacy_legacy_proto_rawDescData
}

var file_automate_gateway_api_legacy_legacy_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_automate_gateway_api_legacy_legacy_proto_goTypes = []any{
	(*StatusResponse)(nil), // 0: chef.automate.api.legacy.StatusResponse
	(*emptypb.Empty)(nil),  // 1: google.protobuf.Empty
}
var file_automate_gateway_api_legacy_legacy_proto_depIdxs = []int32{
	1, // 0: chef.automate.api.legacy.LegacyDataCollector.Status:input_type -> google.protobuf.Empty
	0, // 1: chef.automate.api.legacy.LegacyDataCollector.Status:output_type -> chef.automate.api.legacy.StatusResponse
	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_automate_gateway_api_legacy_legacy_proto_init() }
func file_automate_gateway_api_legacy_legacy_proto_init() {
	if File_automate_gateway_api_legacy_legacy_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_legacy_legacy_proto_rawDesc), len(file_automate_gateway_api_legacy_legacy_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_automate_gateway_api_legacy_legacy_proto_goTypes,
		DependencyIndexes: file_automate_gateway_api_legacy_legacy_proto_depIdxs,
		MessageInfos:      file_automate_gateway_api_legacy_legacy_proto_msgTypes,
	}.Build()
	File_automate_gateway_api_legacy_legacy_proto = out.File
	file_automate_gateway_api_legacy_legacy_proto_goTypes = nil
	file_automate_gateway_api_legacy_legacy_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

// LegacyDataCollectorClient is the client API for LegacyDataCollector service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LegacyDataCollectorClient interface {
	// This is used by chef-server, it requests a GET /data-collector/v0 to check
	// Automate's status.
	// We proxy /data-collector/v0 to /api/v0/events/data-collector, so this is
	// where we need to respond.
	// Since this is for legacy-support only, we don't bother much about having
	// google.protobuf.Empty as argument.
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusResponse, error)
}

type legacyDataCollectorClient struct {
	cc grpc.ClientConnInterface
}

func NewLegacyDataCollectorClient(cc grpc.ClientConnInterface) LegacyDataCollectorClient {
	return &legacyDataCollectorClient{cc}
}

func (c *legacyDataCollectorClient) Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StatusResponse, error) {
	out := new(StatusResponse)
	err := c.cc.Invoke(ctx, "/chef.automate.api.legacy.LegacyDataCollector/Status", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// LegacyDataCollectorServer is the server API for LegacyDataCollector service.
type LegacyDataCollectorServer interface {
	// This is used by chef-server, it requests a GET /data-collector/v0 to check
	// Automate's status.
	// We proxy /data-collector/v0 to /api/v0/events/data-collector, so this is
	// where we need to respond.
	// Since this is for legacy-support only, we don't bother much about having
	// google.protobuf.Empty as argument.
	Status(context.Context, *emptypb.Empty) (*StatusResponse, error)
}

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

func (*UnimplementedLegacyDataCollectorServer) Status(context.Context, *emptypb.Empty) (*StatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
}

func RegisterLegacyDataCollectorServer(s *grpc.Server, srv LegacyDataCollectorServer) {
	s.RegisterService(&_LegacyDataCollector_serviceDesc, srv)
}

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

var _LegacyDataCollector_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.api.legacy.LegacyDataCollector",
	HandlerType: (*LegacyDataCollectorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _LegacyDataCollector_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "automate-gateway/api/legacy/legacy.proto",
}
