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

/*
Package api is a generated protocol buffer package.

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

It has these top-level messages:
	FirehoseRequest
	Query
	Comparison
	StringComparison
	IntegerComparison
	TransactionSet
	Transaction
	Call
	Service
	Timestamp
	RPCParams
	HTTPParams
	SQLParams
	MemcachedParams
	GRPCParams
*/
package api

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"`
	RequestSentTo  *StringComparison  `protobuf:"bytes,24,opt,name=request_sent_to,json=requestSentTo" json:"request_sent_to,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) GetRequestSentTo() *StringComparison {
	if m != nil {
		return m.RequestSentTo
	}
	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.api.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.api.FirehoseRequest")
	proto.RegisterType((*Query)(nil), "code.justin.tv.release.trace.api.Query")
	proto.RegisterType((*Comparison)(nil), "code.justin.tv.release.trace.api.Comparison")
	proto.RegisterType((*StringComparison)(nil), "code.justin.tv.release.trace.api.StringComparison")
	proto.RegisterType((*IntegerComparison)(nil), "code.justin.tv.release.trace.api.IntegerComparison")
	proto.RegisterEnum("code.justin.tv.release.trace.api.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.api.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.api.Trace",
	HandlerType: (*TraceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Firehose",
			Handler:       _Trace_Firehose_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "code.justin.tv/release/trace/api/api.proto",
}

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

var fileDescriptor0 = []byte{
	// 568 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd5, 0xcf, 0x6f, 0xd3, 0x30,
	0x14, 0x07, 0xf0, 0x65, 0x5d, 0xf7, 0xe3, 0x15, 0xb6, 0x60, 0x0d, 0xb0, 0x76, 0x80, 0x2a, 0x17,
	0xaa, 0x0d, 0x32, 0xe8, 0x2e, 0x5c, 0x38, 0x8c, 0x51, 0x06, 0xd2, 0x98, 0xb6, 0x24, 0xbb, 0x4c,
	0xa0, 0xc8, 0x4b, 0x9e, 0x56, 0xa3, 0x36, 0xf6, 0x6c, 0x67, 0x52, 0xff, 0x13, 0x8e, 0x1c, 0xf8,
	0x43, 0x91, 0x9d, 0x6e, 0xcb, 0xc6, 0x21, 0xa2, 0x3d, 0x54, 0xaa, 0x95, 0xf7, 0x3e, 0x5f, 0xf7,
	0xa9, 0x76, 0x60, 0x3b, 0x13, 0x39, 0x86, 0x3f, 0x4b, 0x6d, 0x78, 0x11, 0x9a, 0xeb, 0x5d, 0x85,
	0x23, 0x64, 0x1a, 0x77, 0x8d, 0x62, 0x19, 0xee, 0x32, 0xc9, 0xed, 0x27, 0x94, 0x4a, 0x18, 0x41,
	0xba, 0xf7, 0x6b, 0xc3, 0x69, 0x6d, 0xe8, 0x6a, 0x43, 0x26, 0xf9, 0x56, 0xbf, 0x51, 0x33, 0x8a,
	0x15, 0x9a, 0x65, 0x86, 0x8b, 0xa2, 0x52, 0x83, 0x11, 0x6c, 0x7c, 0xe6, 0x0a, 0x87, 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