// Code generated by protoc-gen-go. DO NOT EDIT.
// source: code.justin.tv/release/trace/pbmsg/api.proto

/*
Package pbmsg is a generated protocol buffer package.

It is generated from these files:
	code.justin.tv/release/trace/pbmsg/api.proto
	code.justin.tv/release/trace/pbmsg/event.proto
	code.justin.tv/release/trace/pbmsg/transaction.proto

It has these top-level messages:
	FirehoseRequest
	Query
	Comparison
	StringComparison
	IntegerComparison
	Event
	Extra
	ExtraHTTP
	ExtraSQL
	ExtraMemcached
	ExtraGRPC
	UnusedExtra
	EventSet
	Transaction
	Call
	Service
	Timestamp
	RPCParams
	HTTPParams
	SQLParams
	MemcachedParams
	GRPCParams
*/
package pbmsg

import (
	"code.justin.tv/common/chitin/grpctrace"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"

	math "math"

	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 IntegerComparison_Type int32

const (
	IntegerComparison_EQUALS  IntegerComparison_Type = 0
	IntegerComparison_GREATER IntegerComparison_Type = 1
	IntegerComparison_LESSER  IntegerComparison_Type = 2
)

var IntegerComparison_Type_name = map[int32]string{
	0: "EQUALS",
	1: "GREATER",
	2: "LESSER",
}
var IntegerComparison_Type_value = map[string]int32{
	"EQUALS":  0,
	"GREATER": 1,
	"LESSER":  2,
}

func (x IntegerComparison_Type) String() string {
	return proto.EnumName(IntegerComparison_Type_name, int32(x))
}
func (IntegerComparison_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }

type FirehoseRequest struct {
	Query    *Query  `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
	Sampling float64 `protobuf:"fixed64,2,opt,name=sampling" json:"sampling,omitempty"`
}

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

func (m *FirehoseRequest) GetQuery() *Query {
	if m != nil {
		return m.Query
	}
	return nil
}

func (m *FirehoseRequest) GetSampling() float64 {
	if m != nil {
		return m.Sampling
	}
	return 0
}

// A Query represents a collection of comparisons
// All comparisons in a Query must match on the same Call
// By default, subqueries in a Query must match the Call matched by the Query OR descendant subcalls of the matched Call
// This is overriden by the depth field
type Query struct {
	// enum Type {
	//  AND = 0;
	//  OR = 1;
	// }
	// Type type = 1;
	Subqueries  []*Query      `protobuf:"bytes,2,rep,name=subqueries" json:"subqueries,omitempty"`
	Comparisons []*Comparison `protobuf:"bytes,3,rep,name=comparisons" json:"comparisons,omitempty"`
}

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

func (m *Query) GetSubqueries() []*Query {
	if m != nil {
		return m.Subqueries
	}
	return nil
}

func (m *Query) GetComparisons() []*Comparison {
	if m != nil {
		return m.Comparisons
	}
	return nil
}

// Comparison contains the various potential comparisons each Call can handle
// Servers MUST support multiple subcomparisons being set on a single Comparison
// Clients SHOULD NOT set multiple subcomparisons on a single Comparison
// Each subcomparison maps directly to the value of a field in a Call
// You can see their definitions in transaction.proto
type Comparison struct {
	// Inverts the result of all subcomparisons
	Not            bool               `protobuf:"varint,1,opt,name=not" json:"not,omitempty"`
	ServiceName    *StringComparison  `protobuf:"bytes,20,opt,name=service_name,json=serviceName" json:"service_name,omitempty"`
	ServiceHost    *StringComparison  `protobuf:"bytes,21,opt,name=service_host,json=serviceHost" json:"service_host,omitempty"`
	ServicePid     *IntegerComparison `protobuf:"bytes,22,opt,name=service_pid,json=servicePid" json:"service_pid,omitempty"`
	ServicePeer    *StringComparison  `protobuf:"bytes,23,opt,name=service_peer,json=servicePeer" json:"service_peer,omitempty"`
	ClientDuration *IntegerComparison `protobuf:"bytes,30,opt,name=client_duration,json=clientDuration" json:"client_duration,omitempty"`
	ServerDuration *IntegerComparison `protobuf:"bytes,31,opt,name=server_duration,json=serverDuration" json:"server_duration,omitempty"`
	HttpMethod     *StringComparison  `protobuf:"bytes,40,opt,name=http_method,json=httpMethod" json:"http_method,omitempty"`
	// StringComparison http_uri_path = 41; // Removed due to PII concerns
	HttpRoute      *StringComparison  `protobuf:"bytes,42,opt,name=http_route,json=httpRoute" json:"http_route,omitempty"`
	HttpStatusCode *IntegerComparison `protobuf:"bytes,43,opt,name=http_status_code,json=httpStatusCode" json:"http_status_code,omitempty"`
}

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

func (m *Comparison) GetNot() bool {
	if m != nil {
		return m.Not
	}
	return false
}

func (m *Comparison) GetServiceName() *StringComparison {
	if m != nil {
		return m.ServiceName
	}
	return nil
}

func (m *Comparison) GetServiceHost() *StringComparison {
	if m != nil {
		return m.ServiceHost
	}
	return nil
}

func (m *Comparison) GetServicePid() *IntegerComparison {
	if m != nil {
		return m.ServicePid
	}
	return nil
}

func (m *Comparison) GetServicePeer() *StringComparison {
	if m != nil {
		return m.ServicePeer
	}
	return nil
}

func (m *Comparison) GetClientDuration() *IntegerComparison {
	if m != nil {
		return m.ClientDuration
	}
	return nil
}

func (m *Comparison) GetServerDuration() *IntegerComparison {
	if m != nil {
		return m.ServerDuration
	}
	return nil
}

func (m *Comparison) GetHttpMethod() *StringComparison {
	if m != nil {
		return m.HttpMethod
	}
	return nil
}

func (m *Comparison) GetHttpRoute() *StringComparison {
	if m != nil {
		return m.HttpRoute
	}
	return nil
}

func (m *Comparison) GetHttpStatusCode() *IntegerComparison {
	if m != nil {
		return m.HttpStatusCode
	}
	return nil
}

type StringComparison struct {
	// enum Type {
	//  EQUALS = 0;
	//  LIKE = 1;
	// }
	// Type type = 1;
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

func (m *StringComparison) Reset()                    { *m = StringComparison{} }
func (m *StringComparison) String() string            { return proto.CompactTextString(m) }
func (*StringComparison) ProtoMessage()               {}
func (*StringComparison) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *StringComparison) GetValue() string {
	if m != nil {
		return m.Value
	}
	return ""
}

type IntegerComparison struct {
	Type  IntegerComparison_Type `protobuf:"varint,1,opt,name=type,enum=code.justin.tv.release.trace.pbmsg.IntegerComparison_Type" json:"type,omitempty"`
	Value int64                  `protobuf:"zigzag64,2,opt,name=value" json:"value,omitempty"`
}

func (m *IntegerComparison) Reset()                    { *m = IntegerComparison{} }
func (m *IntegerComparison) String() string            { return proto.CompactTextString(m) }
func (*IntegerComparison) ProtoMessage()               {}
func (*IntegerComparison) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

func (m *IntegerComparison) GetType() IntegerComparison_Type {
	if m != nil {
		return m.Type
	}
	return IntegerComparison_EQUALS
}

func (m *IntegerComparison) GetValue() int64 {
	if m != nil {
		return m.Value
	}
	return 0
}

func init() {
	proto.RegisterType((*FirehoseRequest)(nil), "code.justin.tv.release.trace.pbmsg.FirehoseRequest")
	proto.RegisterType((*Query)(nil), "code.justin.tv.release.trace.pbmsg.Query")
	proto.RegisterType((*Comparison)(nil), "code.justin.tv.release.trace.pbmsg.Comparison")
	proto.RegisterType((*StringComparison)(nil), "code.justin.tv.release.trace.pbmsg.StringComparison")
	proto.RegisterType((*IntegerComparison)(nil), "code.justin.tv.release.trace.pbmsg.IntegerComparison")
	proto.RegisterEnum("code.justin.tv.release.trace.pbmsg.IntegerComparison_Type", IntegerComparison_Type_name, IntegerComparison_Type_value)
}

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

type TraceClient interface {
	Firehose(ctx context.Context, in *FirehoseRequest, opts ...grpc.CallOption) (Trace_FirehoseClient, error)
}

type traceClient struct {
	cc *grpc.ClientConn
}

func NewTraceClient(cc *grpc.ClientConn) TraceClient {
	return &traceClient{cc}
}

func (c *traceClient) Firehose(ctx context.Context, in *FirehoseRequest, opts ...grpc.CallOption) (Trace_FirehoseClient, error) {
	stream, err := grpctrace.NewClientStream(ctx, &_Trace_serviceDesc.Streams[0], c.cc, "/code.justin.tv.release.trace.pbmsg.Trace/Firehose", opts...)
	if err != nil {
		return nil, err
	}
	x := &traceFirehoseClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type Trace_FirehoseClient interface {
	Recv() (*Transaction, error)
	grpc.ClientStream
}

type traceFirehoseClient struct {
	grpc.ClientStream
}

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

// Server API for Trace service

type TraceServer interface {
	Firehose(*FirehoseRequest, Trace_FirehoseServer) error
}

func RegisterTraceServer(s *grpc.Server, srv TraceServer) {
	grpctrace.RegisterService(s, &_Trace_serviceDesc, srv)
}

func _Trace_Firehose_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(FirehoseRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(TraceServer).Firehose(m, &traceFirehoseServer{stream})
}

type Trace_FirehoseServer interface {
	Send(*Transaction) error
	grpc.ServerStream
}

type traceFirehoseServer struct {
	grpc.ServerStream
}

func (x *traceFirehoseServer) Send(m *Transaction) error {
	return x.ServerStream.SendMsg(m)
}

var _Trace_serviceDesc = grpc.ServiceDesc{
	ServiceName: "code.justin.tv.release.trace.pbmsg.Trace",
	HandlerType: (*TraceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Firehose",
			Handler:       _Trace_Firehose_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "code.justin.tv/release/trace/pbmsg/api.proto",
}

func init() { proto.RegisterFile("code.justin.tv/release/trace/pbmsg/api.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 551 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd4, 0xcd, 0x6e, 0xd3, 0x40,
	0x10, 0x07, 0xf0, 0xba, 0x6d, 0xfa, 0x31, 0x41, 0xad, 0x59, 0x15, 0x58, 0xf5, 0x00, 0x95, 0x4f,
	0x81, 0x22, 0x07, 0xa5, 0xe5, 0xc2, 0x05, 0x95, 0x12, 0xa0, 0x52, 0xa9, 0x52, 0x3b, 0x05, 0x89,
	0x03, 0xd6, 0xc6, 0x1e, 0x25, 0x8b, 0x62, 0xaf, 0xbb, 0xbb, 0x8e, 0x94, 0x03, 0x6f, 0x83, 0x78,
	0x1c, 0x9e, 0x09, 0xed, 0xe6, 0xcb, 0x2d, 0x07, 0x0c, 0xe9, 0x2d, 0xab, 0x9d, 0xf9, 0xfd, 0x47,
	0xab, 0x78, 0xe0, 0x79, 0x2c, 0x12, 0xf4, 0xbf, 0x15, 0x4a, 0xf3, 0xcc, 0xd7, 0xa3, 0xa6, 0xc4,
	0x21, 0x32, 0x85, 0x4d, 0x2d, 0x59, 0x8c, 0xcd, 0xbc, 0x97, 0xaa, 0x7e, 0x93, 0xe5, 0xdc, 0xcf,
	0xa5, 0xd0, 0x82, 0x78, 0x37, 0xab, 0xfd, 0x69, 0xb5, 0x6f, 0xab, 0x7d, 0x5b, 0xbd, 0x7f, 0x5c,
	0x41, 0xd4, 0x92, 0x65, 0x8a, 0xc5, 0x9a, 0x8b, 0x6c, 0x22, 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