text:
package events

import proto "github.com/gogo/protobuf/proto"
import math "math"

// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb"

import io "io"
import fmt "fmt"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"

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

// / Type of peer handling request.
type PeerType int32

const (
	PeerType_Client PeerType = 1
	PeerType_Server PeerType = 2
)

var PeerType_name = map[int32]string{
	1: "Client",
	2: "Server",
}
var PeerType_value = map[string]int32{
	"Client": 1,
	"Server": 2,
}

func (x PeerType) Enum() *PeerType {
	p := new(PeerType)
	*p = x
	return p
}
func (x PeerType) String() string {
	return proto.EnumName(PeerType_name, int32(x))
}
func (x *PeerType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(PeerType_value, data, "PeerType")
	if err != nil {
		return err
	}
	*x = PeerType(value)
	return nil
}

// / HTTP method.
type Method int32

const (
	Method_GET    Method = 1
	Method_POST   Method = 2
	Method_PUT    Method = 3
	Method_DELETE Method = 4
	Method_HEAD   Method = 5
)

var Method_name = map[int32]string{
	1: "GET",
	2: "POST",
	3: "PUT",
	4: "DELETE",
	5: "HEAD",
}
var Method_value = map[string]int32{
	"GET":    1,
	"POST":   2,
	"PUT":    3,
	"DELETE": 4,
	"HEAD":   5,
}

func (x Method) Enum() *Method {
	p := new(Method)
	*p = x
	return p
}
func (x Method) String() string {
	return proto.EnumName(Method_name, int32(x))
}
func (x *Method) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Method_value, data, "Method")
	if err != nil {
		return err
	}
	*x = Method(value)
	return nil
}

// / An HttpStart event is emitted when a client sends a request (or immediately when a server receives the request).
type HttpStart struct {
	Timestamp        *int64    `protobuf:"varint,1,req,name=timestamp" json:"timestamp,omitempty"`
	RequestId        *UUID     `protobuf:"bytes,2,req,name=requestId" json:"requestId,omitempty"`
	PeerType         *PeerType `protobuf:"varint,3,req,name=peerType,enum=events.PeerType" json:"peerType,omitempty"`
	Method           *Method   `protobuf:"varint,4,req,name=method,enum=events.Method" json:"method,omitempty"`
	Uri              *string   `protobuf:"bytes,5,req,name=uri" json:"uri,omitempty"`
	RemoteAddress    *string   `protobuf:"bytes,6,req,name=remoteAddress" json:"remoteAddress,omitempty"`
	UserAgent        *string   `protobuf:"bytes,7,req,name=userAgent" json:"userAgent,omitempty"`
	ParentRequestId  *UUID     `protobuf:"bytes,8,opt,name=parentRequestId" json:"parentRequestId,omitempty"`
	ApplicationId    *UUID     `protobuf:"bytes,9,opt,name=applicationId" json:"applicationId,omitempty"`
	InstanceIndex    *int32    `protobuf:"varint,10,opt,name=instanceIndex" json:"instanceIndex,omitempty"`
	InstanceId       *string   `protobuf:"bytes,11,opt,name=instanceId" json:"instanceId,omitempty"`
	XXX_unrecognized []byte    `json:"-"`
}

func (m *HttpStart) Reset()         { *m = HttpStart{} }
func (m *HttpStart) String() string { return proto.CompactTextString(m) }
func (*HttpStart) ProtoMessage()    {}

func (m *HttpStart) GetTimestamp() int64 {
	if m != nil && m.Timestamp != nil {
		return *m.Timestamp
	}
	return 0
}

func (m *HttpStart) GetRequestId() *UUID {
	if m != nil {
		return m.RequestId
	}
	return nil
}

func (m *HttpStart) GetPeerType() PeerType {
	if m != nil && m.PeerType != nil {
		return *m.PeerType
	}
	return PeerType_Client
}

func (m *HttpStart) GetMethod() Method {
	if m != nil && m.Method != nil {
		return *m.Method
	}
	return Method_GET
}

func (m *HttpStart) GetUri() string {
	if m != nil && m.Uri != nil {
		return *m.Uri
	}
	return ""
}

func (m *HttpStart) GetRemoteAddress() string {
	if m != nil && m.RemoteAddress != nil {
		return *m.RemoteAddress
	}
	return ""
}

func (m *HttpStart) GetUserAgent() string {
	if m != nil && m.UserAgent != nil {
		return *m.UserAgent
	}
	return ""
}

func (m *HttpStart) GetParentRequestId() *UUID {
	if m != nil {
		return m.ParentRequestId
	}
	return nil
}

func (m *HttpStart) GetApplicationId() *UUID {
	if m != nil {
		return m.ApplicationId
	}
	return nil
}

func (m *HttpStart) GetInstanceIndex() int32 {
	if m != nil && m.InstanceIndex != nil {
		return *m.InstanceIndex
	}
	return 0
}

func (m *HttpStart) GetInstanceId() string {
	if m != nil && m.InstanceId != nil {
		return *m.InstanceId
	}
	return ""
}

// / An HttpStop event is emitted when a client receives a response to its request (or when a server completes its handling and returns a response).
type HttpStop struct {
	Timestamp        *int64    `protobuf:"varint,1,req,name=timestamp" json:"timestamp,omitempty"`
	Uri              *string   `protobuf:"bytes,2,req,name=uri" json:"uri,omitempty"`
	RequestId        *UUID     `protobuf:"bytes,3,req,name=requestId" json:"requestId,omitempty"`
	PeerType         *PeerType `protobuf:"varint,4,req,name=peerType,enum=events.PeerType" json:"peerType,omitempty"`
	StatusCode       *int32    `protobuf:"varint,5,req,name=statusCode" json:"statusCode,omitempty"`
	ContentLength    *int64    `protobuf:"varint,6,req,name=contentLength" json:"contentLength,omitempty"`
	ApplicationId    *UUID     `protobuf:"bytes,7,opt,name=applicationId" json:"applicationId,omitempty"`
	XXX_unrecognized []byte    `json:"-"`
}

func (m *HttpStop) Reset()         { *m = HttpStop{} }
func (m *HttpStop) String() string { return proto.CompactTextString(m) }
func (*HttpStop) ProtoMessage()    {}

func (m *HttpStop) GetTimestamp() int64 {
	if m != nil && m.Timestamp != nil {
		return *m.Timestamp
	}
	return 0
}

func (m *HttpStop) GetUri() string {
	if m != nil && m.Uri != nil {
		return *m.Uri
	}
	return ""
}

func (m *HttpStop) GetRequestId() *UUID {
	if m != nil {
		return m.RequestId
	}
	return nil
}

func (m *HttpStop) GetPeerType() PeerType {
	if m != nil && m.PeerType != nil {
		return *m.PeerType
	}
	return PeerType_Client
}

func (m *HttpStop) GetStatusCode() int32 {
	if m != nil && m.StatusCode != nil {
		return *m.StatusCode
	}
	return 0
}

func (m *HttpStop) GetContentLength() int64 {
	if m != nil && m.ContentLength != nil {
		return *m.ContentLength
	}
	return 0
}

func (m *HttpStop) GetApplicationId() *UUID {
	if m != nil {
		return m.ApplicationId
	}
	return nil
}

// / An HttpStartStop event represents the whole lifecycle of an HTTP request.
type HttpStartStop struct {
	StartTimestamp   *int64    `protobuf:"varint,1,req,name=startTimestamp" json:"startTimestamp,omitempty"`
	StopTimestamp    *int64    `protobuf:"varint,2,req,name=stopTimestamp" json:"stopTimestamp,omitempty"`
	RequestId        *UUID     `protobuf:"bytes,3,req,name=requestId" json:"requestId,omitempty"`
	PeerType         *PeerType `protobuf:"varint,4,req,name=peerType,enum=events.PeerType" json:"peerType,omitempty"`
	Method           *Method   `protobuf:"varint,5,req,name=method,enum=events.Method" json:"method,omitempty"`
	Uri              *string   `protobuf:"bytes,6,req,name=uri" json:"uri,omitempty"`
	RemoteAddress    *string   `protobuf:"bytes,7,req,name=remoteAddress" json:"remoteAddress,omitempty"`
	UserAgent        *string   `protobuf:"bytes,8,req,name=userAgent" json:"userAgent,omitempty"`
	StatusCode       *int32    `protobuf:"varint,9,req,name=statusCode" json:"statusCode,omitempty"`
	ContentLength    *int64    `protobuf:"varint,10,req,name=contentLength" json:"contentLength,omitempty"`
	ParentRequestId  *UUID     `protobuf:"bytes,11,opt,name=parentRequestId" json:"parentRequestId,omitempty"`
	ApplicationId    *UUID     `protobuf:"bytes,12,opt,name=applicationId" json:"applicationId,omitempty"`
	InstanceIndex    *int32    `protobuf:"varint,13,opt,name=instanceIndex" json:"instanceIndex,omitempty"`
	InstanceId       *string   `protobuf:"bytes,14,opt,name=instanceId" json:"instanceId,omitempty"`
	XXX_unrecognized []byte    `json:"-"`
}

func (m *HttpStartStop) Reset()         { *m = HttpStartStop{} }
func (m *HttpStartStop) String() string { return proto.CompactTextString(m) }
func (*HttpStartStop) ProtoMessage()    {}

func (m *HttpStartStop) GetStartTimestamp() int64 {
	if m != nil && m.StartTimestamp != nil {
		return *m.StartTimestamp
	}
	return 0
}

func (m *HttpStartStop) GetStopTimestamp() int64 {
	if m != nil && m.StopTimestamp != nil {
		return *m.StopTimestamp
	}
	return 0
}

func (m *HttpStartStop) GetRequestId() *UUID {
	if m != nil {
		return m.RequestId
	}
	return nil
}

func (m *HttpStartStop) GetPeerType() PeerType {
	if m != nil && m.PeerType != nil {
		return *m.PeerType
	}
	return PeerType_Client
}

func (m *HttpStartStop) GetMethod() Method {
	if m != nil && m.Method != nil {
		return *m.Method
	}
	return Method_GET
}

func (m *HttpStartStop) GetUri() string {
	if m != nil && m.Uri != nil {
		return *m.Uri
	}
	return ""
}

func (m *HttpStartStop) GetRemoteAddress() string {
	if m != nil && m.RemoteAddress != nil {
		return *m.RemoteAddress
	}
	return ""
}

func (m *HttpStartStop) GetUserAgent() string {
	if m != nil && m.UserAgent != nil {
		return *m.UserAgent
	}
	return ""
}

func (m *HttpStartStop) GetStatusCode() int32 {
	if m != nil && m.StatusCode != nil {
		return *m.StatusCode
	}
	return 0
}

func (m *HttpStartStop) GetContentLength() int64 {
	if m != nil && m.ContentLength != nil {
		return *m.ContentLength
	}
	return 0
}

func (m *HttpStartStop) GetParentRequestId() *UUID {
	if m != nil {
		return m.ParentRequestId
	}
	return nil
}

func (m *HttpStartStop) GetApplicationId() *UUID {
	if m != nil {
		return m.ApplicationId
	}
	return nil
}

func (m *HttpStartStop) GetInstanceIndex() int32 {
	if m != nil && m.InstanceIndex != nil {
		return *m.InstanceIndex
	}
	return 0
}

func (m *HttpStartStop) GetInstanceId() string {
	if m != nil && m.InstanceId != nil {
		return *m.InstanceId
	}
	return ""
}

func init() {
	proto.RegisterEnum("events.PeerType", PeerType_name, PeerType_value)
	proto.RegisterEnum("events.Method", Method_name, Method_value)
}
func (m *HttpStart) Unmarshal(data []byte) error {
	var hasFields [1]uint64
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Timestamp = &v
			hasFields[0] |= uint64(0x00000001)
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.RequestId == nil {
				m.RequestId = &UUID{}
			}
			if err := m.RequestId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
			hasFields[0] |= uint64(0x00000002)
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PeerType", wireType)
			}
			var v PeerType
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (PeerType(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.PeerType = &v
			hasFields[0] |= uint64(0x00000004)
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
			}
			var v Method
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (Method(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Method = &v
			hasFields[0] |= uint64(0x00000008)
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.Uri = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000010)
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.RemoteAddress = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000020)
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.UserAgent = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000040)
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ParentRequestId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ParentRequestId == nil {
				m.ParentRequestId = &UUID{}
			}
			if err := m.ParentRequestId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 9:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ApplicationId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ApplicationId == nil {
				m.ApplicationId = &UUID{}
			}
			if err := m.ApplicationId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 10:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field InstanceIndex", wireType)
			}
			var v int32
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.InstanceIndex = &v
		case 11:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InstanceId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.InstanceId = &s
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	if hasFields[0]&uint64(0x00000001) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp")
	}
	if hasFields[0]&uint64(0x00000002) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	}
	if hasFields[0]&uint64(0x00000004) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	}
	if hasFields[0]&uint64(0x00000008) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("method")
	}
	if hasFields[0]&uint64(0x00000010) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	}
	if hasFields[0]&uint64(0x00000020) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress")
	}
	if hasFields[0]&uint64(0x00000040) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent")
	}

	return nil
}
func (m *HttpStop) Unmarshal(data []byte) error {
	var hasFields [1]uint64
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Timestamp = &v
			hasFields[0] |= uint64(0x00000001)
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.Uri = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000002)
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.RequestId == nil {
				m.RequestId = &UUID{}
			}
			if err := m.RequestId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
			hasFields[0] |= uint64(0x00000004)
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PeerType", wireType)
			}
			var v PeerType
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (PeerType(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.PeerType = &v
			hasFields[0] |= uint64(0x00000008)
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType)
			}
			var v int32
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.StatusCode = &v
			hasFields[0] |= uint64(0x00000010)
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ContentLength", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.ContentLength = &v
			hasFields[0] |= uint64(0x00000020)
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ApplicationId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ApplicationId == nil {
				m.ApplicationId = &UUID{}
			}
			if err := m.ApplicationId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	if hasFields[0]&uint64(0x00000001) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp")
	}
	if hasFields[0]&uint64(0x00000002) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	}
	if hasFields[0]&uint64(0x00000004) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	}
	if hasFields[0]&uint64(0x00000008) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	}
	if hasFields[0]&uint64(0x00000010) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode")
	}
	if hasFields[0]&uint64(0x00000020) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength")
	}

	return nil
}
func (m *HttpStartStop) Unmarshal(data []byte) error {
	var hasFields [1]uint64
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.StartTimestamp = &v
			hasFields[0] |= uint64(0x00000001)
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field StopTimestamp", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.StopTimestamp = &v
			hasFields[0] |= uint64(0x00000002)
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.RequestId == nil {
				m.RequestId = &UUID{}
			}
			if err := m.RequestId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
			hasFields[0] |= uint64(0x00000004)
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PeerType", wireType)
			}
			var v PeerType
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (PeerType(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.PeerType = &v
			hasFields[0] |= uint64(0x00000008)
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
			}
			var v Method
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (Method(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Method = &v
			hasFields[0] |= uint64(0x00000010)
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.Uri = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000020)
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.RemoteAddress = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000040)
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.UserAgent = &s
			index = postIndex
			hasFields[0] |= uint64(0x00000080)
		case 9:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType)
			}
			var v int32
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.StatusCode = &v
			hasFields[0] |= uint64(0x00000100)
		case 10:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ContentLength", wireType)
			}
			var v int64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.ContentLength = &v
			hasFields[0] |= uint64(0x00000200)
		case 11:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ParentRequestId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ParentRequestId == nil {
				m.ParentRequestId = &UUID{}
			}
			if err := m.ParentRequestId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 12:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ApplicationId", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ApplicationId == nil {
				m.ApplicationId = &UUID{}
			}
			if err := m.ApplicationId.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 13:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field InstanceIndex", wireType)
			}
			var v int32
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int32(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.InstanceIndex = &v
		case 14:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InstanceId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				stringLen |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + int(stringLen)
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			s := string(data[index:postIndex])
			m.InstanceId = &s
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	if hasFields[0]&uint64(0x00000001) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("startTimestamp")
	}
	if hasFields[0]&uint64(0x00000002) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("stopTimestamp")
	}
	if hasFields[0]&uint64(0x00000004) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	}
	if hasFields[0]&uint64(0x00000008) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	}
	if hasFields[0]&uint64(0x00000010) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("method")
	}
	if hasFields[0]&uint64(0x00000020) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	}
	if hasFields[0]&uint64(0x00000040) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress")
	}
	if hasFields[0]&uint64(0x00000080) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent")
	}
	if hasFields[0]&uint64(0x00000100) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode")
	}
	if hasFields[0]&uint64(0x00000200) == 0 {
		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength")
	}

	return nil
}
func (m *HttpStart) Size() (n int) {
	var l int
	_ = l
	if m.Timestamp != nil {
		n += 1 + sovHttp(uint64(*m.Timestamp))
	}
	if m.RequestId != nil {
		l = m.RequestId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.PeerType != nil {
		n += 1 + sovHttp(uint64(*m.PeerType))
	}
	if m.Method != nil {
		n += 1 + sovHttp(uint64(*m.Method))
	}
	if m.Uri != nil {
		l = len(*m.Uri)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.RemoteAddress != nil {
		l = len(*m.RemoteAddress)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.UserAgent != nil {
		l = len(*m.UserAgent)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.ParentRequestId != nil {
		l = m.ParentRequestId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.ApplicationId != nil {
		l = m.ApplicationId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.InstanceIndex != nil {
		n += 1 + sovHttp(uint64(*m.InstanceIndex))
	}
	if m.InstanceId != nil {
		l = len(*m.InstanceId)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *HttpStop) Size() (n int) {
	var l int
	_ = l
	if m.Timestamp != nil {
		n += 1 + sovHttp(uint64(*m.Timestamp))
	}
	if m.Uri != nil {
		l = len(*m.Uri)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.RequestId != nil {
		l = m.RequestId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.PeerType != nil {
		n += 1 + sovHttp(uint64(*m.PeerType))
	}
	if m.StatusCode != nil {
		n += 1 + sovHttp(uint64(*m.StatusCode))
	}
	if m.ContentLength != nil {
		n += 1 + sovHttp(uint64(*m.ContentLength))
	}
	if m.ApplicationId != nil {
		l = m.ApplicationId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *HttpStartStop) Size() (n int) {
	var l int
	_ = l
	if m.StartTimestamp != nil {
		n += 1 + sovHttp(uint64(*m.StartTimestamp))
	}
	if m.StopTimestamp != nil {
		n += 1 + sovHttp(uint64(*m.StopTimestamp))
	}
	if m.RequestId != nil {
		l = m.RequestId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.PeerType != nil {
		n += 1 + sovHttp(uint64(*m.PeerType))
	}
	if m.Method != nil {
		n += 1 + sovHttp(uint64(*m.Method))
	}
	if m.Uri != nil {
		l = len(*m.Uri)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.RemoteAddress != nil {
		l = len(*m.RemoteAddress)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.UserAgent != nil {
		l = len(*m.UserAgent)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.StatusCode != nil {
		n += 1 + sovHttp(uint64(*m.StatusCode))
	}
	if m.ContentLength != nil {
		n += 1 + sovHttp(uint64(*m.ContentLength))
	}
	if m.ParentRequestId != nil {
		l = m.ParentRequestId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.ApplicationId != nil {
		l = m.ApplicationId.Size()
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.InstanceIndex != nil {
		n += 1 + sovHttp(uint64(*m.InstanceIndex))
	}
	if m.InstanceId != nil {
		l = len(*m.InstanceId)
		n += 1 + l + sovHttp(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func sovHttp(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozHttp(x uint64) (n int) {
	return sovHttp(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *HttpStart) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *HttpStart) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Timestamp == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp")
	} else {
		data[i] = 0x8
		i++
		i = encodeVarintHttp(data, i, uint64(*m.Timestamp))
	}
	if m.RequestId == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	} else {
		data[i] = 0x12
		i++
		i = encodeVarintHttp(data, i, uint64(m.RequestId.Size()))
		n1, err := m.RequestId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	if m.PeerType == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	} else {
		data[i] = 0x18
		i++
		i = encodeVarintHttp(data, i, uint64(*m.PeerType))
	}
	if m.Method == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("method")
	} else {
		data[i] = 0x20
		i++
		i = encodeVarintHttp(data, i, uint64(*m.Method))
	}
	if m.Uri == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	} else {
		data[i] = 0x2a
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.Uri)))
		i += copy(data[i:], *m.Uri)
	}
	if m.RemoteAddress == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress")
	} else {
		data[i] = 0x32
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.RemoteAddress)))
		i += copy(data[i:], *m.RemoteAddress)
	}
	if m.UserAgent == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent")
	} else {
		data[i] = 0x3a
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.UserAgent)))
		i += copy(data[i:], *m.UserAgent)
	}
	if m.ParentRequestId != nil {
		data[i] = 0x42
		i++
		i = encodeVarintHttp(data, i, uint64(m.ParentRequestId.Size()))
		n2, err := m.ParentRequestId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n2
	}
	if m.ApplicationId != nil {
		data[i] = 0x4a
		i++
		i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size()))
		n3, err := m.ApplicationId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n3
	}
	if m.InstanceIndex != nil {
		data[i] = 0x50
		i++
		i = encodeVarintHttp(data, i, uint64(*m.InstanceIndex))
	}
	if m.InstanceId != nil {
		data[i] = 0x5a
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.InstanceId)))
		i += copy(data[i:], *m.InstanceId)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *HttpStop) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *HttpStop) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Timestamp == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp")
	} else {
		data[i] = 0x8
		i++
		i = encodeVarintHttp(data, i, uint64(*m.Timestamp))
	}
	if m.Uri == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	} else {
		data[i] = 0x12
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.Uri)))
		i += copy(data[i:], *m.Uri)
	}
	if m.RequestId == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	} else {
		data[i] = 0x1a
		i++
		i = encodeVarintHttp(data, i, uint64(m.RequestId.Size()))
		n4, err := m.RequestId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n4
	}
	if m.PeerType == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	} else {
		data[i] = 0x20
		i++
		i = encodeVarintHttp(data, i, uint64(*m.PeerType))
	}
	if m.StatusCode == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode")
	} else {
		data[i] = 0x28
		i++
		i = encodeVarintHttp(data, i, uint64(*m.StatusCode))
	}
	if m.ContentLength == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength")
	} else {
		data[i] = 0x30
		i++
		i = encodeVarintHttp(data, i, uint64(*m.ContentLength))
	}
	if m.ApplicationId != nil {
		data[i] = 0x3a
		i++
		i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size()))
		n5, err := m.ApplicationId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *HttpStartStop) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *HttpStartStop) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.StartTimestamp == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("startTimestamp")
	} else {
		data[i] = 0x8
		i++
		i = encodeVarintHttp(data, i, uint64(*m.StartTimestamp))
	}
	if m.StopTimestamp == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("stopTimestamp")
	} else {
		data[i] = 0x10
		i++
		i = encodeVarintHttp(data, i, uint64(*m.StopTimestamp))
	}
	if m.RequestId == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId")
	} else {
		data[i] = 0x1a
		i++
		i = encodeVarintHttp(data, i, uint64(m.RequestId.Size()))
		n6, err := m.RequestId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n6
	}
	if m.PeerType == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType")
	} else {
		data[i] = 0x20
		i++
		i = encodeVarintHttp(data, i, uint64(*m.PeerType))
	}
	if m.Method == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("method")
	} else {
		data[i] = 0x28
		i++
		i = encodeVarintHttp(data, i, uint64(*m.Method))
	}
	if m.Uri == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri")
	} else {
		data[i] = 0x32
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.Uri)))
		i += copy(data[i:], *m.Uri)
	}
	if m.RemoteAddress == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress")
	} else {
		data[i] = 0x3a
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.RemoteAddress)))
		i += copy(data[i:], *m.RemoteAddress)
	}
	if m.UserAgent == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent")
	} else {
		data[i] = 0x42
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.UserAgent)))
		i += copy(data[i:], *m.UserAgent)
	}
	if m.StatusCode == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode")
	} else {
		data[i] = 0x48
		i++
		i = encodeVarintHttp(data, i, uint64(*m.StatusCode))
	}
	if m.ContentLength == nil {
		return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength")
	} else {
		data[i] = 0x50
		i++
		i = encodeVarintHttp(data, i, uint64(*m.ContentLength))
	}
	if m.ParentRequestId != nil {
		data[i] = 0x5a
		i++
		i = encodeVarintHttp(data, i, uint64(m.ParentRequestId.Size()))
		n7, err := m.ParentRequestId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n7
	}
	if m.ApplicationId != nil {
		data[i] = 0x62
		i++
		i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size()))
		n8, err := m.ApplicationId.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n8
	}
	if m.InstanceIndex != nil {
		data[i] = 0x68
		i++
		i = encodeVarintHttp(data, i, uint64(*m.InstanceIndex))
	}
	if m.InstanceId != nil {
		data[i] = 0x72
		i++
		i = encodeVarintHttp(data, i, uint64(len(*m.InstanceId)))
		i += copy(data[i:], *m.InstanceId)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func encodeFixed64Http(data []byte, offset int, v uint64) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	data[offset+4] = uint8(v >> 32)
	data[offset+5] = uint8(v >> 40)
	data[offset+6] = uint8(v >> 48)
	data[offset+7] = uint8(v >> 56)
	return offset + 8
}
func encodeFixed32Http(data []byte, offset int, v uint32) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	return offset + 4
}
func encodeVarintHttp(data []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		data[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	data[offset] = uint8(v)
	return offset + 1
}


text:
package codegen

import (
	"strconv"

	"github.com/llir/llvm/ir"
	"github.com/llir/llvm/ir/value"
)

type ResultType int

const (
	VOID    ResultType = iota // fragment will not produce a value
	VALUE                     // fragment will produce a value
	POINTER                   // fragment will produce a pointer value
)

type FragmentType int

const (
	MODULE FragmentType = iota
	FUNCTIONS
	BLOCKS
	INSTRUCTIONS
)

// Fragment represents a fragment of instructions in asm
type Fragment interface {
	Append(fragment Fragment)
	AppendWithResultPropogation(fragment Fragment)
	GetResultType() ResultType
	GetResult() value.Value
}

type ModuleFragment struct {
	Module *ir.Module
}

func NewModuleFragment(module *ir.Module) *ModuleFragment {
	if module == nil {
		module = ir.NewModule()
	}

	return &ModuleFragment{Module: module}
}

func (moduleFragment *ModuleFragment) Append(fragment Fragment) {
	switch f := fragment.(type) {
	case *ModuleFragment:
		panic("Cannot append module to module")
	case *FunctionsFragment:
		moduleFragment.Module.Funcs = append(moduleFragment.Module.Funcs, f.Functions...)

		for _, function := range f.Functions {
			function.Parent = moduleFragment.Module
		}
	case *BlocksFragment:
		panic("Cannot append blocks to module")
	case *InstructionsFragment:
		panic("Cannot append instructions to module")
	}
}

func (moduleFragment *ModuleFragment) AppendWithResultPropogation(fragment Fragment) {
	moduleFragment.Append(fragment)
}

func (moduleFragment *ModuleFragment) GetResultType() ResultType {
	return VOID
}

func (moduleFragment *ModuleFragment) GetResult() value.Value {
	return nil
}

type FunctionsFragment struct {
	Functions       []*ir.Func
	currentFunction *ir.Func
}

func NewFunctionsFragment() *FunctionsFragment {
	functions := make([]*ir.Func, 0)

	return &FunctionsFragment{Functions: functions, currentFunction: nil}
}

func (functionsFragment *FunctionsFragment) AddFunc(function *ir.Func) {
	if function == nil {
		panic("Cannot add nil function")
	}

	functionsFragment.Functions = append(functionsFragment.Functions, function)
	functionsFragment.currentFunction = function
}

func (functionsFragment *FunctionsFragment) Append(fragment Fragment) {
	switch f := fragment.(type) {
	case *ModuleFragment:
		panic("Cannot append module to function")
	case *FunctionsFragment:
		if f.Functions != nil && len(f.Functions) > 0 {
			functionsFragment.Functions = append(functionsFragment.Functions, f.Functions...)

			functionsFragment.currentFunction = f.currentFunction
		}
	case *BlocksFragment:
		if functionsFragment.currentFunction == nil {
			panic("FunctionsFragment does not contain any function")
		}
		blocks := functionsFragment.currentFunction.Blocks

		// Chain new blocks to existing blocks
		numberOfBlocks := len(blocks)
		if numberOfBlocks > 0 && blocks[numberOfBlocks-1].Term == nil && len(f.Blocks) > 0 {
			blocks[numberOfBlocks-1].NewBr(f.Blocks[0])
		}

		functionsFragment.currentFunction.Blocks = append(blocks, f.Blocks...)

		for _, block := range f.Blocks {
			block.Parent = functionsFragment.currentFunction
		}
	case *InstructionsFragment:
		blockLength := len(functionsFragment.currentFunction.Blocks)
		lastBlock := functionsFragment.currentFunction.Blocks[blockLength-1]
		instructions := lastBlock.Insts

		lastBlock.Insts = append(instructions, f.Instructions...)
	}
}

func (functionsFragment *FunctionsFragment) AppendWithResultPropogation(fragment Fragment) {
	functionsFragment.Append(fragment)
}

func (functionsFragment *FunctionsFragment) GetResultType() ResultType {
	return VOID
}

func (functionsFragment *FunctionsFragment) GetResult() value.Value {
	return nil
}

type BlocksFragment struct {
	Blocks       []*ir.Block
	CurrentBlock *ir.Block
	resultType   ResultType
	resultValue  value.Value
}

func NewBlocksFragment(resultType ResultType) *BlocksFragment {
	blocks := make([]*ir.Block, 0)

	return &BlocksFragment{Blocks: blocks, CurrentBlock: nil, resultType: resultType, resultValue: nil}
}

func (blocksFragment *BlocksFragment) Append(fragment Fragment) {
	switch f := fragment.(type) {
	case *ModuleFragment:
		panic("Cannot append blocks to module")
	case *FunctionsFragment:
		panic("Cannot append blocks to functions")
	case *BlocksFragment:
		if len(f.Blocks) > 0 {
			blocksFragment.ChainBlocks(f.Blocks...)
			blocksFragment.Blocks = append(blocksFragment.Blocks, f.Blocks...)
			blocksFragment.CurrentBlock = f.CurrentBlock
		}

	case *InstructionsFragment:
		blocksFragment.CurrentBlock.Insts = append(blocksFragment.CurrentBlock.Insts, f.Instructions...)
	}
}

func (blocksFragment *BlocksFragment) AppendWithResultPropogation(fragment Fragment) {
	switch f := fragment.(type) {
	case *ModuleFragment:
		panic("Cannot append blocks to module")
	case *FunctionsFragment:
		panic("Cannot append blocks to functions")
	case *BlocksFragment:
		if len(f.Blocks) > 0 {
			blocksFragment.ChainBlocks(f.Blocks...)
			blocksFragment.Blocks = append(blocksFragment.Blocks, f.Blocks...)
			blocksFragment.CurrentBlock = f.CurrentBlock

			blocksFragment.resultType = f.resultType
			blocksFragment.resultValue = f.resultValue
		}

	case *InstructionsFragment:
		blocksFragment.CurrentBlock.Insts = append(blocksFragment.CurrentBlock.Insts, f.Instructions...)
	}
}

func (blocksFragment *BlocksFragment) GetResultType() ResultType {
	return blocksFragment.resultType
}

func (blocksFragment *BlocksFragment) GetResult() value.Value {
	switch blocksFragment.resultType {
	case VOID:
		return nil
	case VALUE, POINTER:
		return blocksFragment.resultValue
	default:
		panic("does not support other result type" + strconv.Itoa((int)(blocksFragment.resultType)))
	}
}

func (blocksFragment *BlocksFragment) NewBlock(name string) {
	newBlock := ir.NewBlock(name)

	blocksFragment.ChainBlocks(newBlock)
	blocksFragment.Blocks = append(blocksFragment.Blocks, newBlock)
	blocksFragment.CurrentBlock = newBlock
}

func (blocksFragment *BlocksFragment) AddBlock(block *ir.Block) {
	if block == nil {
		return
	}
	blocksFragment.ChainBlocks(block)
	blocksFragment.Blocks = append(blocksFragment.Blocks, block)
	blocksFragment.CurrentBlock = block

}

func (blocksFragment *BlocksFragment) ChainBlocks(blocks ...*ir.Block) {
	if blocksFragment.CurrentBlock != nil && blocksFragment.CurrentBlock.Term == nil &&
		blocks != nil && len(blocks) > 0 {
		blocksFragment.CurrentBlock.NewBr(blocks[0])
	}
}

type InstructionsFragment struct {
	Instructions       []ir.Instruction
	currentInstruction *ir.Instruction
	resultType         ResultType
	resultValue        value.Value
}

func NewInstructionsFragment(resultType ResultType) *InstructionsFragment {
	instructions := make([]ir.Instruction, 0)

	return &InstructionsFragment{Instructions: instructions, currentInstruction: nil, resultType: resultType, resultValue: nil}
}

func (instructionsFragment *InstructionsFragment) Append(fragment Fragment) {
	switch f := fragment.(type) {
	case *ModuleFragment:
		panic("Cannot append instructions to module")
	case *FunctionsFragment:
		panic("Cannot append instructions to functions")
	case *BlocksFragment:
		panic("Cannot append instructions to blocks")
	case *InstructionsFragment:
		instructionsFragment.Instructions = append(instructionsFragment.Instructions, f.Instructions...)
		instructionsFragment.currentInstruction = f.currentInstruction
	}
}

func (instructionsFragment *InstructionsFragment) AppendWithResultPropogation(fragment Fragment) {

}

func (instructionsFragment *InstructionsFragment) GetResultType() ResultType {
	return instructionsFragment.resultType
}

func (instructionsFragment *InstructionsFragment) GetResult() value.Value {
	switch instructionsFragment.resultType {
	case VOID:
		return nil
	case VALUE:
		return instructionsFragment.resultValue
	default:
		panic("does not support other result type" + strconv.Itoa((int)(instructionsFragment.resultType)))
	}
}

func (instructionsFragment *InstructionsFragment) AddInstruction(instr ir.Instruction) {
	instructionsFragment.Instructions = append(instructionsFragment.Instructions, instr)
}

redpajama_set_name: RedPajamaGithub


text:
// Template Source: BaseEntityCollectionPage.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the MIT License.  See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.requests;
import com.microsoft.graph.models.ExternalDomainName;
import com.microsoft.graph.requests.ExternalDomainNameCollectionRequestBuilder;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import com.microsoft.graph.requests.ExternalDomainNameCollectionResponse;
import com.microsoft.graph.http.BaseCollectionPage;

// **NOTE** This file was generated by a tool and any changes will be overwritten.

/**
 * The class for the External Domain Name Collection Page.
 */
public class ExternalDomainNameCollectionPage extends BaseCollectionPage<ExternalDomainName, ExternalDomainNameCollectionRequestBuilder> {

    /**
     * A collection page for ExternalDomainName
     *
     * @param response the serialized ExternalDomainNameCollectionResponse from the service
     * @param builder  the request builder for the next collection page
     */
    public ExternalDomainNameCollectionPage(@Nonnull final ExternalDomainNameCollectionResponse response, @Nonnull final ExternalDomainNameCollectionRequestBuilder builder) {
        super(response, builder);
    }

    /**
     * Creates the collection page for ExternalDomainName
     *
     * @param pageContents       the contents of this page
     * @param nextRequestBuilder the request builder for the next page
     */
    public ExternalDomainNameCollectionPage(@Nonnull final java.util.List<ExternalDomainName> pageContents, @Nullable final ExternalDomainNameCollectionRequestBuilder nextRequestBuilder) {
        super(pageContents, nextRequestBuilder);
    }
}


text:
{% load i18n %}
{% load rest_framework %}
{% trans "None" as none_choice %}

  {% if field.label %}

      {{ field.label }}

  {% endif %}

    {% if style.inline %}

        {% if field.allow_null or field.allow_blank %}

            <input type="radio" name="{{ field.name }}" value="" {% if not field.value %}checked{% endif %} />
            {{ none_choice }}

        {% endif %}

        {% for key, text in field.choices.items %}

            <input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key|as_string == field.value|as_string %}checked{% endif %}>
            {{ text }}

        {% endfor %}

    {% else %}
      {% if field.allow_null or field.allow_blank %}

            <input type="radio" name="{{ field.name }}" value="" {% if not field.value %}checked{% endif %} />
            {{ none_choice }}

      {% endif %}

      {% for key, text in field.choices.items %}

            <input type="radio" name="{{ field.name }}" value="{{ key }}" {% if key|as_string == field.value|as_string %}checked{% endif %}>
            {{ text }}

      {% endfor %}
    {% endif %}

    {% if field.errors %}
      {% for error in field.errors %}
        {{ error }}
      {% endfor %}
    {% endif %}

    {% if field.help_text %}
      {{ field.help_text|safe }}
    {% endif %}


text:
			Posted on

			by


text:
package com.amazonaws.services.workmail.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListResourcesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The identifier for the organization under which the resources exist.
     *

     */
    private String organizationId;
    /**
     *

     * The token to use to retrieve the next page of results. The first call does not contain any tokens.
     *

     */
    private String nextToken;
    /**
     *

     * The maximum number of results to return in a single call.
     *

     */
    private Integer maxResults;

    /**
     *

     * The identifier for the organization under which the resources exist.
     *

     *
     * @param organizationId
     *        The identifier for the organization under which the resources exist.
     */

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    /**
     *

     * The identifier for the organization under which the resources exist.
     *

     *
     * @return The identifier for the organization under which the resources exist.
     */

    public String getOrganizationId() {
        return this.organizationId;
    }

    /**
     *

     * The identifier for the organization under which the resources exist.
     *

     *
     * @param organizationId
     *        The identifier for the organization under which the resources exist.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListResourcesRequest withOrganizationId(String organizationId) {
        setOrganizationId(organizationId);
        return this;
    }

    /**
     *

     * The token to use to retrieve the next page of results. The first call does not contain any tokens.
     *

     *
     * @param nextToken
     *        The token to use to retrieve the next page of results. The first call does not contain any tokens.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * The token to use to retrieve the next page of results. The first call does not contain any tokens.
     *

     *
     * @return The token to use to retrieve the next page of results. The first call does not contain any tokens.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * The token to use to retrieve the next page of results. The first call does not contain any tokens.
     *

     *
     * @param nextToken
     *        The token to use to retrieve the next page of results. The first call does not contain any tokens.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListResourcesRequest withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     *

     * The maximum number of results to return in a single call.
     *

     *
     * @param maxResults
     *        The maximum number of results to return in a single call.
     */

    public void setMaxResults(Integer maxResults) {
        this.maxResults = maxResults;
    }

    /**
     *

     * The maximum number of results to return in a single call.
     *

     *
     * @return The maximum number of results to return in a single call.
     */

    public Integer getMaxResults() {
        return this.maxResults;
    }

    /**
     *

     * The maximum number of results to return in a single call.
     *

     *
     * @param maxResults
     *        The maximum number of results to return in a single call.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ListResourcesRequest withMaxResults(Integer maxResults) {
        setMaxResults(maxResults);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getOrganizationId() != null)
            sb.append("OrganizationId: ").append(getOrganizationId()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken()).append(",");
        if (getMaxResults() != null)
            sb.append("MaxResults: ").append(getMaxResults());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListResourcesRequest == false)
            return false;
        ListResourcesRequest other = (ListResourcesRequest) obj;
        if (other.getOrganizationId() == null ^ this.getOrganizationId() == null)
            return false;
        if (other.getOrganizationId() != null && other.getOrganizationId().equals(this.getOrganizationId()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        if (other.getMaxResults() == null ^ this.getMaxResults() == null)
            return false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
        return hashCode;
    }

    @Override
    public ListResourcesRequest clone() {
        return (ListResourcesRequest) super.clone();
    }

}


text:
require 'spec_helper'

describe AdminDashboard do
  subject { AdminDashboard.new }

  context 'sidekiq errors' do
    it 'detects if sidekiq workers are not running' do
      ps = Sidekiq::ProcessSet.any_instance
      ps.expects(:size).returns(0)
      expect(subject.problems.size).to be(1)
    end

    it 'does not insert if sidekiq is running' do
      Sidekiq::ProcessSet.any_instance.stubs(:size).returns(5)
      expect(subject.problems.size).to be(0)
    end
  end
end


text:
package azkaban.trigger.builtin;

import java.util.HashMap;
import java.util.Map;

import azkaban.executor.ExecutableFlow;
import azkaban.executor.ExecutableNode;
import azkaban.executor.ExecutorManagerAdapter;
import azkaban.executor.ExecutorManagerException;
import azkaban.executor.Status;
import azkaban.trigger.ConditionChecker;

/**
 * 任务执行检查器,实现{@link ConditionChecker},
 * 每个(job,wantedStatus)都分配这样的一个执行检查器
 */
public class ExecutionChecker implements ConditionChecker {

  public static final String type = "ExecutionChecker";
  public static ExecutorManagerAdapter executorManager;

  private String checkerId;
  private int execId;
  private String jobName;
  private Status wantedStatus;

  public ExecutionChecker(String checkerId, int execId, String jobName,
      Status wantedStatus) {
    this.checkerId = checkerId;
    this.execId = execId;
    this.jobName = jobName;
    this.wantedStatus = wantedStatus;
  }

  public static void setExecutorManager(ExecutorManagerAdapter em) {
    executorManager = em;
  }

    /**
     * 检查任务节点是否达到想要的状态{@link ExecutionChecker#wantedStatus}
     * @return
     */
  @Override
  public Object eval() {
    ExecutableFlow exflow;
    try {
      exflow = executorManager.getExecutableFlow(execId);
    } catch (ExecutorManagerException e) {
      e.printStackTrace();
      return Boolean.FALSE;
    }
    if (jobName != null) {
      ExecutableNode job = exflow.getExecutableNode(jobName);
      if (job != null) {
        return job.getStatus().equals(wantedStatus);
      } else {
        return Boolean.FALSE;
      }
    } else {
      return exflow.getStatus().equals(wantedStatus);
    }

  }

  @Override
  public Object getNum() {
    return null;
  }

  @Override
  public void reset() {
  }

  @Override
  public String getId() {
    return checkerId;
  }

  @Override
  public String getType() {
    return type;
  }

  public static ExecutionChecker createFromJson(HashMap<String, Object> jsonObj)
      throws Exception {
    if (!jsonObj.get("type").equals(type)) {
      throw new Exception("Cannot create checker of " + type + " from "
          + jsonObj.get("type"));
    }
    int execId = Integer.valueOf((String) jsonObj.get("execId"));
    String jobName = null;
    if (jsonObj.containsKey("jobName")) {
      jobName = (String) jsonObj.get("jobName");
    }
    String checkerId = (String) jsonObj.get("checkerId");
    Status wantedStatus = Status.valueOf((String) jsonObj.get("wantedStatus"));

    return new ExecutionChecker(checkerId, execId, jobName, wantedStatus);
  }

  @SuppressWarnings("unchecked")
  @Override
  public ConditionChecker fromJson(Object obj) throws Exception {
    return createFromJson((HashMap<String, Object>) obj);
  }

  @Override
  public Object toJson() {
    Map<String, Object> jsonObj = new HashMap<String, Object>();
    jsonObj.put("type", type);
    jsonObj.put("execId", String.valueOf(execId));
    if (jobName != null) {
      jsonObj.put("jobName", jobName);
    }
    jsonObj.put("wantedStatus", wantedStatus.toString());
    jsonObj.put("checkerId", checkerId);
    return jsonObj;
  }

  @Override
  public void stopChecker() {
  }

  @Override
  public void setContext(Map<String, Object> context) {
  }

  @Override
  public long getNextCheckTime() {
    return -1;
  }

}


text:
package org.axonframework.disruptor.commandhandling;

import org.axonframework.common.AxonTransientException;

/**
 * Exception indicating that the changes in an aggregate (generated events) are ignored by the DisruptorCommandBus,
 * because it cannot guarantee that these changes have been applied to an aggregate instance with the correct state. The
 * DisruptorCommandBus will automatically recover by clearing cached information of blacklisted aggregates. Because of
 * the asynchronous nature of the DisruptorCommandBus, several commands may fail due to the same corrupt aggregate.
 *

 * When a corrupt aggregate has been detected, a {@link AggregateBlacklistedException} is thrown. Each subsequent time
 * state changes are applied to a blacklisted aggregate, an AggregateStateCorruptedException is thrown.
 *

 * It is generally safe to retry any commands that resulted in this exception, unless the cause is clearly
 * non-transient.
 *
 * @author Allard Buijze
 * @since 2.0
 */
public class AggregateStateCorruptedException extends AxonTransientException {

    private static final long serialVersionUID = 133015394552568435L;

    private final String aggregateIdentifier;

    /**
     * Initializes the exception with given {@code aggregateIdentifier} and given explanatory {@code message}.
     *
     * @param aggregateIdentifier The identifier of the blacklisted aggregate
     * @param message             The message explaining why the blacklisting occurred
     */
    public AggregateStateCorruptedException(String aggregateIdentifier, String message) {
        super(message);
        this.aggregateIdentifier = aggregateIdentifier;
    }

    /**
     * Initializes the exception with given {@code aggregateIdentifier}, given explanatory {@code message} and {@code
     * cause}.
     *
     * @param aggregateIdentifier The identifier of the blacklisted aggregate
     * @param message             The message explaining why the blacklisting occurred
     * @param cause               The cause of the blacklist
     */
    public AggregateStateCorruptedException(String aggregateIdentifier, String message, Throwable cause) {
        super(message, cause);
        this.aggregateIdentifier = aggregateIdentifier;
    }

    /**
     * Returns the identifier of the blacklisted aggregate.
     *
     * @return the identifier of the blacklisted aggregate
     */
    public String getAggregateIdentifier() {
        return aggregateIdentifier;
    }
}


text:
package kafka

import (
	"strings"

	"github.com/nuclio/logger"
)

type SaramaLogger struct {
	logger logger.Logger
}

func NewSaramaLogger(parentLogger logger.Logger) SaramaLogger {
	return SaramaLogger{parentLogger.GetChild("sarama")}
}

func (s SaramaLogger) Print(v ...interface{}) {
	format := strings.Repeat("%v", len(v))
	s.output(format, v...)
}

func (s SaramaLogger) Printf(format string, v ...interface{}) {
	s.output(format, v...)
}

func (s SaramaLogger) Println(v ...interface{}) {
	format := strings.Repeat("%v", len(v))
	s.output(format, v...)
}

func (s SaramaLogger) output(format string, v ...interface{}) {
	s.logger.Debug("Sarama: "+strings.TrimSuffix(format, "\n"), v...)
}


text:
@import 'open-color/open-color.css';

.container {
  composes: dashboard_content from 'STYLES/common.css';
}

.card_container {
  composes: card_container from 'STYLES/common.css';
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  &::after {
    transform: translate(10px,10px) !important;
  }
}

.cardBg {
  width: 100%;
  transform: initial !important;
}

.info_container_wrapper {
  width: 100%;
  position: relative;

  &:not(:first-child) {
    border-top: 1px solid var(--oc-gray-2);
  }
}

.subSection {
  background-color: var(--oc-gray-1) !important;
}

.subDragableWrapper {
}

.subDragableSection {
  padding: 0 !important;
}

.inputContainer {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.sectionInput {
  min-width: initial;
  max-width: 250px;
  padding: 0;
  flex: initial;
}

.subSection-clickable {
  composes: subSection;

  &:hover {
    background-color: var(--oc-gray-3) !important;
  }

  &:not(:first-child) {
    border-top: 1px solid var(--oc-gray-3);
  }
}

.base_container {
  &:not(:first-child) {
    border-top: 1px solid var(--oc-gray-2);
  }
}

.info_container {
  display: flex;
  flex-direction: row;
  padding: 0 15px;
  align-items: center;
  composes: base_container;
}

.info_container_large {
  composes: info_container;
  padding: 15px;
}

.check_info_container {
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.3s;

  &:hover {
    background-color: var(--oc-gray-2);
  }
}

.check_container {
  margin: 0 15px;
}

.info {
  flex: 1;
  display: flex;
  align-items: center;
}

.info_loading {
  composes: modal-z-index from 'STYLES/common.css';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  min-height: auto;
}

.tipsoIntro {
  display: inline-block;
  position: relative;
  color: var(--oc-gray-5);
}

.tipsoWrapper {
  padding: 0 10px;
}

.tipso {
  min-width: 150px;
  font-size: 12px;
  line-height: 1.5em;
}

@media (max-width: 600px) {
  .inputContainer {
    justify-content: flex-end;
  }
}


text:
describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      scan(/(\$[A-Z]+)/) do |client, data, captures|
        client.say(channel: data.channel, text: "There were #{captures.count} captures: #{captures.join(', ')}.")
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  it 'captures' do
    expect(message: 'quote $YHOO and $MSFT').to respond_with_slack_message('There were 2 captures: $YHOO, $MSFT.')
  end
end


text:
package com.github.czyzby.uedi.stereotype.impl;

import java.lang.reflect.Member;

import com.github.czyzby.uedi.stereotype.Default;
import com.github.czyzby.uedi.stereotype.Named;

/** Always provides the same object.
 *
 * @author MJ
 *
 * @param <Type> type of singleton instance. */
public class SingletonProvider<Type> implements DelegateProvider<Type>, Named {
    private final Type instance;
    private final Class<Type> type;
    private final String name;
    private final boolean isDefault;

    /** @param instance will always be provided. */
    @SuppressWarnings("unchecked")
    public SingletonProvider(final Type instance) {
        this.instance = instance;
        type = (Class<Type>) instance.getClass();
        name = Providers.getName(instance);
        isDefault = instance instanceof Default;
    }

    @Override
    public boolean isDefault() {
        return isDefault;
    }

    @Override
    public Object getWrappedObject() {
        return instance;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Class<? extends Type> getType() {
        return type;
    }

    @Override
    public Type provide(final Object target, final Member member) {
        return instance;
    }
}


text:
public class MyBase<K, V>
{
	public class Callback
	{ }

	public void Hello (Callback cb)
	{ }
}

public class X : MyBase<string, int>
{
	public X (Callback cb)
	{ }

	public void Test (Callback cb)
	{
		Hello (cb);
	}

	public static void Main ()
	{ }
}


text:
    <rd-widget  class="headed" ng-if="!pedidodet" >

Novos

Aprovação

Aprovados

Liberados

Pendentes

Remetidos

        <rd-widget-body>

                        NÚMERO
                        CLIENTE
                        E-MAIL
                        VALOR
                        PAGAMENTO

                        {{x[campos.indexOf("Simp3")]}}  ({{x[0]}})
                        {{x[campos.indexOf("Nome")]}}
                        {{x[campos.indexOf("E-mail")]}}
                        {{x[campos.indexOf("Total sem frete")]}}
                        {{x[campos.indexOf("Pagamento")]}}

        </rd-widget-body>
    </rd-widget>
    <rd-widget  class="headed" ng-if="pedidodet">
        <rd-widget-body>

            <button type="button"  class="btn btn-success" ng-click="geravenda()" ng-disabled="venda.numero" ng-if="selector == 1">Criar Venda</button>
            <button type="button"  class="btn btn-success" ng-click="CadastraCliente()" ng-disabled="cliente[0].CODIGO" ng-if="selector == 1">Cadastra Cliente</button>
            <button type="button"  class="btn btn-success" ng-click="ConfirmaPedido()" ng-if="selector == 3">Confirma Pagamento</button>
            <button type="button"  class="btn btn-success" ng-click="GeraNota()" ng-if="selector == 5">Gerar Nota</button>

            <button type="button" class="close" aria-label="Close" ng-click="fechadetalhe()"></button>

           Nome Cliente {{cliente[0].FANTASIA || 'cliente não cadastrado'}}
           Codigo  {{cliente[0].CODIGO}}
           Venda Loja {{venda.numero || 'venda não existe'}}

                        ID
                        PRODUTO
                        QTD
                        PREÇO
                        TOTAL

                        {{x[campos.indexOf("Simp3")]}}
                        {{x[campos.indexOf("Nome Produto")]}}
                        {{x[campos.indexOf("Qtd")]}}
                        {{x[campos.indexOf("Preço unit")]}}
                        {{x[campos.indexOf("Qtd")] * x[campos.indexOf("Preço unit")]}}

        </rd-widget-body>
    </rd-widget>


text:
package com.google.security.zynamics.binnavi.Gui.StandardEditPanel;

/**
 * This package contains a panel that can be used to edit all elements stored in a database that
 * have a name, a description, a creation date and a modification date.
 */


text:
"""
Upload a file to a server (or other filesystem)

Usage:

    python upload.py FILENAME <FS URL>

example:

    python upload.py foo.txt ftp://example.org/uploads/

"""

import sys

import os

from fs import open_fs

_, file_path, fs_url = sys.argv
filename = os.path.basename(file_path)

with open_fs(fs_url) as fs:
    if fs.exists(filename):
        print("destination exists! aborting.")
    else:
        with open(file_path, "rb") as bin_file:
            fs.upload(filename, bin_file)
print("upload successful!")


text:
from collections import defaultdict
import logging

import networkx

from .pathprioritizer import PathPrioritizer
from .errors import AngrAnnotatedCFGError, AngrExitError
from .analyses.cfg.cfg_node import CFGNode

l = logging.getLogger("angr.annocfg")

class AnnotatedCFG(object):
    """
    AnnotatedCFG is a control flow graph with statement whitelists and exit whitelists to describe a slice of the
    program.
    """
    def __init__(self, project, cfg=None, detect_loops=False):
        """
        Constructor.

        :param project: The angr Project instance
        :param cfg: Control flow graph. Only used when path prioritizer is used.
        :param detect_loops: Only used when path prioritizer is used.
        """
        self._project = project

        self._cfg = None
        self._target = None

        self._run_statement_whitelist = defaultdict(list)
        self._exit_taken = defaultdict(list)
        self._addr_to_run = {}
        self._addr_to_last_stmt_id = {}
        self._loops = []
        self._path_merge_points = [ ]
        self._path_prioritizer = None

        if cfg is not None:
            self._cfg = cfg

            #if target_irsb_addr is not None:
            #    self._path_prioritizer = PathPrioritizer(self._cfg, self._target)

        if self._cfg is not None:
            for run in self._cfg.nodes():
                self._addr_to_run[self.get_addr(run)] = run

    #
    # Public methods
    #

    def from_digraph(self, digraph):
        """
        Initialize this AnnotatedCFG object with a networkx.DiGraph consisting of the following
        form of nodes:

        Tuples like (block address, statement ID)

        Those nodes are connected by edges indicating the execution flow.

        :param digraph: A networkx.DiGraph object
        """

        for n1 in digraph.nodes_iter():
            addr1, stmt_idx1 = n1
            self.add_statements_to_whitelist(addr1, (stmt_idx1,))

            successors = digraph[n1]
            for n2 in successors:
                addr2, stmt_idx2 = n2

                if addr1 != addr2:
                    # There is a control flow transition from block `addr1` to block `addr2`
                    self.add_exit_to_whitelist(addr1, addr2)

                self.add_statements_to_whitelist(addr2, (stmt_idx2,))

    def get_addr(self, run):
        if isinstance(run, CFGNode):
            return run.addr
        elif type(run) in (int, long):
            return run
        else:
            raise AngrAnnotatedCFGError("Unknown type '%s' of the 'run' argument" % type(run))

    def add_block_to_whitelist(self, block):
        addr = self.get_addr(block)
        self._run_statement_whitelist[addr] = True

    def add_statements_to_whitelist(self, block, stmt_ids):
        addr = self.get_addr(block)
        if type(stmt_ids) is bool:
            if type(self._run_statement_whitelist[addr]) is list and self._run_statement_whitelist[addr]:
                raise Exception("WTF")
            self._run_statement_whitelist[addr] = stmt_ids
        elif -1 in stmt_ids:
            self._run_statement_whitelist[addr] = True
        else:
            self._run_statement_whitelist[addr].extend(stmt_ids)
            self._run_statement_whitelist[addr] = \
                sorted(list(set(self._run_statement_whitelist[addr])))

    def add_exit_to_whitelist(self, run_from, run_to):
        addr_from = self.get_addr(run_from)
        addr_to = self.get_addr(run_to)
        self._exit_taken[addr_from].append(addr_to)

    def set_last_statement(self, block_addr, stmt_id):
        self._addr_to_last_stmt_id[block_addr] = stmt_id

    def add_loop(self, loop_tuple):
        """
        A loop tuple contains a series of IRSB addresses that form a loop. Ideally
        it always starts with the first IRSB that we meet during the execution.
        """
        self._loops.append(loop_tuple)

    def set_path_merge_points(self, points):
        self._path_merge_points = points.copy()

    def should_take_exit(self, addr_from, addr_to):
        if addr_from in self._exit_taken:
            return addr_to in self._exit_taken[addr_from]

        return False

    def should_execute_statement(self, addr, stmt_id):
        if self._run_statement_whitelist is None:
            return True
        elif addr in self._run_statement_whitelist:
            r = self._run_statement_whitelist[addr]
            if isinstance(r, bool):
                return r
            else:
                return stmt_id in self._run_statement_whitelist[addr]
        return False

    def get_run(self, addr):
        if addr in self._addr_to_run:
            return self._addr_to_run[addr]
        return None

    def get_whitelisted_statements(self, addr):
        """
        :returns: True if all statements are whitelisted
        """
        if addr in self._run_statement_whitelist:
            if self._run_statement_whitelist[addr] is True:
                return None # This is the default value used to say
                            # we execute all statements in this basic block. A
                            # little weird...

            else:
                return self._run_statement_whitelist[addr]

        else:
            return []

    def get_last_statement_index(self, addr):
        if addr in self._exit_taken:
            return None
        if addr in self._addr_to_last_stmt_id:
            return self._addr_to_last_stmt_id[addr]
        elif addr in self._run_statement_whitelist:
            return max(self._run_statement_whitelist[addr])
        return None

    def get_loops(self):
        return self._loops

    def get_targets(self, source_addr):
        if source_addr in self._exit_taken:
            return self._exit_taken[source_addr]
        return None

    #
    # Debugging helpers
    #

    def dbg_repr(self):
        ret_str = ""

        ret_str += "IRSBs:\n"
        for addr, run in self._addr_to_run.items():
            if addr is None:
                continue
            ret_str += "%#x => %s\n" % (addr, run)
        l.debug("statements: ")
        for addr, stmts in self._run_statement_whitelist.items():
            if addr is None:
                continue
            ret_str += "Address 0x%08x:\n" % addr
            l.debug(stmts)
        l.debug("Loops: ")
        for loop in self._loops:
            s = ""
            for addr in loop:
                s += "0x%08x -> " % addr
            ret_str += s + "\n"

        return ret_str

    def dbg_print_irsb(self, irsb_addr, project=None):
        """
        Pretty-print an IRSB with whitelist information
        """

        if project is None:
            project = self._project

        if project is None:
            raise Exception("Dict addr_to_run is empty. " + \
                            "Give me a project, and I'll recreate the IRSBs for you.")
        else:
            vex_block = project.factory.block(irsb_addr).vex

        statements = vex_block.statements
        whitelist = self.get_whitelisted_statements(irsb_addr)
        for i in range(0, len(statements)):
            if whitelist is True or i in whitelist:
                line = "+"
            else:
                line = "-"
            line += "[% 3d] " % i
            # We cannot get data returned by pp(). WTF?
            print line,
            statements[i].pp()

    #
    # Helper methods for path priorization
    #

    def keep_path(self, path):
        """
        Given a path, returns True if the path should be kept, False if it should be cut.
        """
        if len(path.addr_trace) < 2:
            return True

        return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1])

    def filter_path(self, path):
        """
        Used for debugging.

        :param path: A Path instance
        :return: True/False
        """

        return True

    def merge_points(self, path):
        addr = path.addr
        if addr in self._path_merge_points:
            return {self._path_merge_points[addr]}
        else:
            return set()

    def path_priority(self, path):
        """
        Given a path, returns the path priority. A lower number means a higher priority.
        """
        return self._path_prioritizer.get_priority(path)

    def successor_func(self, path):
        """
        Callback routine that takes in a path, and returns all feasible successors to path group. This callback routine
        should be passed to the keyword argument "successor_func" of PathGroup.step().

        :param path: A Path instance.
        :return: A list of all feasible Path successors.
        """

        whitelist = self.get_whitelisted_statements(path.addr)
        last_stmt = self.get_last_statement_index(path.addr)

        # pass in those arguments
        successors = path.step(
            stmt_whitelist=whitelist,
            last_stmt=None
        )

        # further filter successors based on the annotated CFG
        taken_successors = [ ]
        for suc in successors:
            try:
                taken = self.should_take_exit(path.addr, suc.addr)
            except AngrExitError:
                l.debug("Got an unknown exit that AnnotatedCFG does not know about: %#x -> %#x", path.addr, suc.addr)
                continue

            if taken:
                taken_successors.append(suc)

        return taken_successors

    #
    # Overridden methods
    #

    def __getstate__(self):
        state = {}
        state['_run_statement_whitelist'] = self._run_statement_whitelist
        state['_exit_taken'] = self._exit_taken
        # state['_addr_to_run'] = self._addr_to_run
        state['_addr_to_last_stmt_id'] = self._addr_to_last_stmt_id
        state['_loops'] = self._loops
        state['_path_merge_points'] = self._path_merge_points
        state['_path_prioritizer'] = self._path_prioritizer
        state['_cfg'] = None
        state['_project'] = None
        state['_addr_to_run'] = None
        return state

    #
    # Private methods
    #

    def _detect_loops(self):
        temp_graph = networkx.DiGraph()
        for source, target_list in self._cfg._edge_map.items():
            for target in target_list:
                temp_graph.add_edge(source, target)
        ctr = 0
        for loop_lst in networkx.simple_cycles(temp_graph):
            l.debug("A loop is found. %d", ctr)
            ctr += 1
            loop = (tuple([x[-1] for x in loop_lst]))
            print " => ".join(["0x%08x" % x for x in loop])
            self.add_loop(loop)


text:
package io.njlr.lockstep.tests.network.channels;

import java.net.InetAddress;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;

import io.njlr.bytes.Bytes;
import io.njlr.lockstep.network.ChannelContext;
import io.njlr.lockstep.network.ChannelFactory;
import io.njlr.lockstep.network.ChannelListener;
import io.njlr.lockstep.network.NetworkAddress;
import io.njlr.lockstep.network.channels.PacketLossChannelDecorator;
import io.njlr.lockstep.network.session.ChannelBinding;
import io.njlr.lockstep.network.session.ChannelCodes;
import io.njlr.lockstep.network.session.NetworkSession;

public final class TwoWayReliability {

	private TwoWayReliability() {

		super();
	}

	public static final void test(final ChannelFactory channelFactory, final float packetLossChance, final Bytes messageA, final Bytes messageB) throws Exception {

		final ExecutorService executorService = Executors.newFixedThreadPool(2);

		final NetworkAddress senderAddress = NetworkAddress.of(InetAddress.getLocalHost(), 1234);
		final NetworkAddress receiverAddress = NetworkAddress.of(InetAddress.getLocalHost(), 4567);

		final Task taskA = new Task(senderAddress.port(), receiverAddress, channelFactory, packetLossChance, messageA);
		final Task taskB = new Task(receiverAddress.port(), senderAddress, channelFactory, packetLossChance, messageB);

		executorService.submit(taskA);
		executorService.submit(taskB);

		final Bytes resultA = taskB.future().get(); // Calling get inside an assert does not block!
		final Bytes resultB = taskB.future().get();

		assert(resultA.equals(messageB));
		assert(resultB.equals(messageA));

		// No need to tidy-up; JUnit does it for us
	}

	private static final class Task implements Runnable {

		private final int port;
		private final NetworkAddress remoteAddress;
		private final ChannelFactory channelFactory;
		private final float packetLossChance;

		private final Bytes message;

		private final SettableFuture<Bytes> future;

		public ListenableFuture<Bytes> future() {

			return this.future;
		}

		public Task(final int port, final NetworkAddress remoteAddress, final ChannelFactory channelFactory, final float packetLossChance, final Bytes message) {

			this.port = port;
			this.remoteAddress = remoteAddress;
			this.channelFactory = channelFactory;
			this.packetLossChance = packetLossChance;
			this.message = message;

			future = SettableFuture.create();
		}

		@Override
		public void run() {

			final NetworkSession networkSession = new NetworkSession(port);

			final ChannelBinding binding = new ChannelBinding(remoteAddress, ChannelCodes.ReliableOrdered1);

			networkSession.startAsync();

			final ChannelListener listener = new ChannelListener() {

				@Override
				public synchronized void handle(final Bytes message) {

					assert(!future.isDone());

					future.set(message);
				};
			};

			networkSession.connect(
					binding,
					(final ChannelContext context) -> { return new PacketLossChannelDecorator(channelFactory.create(context), packetLossChance); },
					listener);

			try {

				Thread.sleep(new Random().nextInt(3000));
			} catch (final InterruptedException e) {

				e.printStackTrace();
			}

			networkSession.send(binding, message);
		}
	}
}