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

/*
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"
	proto "github.com/golang/protobuf/proto"
)
import fmt "fmt"
import math "math"

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

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
}

// 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:"service_name,omitempty"`
	ServiceHost    *StringComparison  `protobuf:"bytes,21,opt,name=service_host" json:"service_host,omitempty"`
	ServicePid     *IntegerComparison `protobuf:"bytes,22,opt,name=service_pid" json:"service_pid,omitempty"`
	ServicePeer    *StringComparison  `protobuf:"bytes,23,opt,name=service_peer" json:"service_peer,omitempty"`
	ClientDuration *IntegerComparison `protobuf:"bytes,30,opt,name=client_duration" json:"client_duration,omitempty"`
	ServerDuration *IntegerComparison `protobuf:"bytes,31,opt,name=server_duration" json:"server_duration,omitempty"`
	HttpMethod     *StringComparison  `protobuf:"bytes,40,opt,name=http_method" json:"http_method,omitempty"`
	// StringComparison http_uri_path = 41; // Removed due to PII concerns
	HttpRoute      *StringComparison  `protobuf:"bytes,42,opt,name=http_route" json:"http_route,omitempty"`
	HttpStatusCode *IntegerComparison `protobuf:"bytes,43,opt,name=http_status_code" 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) 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} }

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

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

var fileDescriptor0 = []byte{
	// 483 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0x6e, 0xd3, 0x40,
	0x10, 0xc7, 0xeb, 0xa6, 0x6e, 0xc3, 0x18, 0xa8, 0xb1, 0xf8, 0x58, 0xf5, 0xc0, 0x87, 0x4f, 0x85,
	0xa2, 0x35, 0x4a, 0x8b, 0x84, 0x90, 0x38, 0x94, 0x2a, 0xd0, 0xa2, 0x0a, 0xd4, 0x24, 0x5c, 0x90,
	0x50, 0xb4, 0x71, 0x46, 0xc9, 0xa2, 0x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