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

package ingest

import (
	context "context"
	_ "github.com/chef/automate/api/interservice/compliance/ingest/events/compliance"
	event "github.com/chef/automate/api/interservice/event"
	_ "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"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	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 ProjectUpdateStatusReq struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProjectUpdateStatusReq) ProtoMessage() {}

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

type ProjectUpdateStatusResp struct {
	state                 protoimpl.MessageState `protogen:"open.v1"`
	State                 string                 `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty" toml:"state,omitempty" mapstructure:"state,omitempty"`
	EstimatedTimeComplete *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=estimated_time_complete,json=estimatedTimeComplete,proto3" json:"estimated_time_complete,omitempty" toml:"estimated_time_complete,omitempty" mapstructure:"estimated_time_complete,omitempty"`
	PercentageComplete    float32                `protobuf:"fixed32,3,opt,name=percentage_complete,json=percentageComplete,proto3" json:"percentage_complete,omitempty" toml:"percentage_complete,omitempty" mapstructure:"percentage_complete,omitempty"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

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

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

func (*ProjectUpdateStatusResp) ProtoMessage() {}

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

func (x *ProjectUpdateStatusResp) GetState() string {
	if x != nil {
		return x.State
	}
	return ""
}

func (x *ProjectUpdateStatusResp) GetEstimatedTimeComplete() *timestamppb.Timestamp {
	if x != nil {
		return x.EstimatedTimeComplete
	}
	return nil
}

func (x *ProjectUpdateStatusResp) GetPercentageComplete() float32 {
	if x != nil {
		return x.PercentageComplete
	}
	return 0
}

type ReportData struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Content       []byte                 `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty" toml:"content,omitempty" mapstructure:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ReportData) ProtoMessage() {}

func (x *ReportData) ProtoReflect() protoreflect.Message {
	mi := &file_interservice_compliance_ingest_ingest_compliance_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 ReportData.ProtoReflect.Descriptor instead.
func (*ReportData) Descriptor() ([]byte, []int) {
	return file_interservice_compliance_ingest_ingest_compliance_proto_rawDescGZIP(), []int{2}
}

func (x *ReportData) GetContent() []byte {
	if x != nil {
		return x.Content
	}
	return nil
}

var File_interservice_compliance_ingest_ingest_compliance_proto protoreflect.FileDescriptor

const file_interservice_compliance_ingest_ingest_compliance_proto_rawDesc = "" +
	"\n" +
	"6interservice/compliance/ingest/ingest/compliance.proto\x12-chef.automate.domain.compliance.ingest.ingest\x1a\x1cgoogle/api/annotations.proto\x1aAinterservice/compliance/ingest/events/compliance/compliance.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1einterservice/event/event.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x18\n" +
	"\x16ProjectUpdateStatusReq\"\xb4\x01\n" +
	"\x17ProjectUpdateStatusResp\x12\x14\n" +
	"\x05state\x18\x01 \x01(\tR\x05state\x12R\n" +
	"\x17estimated_time_complete\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x15estimatedTimeComplete\x12/\n" +
	"\x13percentage_complete\x18\x03 \x01(\x02R\x12percentageComplete\"&\n" +
	"\n" +
	"ReportData\x12\x18\n" +
	"\acontent\x18\x01 \x01(\fR\acontent2\xc8\x03\n" +
	"\x19ComplianceIngesterService\x12f\n" +
	"\vHandleEvent\x12(.chef.automate.domain.event.api.EventMsg\x1a-.chef.automate.domain.event.api.EventResponse\x12\xa4\x01\n" +
	"\x13ProjectUpdateStatus\x12E.chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusReq\x1aF.chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusResp\x12\x9b\x01\n" +
	"\x17ProcessComplianceReport\x129.chef.automate.domain.compliance.ingest.ingest.ReportData\x1a\x16.google.protobuf.Empty\"+\x82\xd3\xe4\x93\x02%:\x01*\" /api/v0/events/compliance/report(\x01BDZBgithub.com/chef/automate/api/interservice/compliance/ingest/ingestb\x06proto3"

var (
	file_interservice_compliance_ingest_ingest_compliance_proto_rawDescOnce sync.Once
	file_interservice_compliance_ingest_ingest_compliance_proto_rawDescData []byte
)

func file_interservice_compliance_ingest_ingest_compliance_proto_rawDescGZIP() []byte {
	file_interservice_compliance_ingest_ingest_compliance_proto_rawDescOnce.Do(func() {
		file_interservice_compliance_ingest_ingest_compliance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_interservice_compliance_ingest_ingest_compliance_proto_rawDesc), len(file_interservice_compliance_ingest_ingest_compliance_proto_rawDesc)))
	})
	return file_interservice_compliance_ingest_ingest_compliance_proto_rawDescData
}

var file_interservice_compliance_ingest_ingest_compliance_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_interservice_compliance_ingest_ingest_compliance_proto_goTypes = []any{
	(*ProjectUpdateStatusReq)(nil),  // 0: chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusReq
	(*ProjectUpdateStatusResp)(nil), // 1: chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusResp
	(*ReportData)(nil),              // 2: chef.automate.domain.compliance.ingest.ingest.ReportData
	(*timestamppb.Timestamp)(nil),   // 3: google.protobuf.Timestamp
	(*event.EventMsg)(nil),          // 4: chef.automate.domain.event.api.EventMsg
	(*event.EventResponse)(nil),     // 5: chef.automate.domain.event.api.EventResponse
	(*emptypb.Empty)(nil),           // 6: google.protobuf.Empty
}
var file_interservice_compliance_ingest_ingest_compliance_proto_depIdxs = []int32{
	3, // 0: chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusResp.estimated_time_complete:type_name -> google.protobuf.Timestamp
	4, // 1: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.HandleEvent:input_type -> chef.automate.domain.event.api.EventMsg
	0, // 2: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.ProjectUpdateStatus:input_type -> chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusReq
	2, // 3: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.ProcessComplianceReport:input_type -> chef.automate.domain.compliance.ingest.ingest.ReportData
	5, // 4: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.HandleEvent:output_type -> chef.automate.domain.event.api.EventResponse
	1, // 5: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.ProjectUpdateStatus:output_type -> chef.automate.domain.compliance.ingest.ingest.ProjectUpdateStatusResp
	6, // 6: chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService.ProcessComplianceReport:output_type -> google.protobuf.Empty
	4, // [4:7] is the sub-list for method output_type
	1, // [1:4] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_interservice_compliance_ingest_ingest_compliance_proto_init() }
func file_interservice_compliance_ingest_ingest_compliance_proto_init() {
	if File_interservice_compliance_ingest_ingest_compliance_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_ingest_ingest_compliance_proto_rawDesc), len(file_interservice_compliance_ingest_ingest_compliance_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_interservice_compliance_ingest_ingest_compliance_proto_goTypes,
		DependencyIndexes: file_interservice_compliance_ingest_ingest_compliance_proto_depIdxs,
		MessageInfos:      file_interservice_compliance_ingest_ingest_compliance_proto_msgTypes,
	}.Build()
	File_interservice_compliance_ingest_ingest_compliance_proto = out.File
	file_interservice_compliance_ingest_ingest_compliance_proto_goTypes = nil
	file_interservice_compliance_ingest_ingest_compliance_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

// ComplianceIngesterServiceClient is the client API for ComplianceIngesterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ComplianceIngesterServiceClient interface {
	HandleEvent(ctx context.Context, in *event.EventMsg, opts ...grpc.CallOption) (*event.EventResponse, error)
	ProjectUpdateStatus(ctx context.Context, in *ProjectUpdateStatusReq, opts ...grpc.CallOption) (*ProjectUpdateStatusResp, error)
	ProcessComplianceReport(ctx context.Context, opts ...grpc.CallOption) (ComplianceIngesterService_ProcessComplianceReportClient, error)
}

type complianceIngesterServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewComplianceIngesterServiceClient(cc grpc.ClientConnInterface) ComplianceIngesterServiceClient {
	return &complianceIngesterServiceClient{cc}
}

func (c *complianceIngesterServiceClient) HandleEvent(ctx context.Context, in *event.EventMsg, opts ...grpc.CallOption) (*event.EventResponse, error) {
	out := new(event.EventResponse)
	err := c.cc.Invoke(ctx, "/chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService/HandleEvent", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *complianceIngesterServiceClient) ProjectUpdateStatus(ctx context.Context, in *ProjectUpdateStatusReq, opts ...grpc.CallOption) (*ProjectUpdateStatusResp, error) {
	out := new(ProjectUpdateStatusResp)
	err := c.cc.Invoke(ctx, "/chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService/ProjectUpdateStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *complianceIngesterServiceClient) ProcessComplianceReport(ctx context.Context, opts ...grpc.CallOption) (ComplianceIngesterService_ProcessComplianceReportClient, error) {
	stream, err := c.cc.NewStream(ctx, &_ComplianceIngesterService_serviceDesc.Streams[0], "/chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService/ProcessComplianceReport", opts...)
	if err != nil {
		return nil, err
	}
	x := &complianceIngesterServiceProcessComplianceReportClient{stream}
	return x, nil
}

type ComplianceIngesterService_ProcessComplianceReportClient interface {
	Send(*ReportData) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type complianceIngesterServiceProcessComplianceReportClient struct {
	grpc.ClientStream
}

func (x *complianceIngesterServiceProcessComplianceReportClient) Send(m *ReportData) error {
	return x.ClientStream.SendMsg(m)
}

func (x *complianceIngesterServiceProcessComplianceReportClient) CloseAndRecv() (*emptypb.Empty, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(emptypb.Empty)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// ComplianceIngesterServiceServer is the server API for ComplianceIngesterService service.
type ComplianceIngesterServiceServer interface {
	HandleEvent(context.Context, *event.EventMsg) (*event.EventResponse, error)
	ProjectUpdateStatus(context.Context, *ProjectUpdateStatusReq) (*ProjectUpdateStatusResp, error)
	ProcessComplianceReport(ComplianceIngesterService_ProcessComplianceReportServer) error
}

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

func (*UnimplementedComplianceIngesterServiceServer) HandleEvent(context.Context, *event.EventMsg) (*event.EventResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HandleEvent not implemented")
}
func (*UnimplementedComplianceIngesterServiceServer) ProjectUpdateStatus(context.Context, *ProjectUpdateStatusReq) (*ProjectUpdateStatusResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProjectUpdateStatus not implemented")
}
func (*UnimplementedComplianceIngesterServiceServer) ProcessComplianceReport(ComplianceIngesterService_ProcessComplianceReportServer) error {
	return status.Errorf(codes.Unimplemented, "method ProcessComplianceReport not implemented")
}

func RegisterComplianceIngesterServiceServer(s *grpc.Server, srv ComplianceIngesterServiceServer) {
	s.RegisterService(&_ComplianceIngesterService_serviceDesc, srv)
}

func _ComplianceIngesterService_HandleEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(event.EventMsg)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ComplianceIngesterServiceServer).HandleEvent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService/HandleEvent",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ComplianceIngesterServiceServer).HandleEvent(ctx, req.(*event.EventMsg))
	}
	return interceptor(ctx, in, info, handler)
}

func _ComplianceIngesterService_ProjectUpdateStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProjectUpdateStatusReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ComplianceIngesterServiceServer).ProjectUpdateStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService/ProjectUpdateStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ComplianceIngesterServiceServer).ProjectUpdateStatus(ctx, req.(*ProjectUpdateStatusReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _ComplianceIngesterService_ProcessComplianceReport_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(ComplianceIngesterServiceServer).ProcessComplianceReport(&complianceIngesterServiceProcessComplianceReportServer{stream})
}

type ComplianceIngesterService_ProcessComplianceReportServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*ReportData, error)
	grpc.ServerStream
}

type complianceIngesterServiceProcessComplianceReportServer struct {
	grpc.ServerStream
}

func (x *complianceIngesterServiceProcessComplianceReportServer) SendAndClose(m *emptypb.Empty) error {
	return x.ServerStream.SendMsg(m)
}

func (x *complianceIngesterServiceProcessComplianceReportServer) Recv() (*ReportData, error) {
	m := new(ReportData)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

var _ComplianceIngesterService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.domain.compliance.ingest.ingest.ComplianceIngesterService",
	HandlerType: (*ComplianceIngesterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HandleEvent",
			Handler:    _ComplianceIngesterService_HandleEvent_Handler,
		},
		{
			MethodName: "ProjectUpdateStatus",
			Handler:    _ComplianceIngesterService_ProjectUpdateStatus_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ProcessComplianceReport",
			Handler:       _ComplianceIngesterService_ProcessComplianceReport_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "interservice/compliance/ingest/ingest/compliance.proto",
}
