// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto

package clouderrorreporting

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// A request for reporting an individual error event.
type ReportErrorEventRequest struct {
	// [Required] The resource name of the Google Cloud Platform project. Written
	// as `projects/` plus the
	// [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).
	// Example: `projects/my-project-123`.
	ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName" json:"project_name,omitempty"`
	// [Required] The error event to be reported.
	Event *ReportedErrorEvent `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"`
}

func (m *ReportErrorEventRequest) Reset()                    { *m = ReportErrorEventRequest{} }
func (m *ReportErrorEventRequest) String() string            { return proto.CompactTextString(m) }
func (*ReportErrorEventRequest) ProtoMessage()               {}
func (*ReportErrorEventRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }

func (m *ReportErrorEventRequest) GetProjectName() string {
	if m != nil {
		return m.ProjectName
	}
	return ""
}

func (m *ReportErrorEventRequest) GetEvent() *ReportedErrorEvent {
	if m != nil {
		return m.Event
	}
	return nil
}

// Response for reporting an individual error event.
// Data may be added to this message in the future.
type ReportErrorEventResponse struct {
}

func (m *ReportErrorEventResponse) Reset()                    { *m = ReportErrorEventResponse{} }
func (m *ReportErrorEventResponse) String() string            { return proto.CompactTextString(m) }
func (*ReportErrorEventResponse) ProtoMessage()               {}
func (*ReportErrorEventResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }

// An error event which is reported to the Error Reporting system.
type ReportedErrorEvent struct {
	// [Optional] Time when the event occurred.
	// If not provided, the time when the event was received by the
	// Error Reporting system will be used.
	EventTime *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=event_time,json=eventTime" json:"event_time,omitempty"`
	// [Required] The service context in which this error has occurred.
	ServiceContext *ServiceContext `protobuf:"bytes,2,opt,name=service_context,json=serviceContext" json:"service_context,omitempty"`
	// [Required] A message describing the error. The message can contain an
	// exception stack in one of the supported programming languages and formats.
	// In that case, the message is parsed and detailed exception information
	// is returned when retrieving the error event again.
	Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
	// [Optional] A description of the context in which the error occurred.
	Context *ErrorContext `protobuf:"bytes,4,opt,name=context" json:"context,omitempty"`
}

func (m *ReportedErrorEvent) Reset()                    { *m = ReportedErrorEvent{} }
func (m *ReportedErrorEvent) String() string            { return proto.CompactTextString(m) }
func (*ReportedErrorEvent) ProtoMessage()               {}
func (*ReportedErrorEvent) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }

func (m *ReportedErrorEvent) GetEventTime() *google_protobuf1.Timestamp {
	if m != nil {
		return m.EventTime
	}
	return nil
}

func (m *ReportedErrorEvent) GetServiceContext() *ServiceContext {
	if m != nil {
		return m.ServiceContext
	}
	return nil
}

func (m *ReportedErrorEvent) GetMessage() string {
	if m != nil {
		return m.Message
	}
	return ""
}

func (m *ReportedErrorEvent) GetContext() *ErrorContext {
	if m != nil {
		return m.Context
	}
	return nil
}

func init() {
	proto.RegisterType((*ReportErrorEventRequest)(nil), "google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest")
	proto.RegisterType((*ReportErrorEventResponse)(nil), "google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse")
	proto.RegisterType((*ReportedErrorEvent)(nil), "google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent")
}

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

// 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.SupportPackageIsVersion4

// Client API for ReportErrorsService service

type ReportErrorsServiceClient interface {
	// Report an individual error event.
	//
	// This endpoint accepts <strong>either</strong> an OAuth token,
	// <strong>or</strong> an
	// <a href="https://support.google.com/cloud/answer/6158862">API key</a>
	// for authentication. To use an API key, append it to the URL as the value of
	// a `key` parameter. For example:
	// <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
	ReportErrorEvent(ctx context.Context, in *ReportErrorEventRequest, opts ...grpc.CallOption) (*ReportErrorEventResponse, error)
}

type reportErrorsServiceClient struct {
	cc *grpc.ClientConn
}

func NewReportErrorsServiceClient(cc *grpc.ClientConn) ReportErrorsServiceClient {
	return &reportErrorsServiceClient{cc}
}

func (c *reportErrorsServiceClient) ReportErrorEvent(ctx context.Context, in *ReportErrorEventRequest, opts ...grpc.CallOption) (*ReportErrorEventResponse, error) {
	out := new(ReportErrorEventResponse)
	err := grpc.Invoke(ctx, "/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for ReportErrorsService service

type ReportErrorsServiceServer interface {
	// Report an individual error event.
	//
	// This endpoint accepts <strong>either</strong> an OAuth token,
	// <strong>or</strong> an
	// <a href="https://support.google.com/cloud/answer/6158862">API key</a>
	// for authentication. To use an API key, append it to the URL as the value of
	// a `key` parameter. For example:
	// <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
	ReportErrorEvent(context.Context, *ReportErrorEventRequest) (*ReportErrorEventResponse, error)
}

func RegisterReportErrorsServiceServer(s *grpc.Server, srv ReportErrorsServiceServer) {
	s.RegisterService(&_ReportErrorsService_serviceDesc, srv)
}

func _ReportErrorsService_ReportErrorEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportErrorEventRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ReportErrorsServiceServer).ReportErrorEvent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ReportErrorsServiceServer).ReportErrorEvent(ctx, req.(*ReportErrorEventRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _ReportErrorsService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService",
	HandlerType: (*ReportErrorsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReportErrorEvent",
			Handler:    _ReportErrorsService_ReportErrorEvent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto",
}

func init() {
	proto.RegisterFile("google/devtools/clouderrorreporting/v1beta1/report_errors_service.proto", fileDescriptor3)
}

var fileDescriptor3 = []byte{
	// 475 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xcd, 0x6e, 0xd3, 0x40,
	0x10, 0xc7, 0xe5, 0xf0, 0x51, 0x75, 0x83, 0x00, 0x2d, 0x07, 0x2c, 0x0b, 0x89, 0x12, 0x2e, 0x15,
	0x48, 0x5e, 0x12, 0x2e, 0xa4, 0x15, 0xaa, 0x94, 0x12, 0xf5, 0x86, 0x2a, 0x17, 0x38, 0x70, 0xc0,
	0xda, 0x38, 0x83, 0x65, 0x14, 0xef, 0x98, 0xdd, 0x8d, 0x85, 0x84, 0xb8, 0xf0, 0x0a, 0x7d, 0x05,
	0x4e, 0xbc, 0x4e, 0x5f, 0x80, 0x03, 0x0f, 0xc1, 0x11, 0xed, 0x57, 0x14, 0x48, 0x0e, 0x98, 0x1e,
	0xc7, 0xe3, 0xf9, 0xfd, 0xff, 0xf3,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