// Code generated by protoc-gen-go. DO NOT EDIT.
// source: opencensus/proto/agent/trace/v1/trace_service.proto

package v1 // import "github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import v1 "github.com/census-instrumentation/opencensus-proto/gen-go/agent/common/v1"
import v11 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1"

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

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type CurrentLibraryConfig struct {
	// Identifier data effectively is a structured metadata.
	// This is required only in the first message on the stream.
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// Current configuration.
	Config               *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *CurrentLibraryConfig) Reset()         { *m = CurrentLibraryConfig{} }
func (m *CurrentLibraryConfig) String() string { return proto.CompactTextString(m) }
func (*CurrentLibraryConfig) ProtoMessage()    {}
func (*CurrentLibraryConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_trace_service_b7083cd65a1a253c, []int{0}
}
func (m *CurrentLibraryConfig) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_CurrentLibraryConfig.Unmarshal(m, b)
}
func (m *CurrentLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_CurrentLibraryConfig.Marshal(b, m, deterministic)
}
func (dst *CurrentLibraryConfig) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CurrentLibraryConfig.Merge(dst, src)
}
func (m *CurrentLibraryConfig) XXX_Size() int {
	return xxx_messageInfo_CurrentLibraryConfig.Size(m)
}
func (m *CurrentLibraryConfig) XXX_DiscardUnknown() {
	xxx_messageInfo_CurrentLibraryConfig.DiscardUnknown(m)
}

var xxx_messageInfo_CurrentLibraryConfig proto.InternalMessageInfo

func (m *CurrentLibraryConfig) GetNode() *v1.Node {
	if m != nil {
		return m.Node
	}
	return nil
}

func (m *CurrentLibraryConfig) GetConfig() *v11.TraceConfig {
	if m != nil {
		return m.Config
	}
	return nil
}

type UpdatedLibraryConfig struct {
	// Requested updated configuration.
	Config               *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (m *UpdatedLibraryConfig) Reset()         { *m = UpdatedLibraryConfig{} }
func (m *UpdatedLibraryConfig) String() string { return proto.CompactTextString(m) }
func (*UpdatedLibraryConfig) ProtoMessage()    {}
func (*UpdatedLibraryConfig) Descriptor() ([]byte, []int) {
	return fileDescriptor_trace_service_b7083cd65a1a253c, []int{1}
}
func (m *UpdatedLibraryConfig) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_UpdatedLibraryConfig.Unmarshal(m, b)
}
func (m *UpdatedLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_UpdatedLibraryConfig.Marshal(b, m, deterministic)
}
func (dst *UpdatedLibraryConfig) XXX_Merge(src proto.Message) {
	xxx_messageInfo_UpdatedLibraryConfig.Merge(dst, src)
}
func (m *UpdatedLibraryConfig) XXX_Size() int {
	return xxx_messageInfo_UpdatedLibraryConfig.Size(m)
}
func (m *UpdatedLibraryConfig) XXX_DiscardUnknown() {
	xxx_messageInfo_UpdatedLibraryConfig.DiscardUnknown(m)
}

var xxx_messageInfo_UpdatedLibraryConfig proto.InternalMessageInfo

func (m *UpdatedLibraryConfig) GetConfig() *v11.TraceConfig {
	if m != nil {
		return m.Config
	}
	return nil
}

type ExportTraceServiceRequest struct {
	// Identifier data effectively is a structured metadata.
	// This is required only in the first message on the stream.
	Node                 *v1.Node    `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	Spans                []*v11.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *ExportTraceServiceRequest) Reset()         { *m = ExportTraceServiceRequest{} }
func (m *ExportTraceServiceRequest) String() string { return proto.CompactTextString(m) }
func (*ExportTraceServiceRequest) ProtoMessage()    {}
func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_trace_service_b7083cd65a1a253c, []int{2}
}
func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ExportTraceServiceRequest.Unmarshal(m, b)
}
func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic)
}
func (dst *ExportTraceServiceRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ExportTraceServiceRequest.Merge(dst, src)
}
func (m *ExportTraceServiceRequest) XXX_Size() int {
	return xxx_messageInfo_ExportTraceServiceRequest.Size(m)
}
func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo

func (m *ExportTraceServiceRequest) GetNode() *v1.Node {
	if m != nil {
		return m.Node
	}
	return nil
}

func (m *ExportTraceServiceRequest) GetSpans() []*v11.Span {
	if m != nil {
		return m.Spans
	}
	return nil
}

type ExportTraceServiceResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ExportTraceServiceResponse) Reset()         { *m = ExportTraceServiceResponse{} }
func (m *ExportTraceServiceResponse) String() string { return proto.CompactTextString(m) }
func (*ExportTraceServiceResponse) ProtoMessage()    {}
func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_trace_service_b7083cd65a1a253c, []int{3}
}
func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ExportTraceServiceResponse.Unmarshal(m, b)
}
func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic)
}
func (dst *ExportTraceServiceResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ExportTraceServiceResponse.Merge(dst, src)
}
func (m *ExportTraceServiceResponse) XXX_Size() int {
	return xxx_messageInfo_ExportTraceServiceResponse.Size(m)
}
func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m)
}

var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo

func init() {
	proto.RegisterType((*CurrentLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.CurrentLibraryConfig")
	proto.RegisterType((*UpdatedLibraryConfig)(nil), "opencensus.proto.agent.trace.v1.UpdatedLibraryConfig")
	proto.RegisterType((*ExportTraceServiceRequest)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceRequest")
	proto.RegisterType((*ExportTraceServiceResponse)(nil), "opencensus.proto.agent.trace.v1.ExportTraceServiceResponse")
}

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

// TraceServiceClient is the client API for TraceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TraceServiceClient interface {
	// After initialization, this RPC must be kept alive for the
	// entire life of the application. The agent pushes configs
	// down to applications via a stream.
	Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error)
	// Allows applications to send spans to the agent.
	// For performance reasons, it is recommended to keep this RPC
	// alive for the entire life of the application.
	Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error)
}

type traceServiceClient struct {
	cc *grpc.ClientConn
}

func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient {
	return &traceServiceClient{cc}
}

func (c *traceServiceClient) Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error) {
	stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/opencensus.proto.agent.trace.v1.TraceService/Config", opts...)
	if err != nil {
		return nil, err
	}
	x := &traceServiceConfigClient{stream}
	return x, nil
}

type TraceService_ConfigClient interface {
	Send(*CurrentLibraryConfig) error
	Recv() (*UpdatedLibraryConfig, error)
	grpc.ClientStream
}

type traceServiceConfigClient struct {
	grpc.ClientStream
}

func (x *traceServiceConfigClient) Send(m *CurrentLibraryConfig) error {
	return x.ClientStream.SendMsg(m)
}

func (x *traceServiceConfigClient) Recv() (*UpdatedLibraryConfig, error) {
	m := new(UpdatedLibraryConfig)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *traceServiceClient) Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error) {
	stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[1], "/opencensus.proto.agent.trace.v1.TraceService/Export", opts...)
	if err != nil {
		return nil, err
	}
	x := &traceServiceExportClient{stream}
	return x, nil
}

type TraceService_ExportClient interface {
	Send(*ExportTraceServiceRequest) error
	Recv() (*ExportTraceServiceResponse, error)
	grpc.ClientStream
}

type traceServiceExportClient struct {
	grpc.ClientStream
}

func (x *traceServiceExportClient) Send(m *ExportTraceServiceRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *traceServiceExportClient) Recv() (*ExportTraceServiceResponse, error) {
	m := new(ExportTraceServiceResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// TraceServiceServer is the server API for TraceService service.
type TraceServiceServer interface {
	// After initialization, this RPC must be kept alive for the
	// entire life of the application. The agent pushes configs
	// down to applications via a stream.
	Config(TraceService_ConfigServer) error
	// Allows applications to send spans to the agent.
	// For performance reasons, it is recommended to keep this RPC
	// alive for the entire life of the application.
	Export(TraceService_ExportServer) error
}

func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) {
	s.RegisterService(&_TraceService_serviceDesc, srv)
}

func _TraceService_Config_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(TraceServiceServer).Config(&traceServiceConfigServer{stream})
}

type TraceService_ConfigServer interface {
	Send(*UpdatedLibraryConfig) error
	Recv() (*CurrentLibraryConfig, error)
	grpc.ServerStream
}

type traceServiceConfigServer struct {
	grpc.ServerStream
}

func (x *traceServiceConfigServer) Send(m *UpdatedLibraryConfig) error {
	return x.ServerStream.SendMsg(m)
}

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

func _TraceService_Export_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(TraceServiceServer).Export(&traceServiceExportServer{stream})
}

type TraceService_ExportServer interface {
	Send(*ExportTraceServiceResponse) error
	Recv() (*ExportTraceServiceRequest, error)
	grpc.ServerStream
}

type traceServiceExportServer struct {
	grpc.ServerStream
}

func (x *traceServiceExportServer) Send(m *ExportTraceServiceResponse) error {
	return x.ServerStream.SendMsg(m)
}

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

var _TraceService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "opencensus.proto.agent.trace.v1.TraceService",
	HandlerType: (*TraceServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Config",
			Handler:       _TraceService_Config_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Export",
			Handler:       _TraceService_Export_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "opencensus/proto/agent/trace/v1/trace_service.proto",
}

func init() {
	proto.RegisterFile("opencensus/proto/agent/trace/v1/trace_service.proto", fileDescriptor_trace_service_b7083cd65a1a253c)
}

var fileDescriptor_trace_service_b7083cd65a1a253c = []byte{
	// 389 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xb1, 0x4e, 0xe3, 0x40,
	0x10, 0xbd, 0xcd, 0xdd, 0xb9, 0xd8, 0x5c, 0x73, 0x56, 0x8a, 0x60, 0x21, 0x25, 0xb2, 0x04, 0x4a,
	0x81, 0xd7, 0x24, 0x51, 0x9a, 0x20, 0x51, 0x24, 0x42, 0xa2, 0x40, 0x28, 0x72, 0x80, 0x82, 0x26,
	0x72, 0xec, 0xc1, 0xb8, 0xc8, 0xae, 0xd9, 0x5d, 0x5b, 0x20, 0xd1, 0x51, 0xd0, 0x51, 0x50, 0xf0,
	0xbd, 0xc8, 0xbb, 0x46, 0x49, 0x20, 0xc6, 0x12, 0xe9, 0x46, 0x9e, 0xf7, 0xde, 0xbc, 0x7d, 0xe3,
	0xc1, 0x7d, 0x96, 0x00, 0x0d, 0x80, 0x8a, 0x54, 0xb8, 0x09, 0x67, 0x92, 0xb9, 0x7e, 0x04, 0x54,
	0xba, 0x92, 0xfb, 0x01, 0xb8, 0x59, 0x57, 0x17, 0x33, 0x01, 0x3c, 0x8b, 0x03, 0x20, 0x0a, 0x62,
	0xb6, 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