// Code generated by protoc-gen-go.
// source: google/logging/v2/log_entry.proto
// DO NOT EDIT!

/*
Package v2 is a generated protocol buffer package.

It is generated from these files:
	google/logging/v2/log_entry.proto
	google/logging/v2/logging_config.proto
	google/logging/v2/logging_metrics.proto
	google/logging/v2/logging.proto

It has these top-level messages:
	LogEntry
	LogEntryOperation
	LogSink
	ListSinksRequest
	ListSinksResponse
	GetSinkRequest
	CreateSinkRequest
	UpdateSinkRequest
	DeleteSinkRequest
	LogMetric
	ListLogMetricsRequest
	ListLogMetricsResponse
	GetLogMetricRequest
	CreateLogMetricRequest
	UpdateLogMetricRequest
	DeleteLogMetricRequest
	DeleteLogRequest
	WriteLogEntriesRequest
	WriteLogEntriesResponse
	ListLogEntriesRequest
	ListLogEntriesResponse
	ListMonitoredResourceDescriptorsRequest
	ListMonitoredResourceDescriptorsResponse
*/
package v2

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/googleapis/proto-client-go/api"
import google_api3 "github.com/googleapis/proto-client-go/api"
import google_logging_type "github.com/googleapis/proto-client-go/logging/type_"
import google_logging_type1 "github.com/googleapis/proto-client-go/logging/type_"
import google_protobuf1 "github.com/golang/protobuf/ptypes/any"
import google_protobuf2 "github.com/golang/protobuf/ptypes/struct"
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"

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

// An individual entry in a log.
type LogEntry struct {
	// Required. The resource name of the log to which this log entry
	// belongs. The format of the name is
	// `projects/&lt;project-id&gt;/logs/&lt;log-id%gt;`.  Examples:
	// `"projects/my-projectid/logs/syslog"`,
	// `"projects/1234567890/logs/library.googleapis.com%2Fbook_log"`.
	//
	// The log ID part of resource name must be less than 512 characters
	// long and can only include the following characters: upper and
	// lower case alphanumeric characters: [A-Za-z0-9]; and punctuation
	// characters: forward-slash, underscore, hyphen, and period.
	// Forward-slash (`/`) characters in the log ID must be URL-encoded.
	LogName string `protobuf:"bytes,12,opt,name=log_name,json=logName" json:"log_name,omitempty"`
	// Required. The monitored resource associated with this log entry.
	// Example: a log entry that reports a database error would be
	// associated with the monitored resource designating the particular
	// database that reported the error.
	Resource *google_api3.MonitoredResource `protobuf:"bytes,8,opt,name=resource" json:"resource,omitempty"`
	// Required. The log entry payload, which can be one of multiple types.
	//
	// Types that are valid to be assigned to Payload:
	//	*LogEntry_ProtoPayload
	//	*LogEntry_TextPayload
	//	*LogEntry_JsonPayload
	Payload isLogEntry_Payload `protobuf_oneof:"payload"`
	// Optional. The time the event described by the log entry occurred.  If
	// omitted, Cloud Logging will use the time the log entry is written.
	Timestamp *google_protobuf3.Timestamp `protobuf:"bytes,9,opt,name=timestamp" json:"timestamp,omitempty"`
	// Optional. The severity of the log entry. The default value is
	// `LogSeverity.DEFAULT`.
	Severity google_logging_type1.LogSeverity `protobuf:"varint,10,opt,name=severity,enum=google.logging.type.LogSeverity" json:"severity,omitempty"`
	// Optional. A unique ID for the log entry. If you provide this field, the
	// logging service considers other log entries in the same log with the same
	// ID as duplicates which can be removed.
	// If omitted, Cloud Logging will generate a unique ID for this log entry.
	InsertId string `protobuf:"bytes,4,opt,name=insert_id,json=insertId" json:"insert_id,omitempty"`
	// Optional. Information about the HTTP request associated with this log entry,
	// if applicable.
	HttpRequest *google_logging_type.HttpRequest `protobuf:"bytes,7,opt,name=http_request,json=httpRequest" json:"http_request,omitempty"`
	// Optional. A set of user-defined (key, value) data that provides additional
	// information about the log entry.
	Labels map[string]string `protobuf:"bytes,11,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Optional. Information about an operation associated with the log entry, if
	// applicable.
	Operation *LogEntryOperation `protobuf:"bytes,15,opt,name=operation" json:"operation,omitempty"`
}

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

type isLogEntry_Payload interface {
	isLogEntry_Payload()
}

type LogEntry_ProtoPayload struct {
	ProtoPayload *google_protobuf1.Any `protobuf:"bytes,2,opt,name=proto_payload,json=protoPayload,oneof"`
}
type LogEntry_TextPayload struct {
	TextPayload string `protobuf:"bytes,3,opt,name=text_payload,json=textPayload,oneof"`
}
type LogEntry_JsonPayload struct {
	JsonPayload *google_protobuf2.Struct `protobuf:"bytes,6,opt,name=json_payload,json=jsonPayload,oneof"`
}

func (*LogEntry_ProtoPayload) isLogEntry_Payload() {}
func (*LogEntry_TextPayload) isLogEntry_Payload()  {}
func (*LogEntry_JsonPayload) isLogEntry_Payload()  {}

func (m *LogEntry) GetPayload() isLogEntry_Payload {
	if m != nil {
		return m.Payload
	}
	return nil
}

func (m *LogEntry) GetResource() *google_api3.MonitoredResource {
	if m != nil {
		return m.Resource
	}
	return nil
}

func (m *LogEntry) GetProtoPayload() *google_protobuf1.Any {
	if x, ok := m.GetPayload().(*LogEntry_ProtoPayload); ok {
		return x.ProtoPayload
	}
	return nil
}

func (m *LogEntry) GetTextPayload() string {
	if x, ok := m.GetPayload().(*LogEntry_TextPayload); ok {
		return x.TextPayload
	}
	return ""
}

func (m *LogEntry) GetJsonPayload() *google_protobuf2.Struct {
	if x, ok := m.GetPayload().(*LogEntry_JsonPayload); ok {
		return x.JsonPayload
	}
	return nil
}

func (m *LogEntry) GetTimestamp() *google_protobuf3.Timestamp {
	if m != nil {
		return m.Timestamp
	}
	return nil
}

func (m *LogEntry) GetHttpRequest() *google_logging_type.HttpRequest {
	if m != nil {
		return m.HttpRequest
	}
	return nil
}

func (m *LogEntry) GetLabels() map[string]string {
	if m != nil {
		return m.Labels
	}
	return nil
}

func (m *LogEntry) GetOperation() *LogEntryOperation {
	if m != nil {
		return m.Operation
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*LogEntry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _LogEntry_OneofMarshaler, _LogEntry_OneofUnmarshaler, _LogEntry_OneofSizer, []interface{}{
		(*LogEntry_ProtoPayload)(nil),
		(*LogEntry_TextPayload)(nil),
		(*LogEntry_JsonPayload)(nil),
	}
}

func _LogEntry_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*LogEntry)
	// payload
	switch x := m.Payload.(type) {
	case *LogEntry_ProtoPayload:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.ProtoPayload); err != nil {
			return err
		}
	case *LogEntry_TextPayload:
		b.EncodeVarint(3<<3 | proto.WireBytes)
		b.EncodeStringBytes(x.TextPayload)
	case *LogEntry_JsonPayload:
		b.EncodeVarint(6<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.JsonPayload); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("LogEntry.Payload has unexpected type %T", x)
	}
	return nil
}

func _LogEntry_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*LogEntry)
	switch tag {
	case 2: // payload.proto_payload
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(google_protobuf1.Any)
		err := b.DecodeMessage(msg)
		m.Payload = &LogEntry_ProtoPayload{msg}
		return true, err
	case 3: // payload.text_payload
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeStringBytes()
		m.Payload = &LogEntry_TextPayload{x}
		return true, err
	case 6: // payload.json_payload
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(google_protobuf2.Struct)
		err := b.DecodeMessage(msg)
		m.Payload = &LogEntry_JsonPayload{msg}
		return true, err
	default:
		return false, nil
	}
}

func _LogEntry_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*LogEntry)
	// payload
	switch x := m.Payload.(type) {
	case *LogEntry_ProtoPayload:
		s := proto.Size(x.ProtoPayload)
		n += proto.SizeVarint(2<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case *LogEntry_TextPayload:
		n += proto.SizeVarint(3<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(len(x.TextPayload)))
		n += len(x.TextPayload)
	case *LogEntry_JsonPayload:
		s := proto.Size(x.JsonPayload)
		n += proto.SizeVarint(6<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// Additional information about a potentially long-running operation with which
// a log entry is associated.
type LogEntryOperation struct {
	// Required. An arbitrary operation identifier. Log entries with the
	// same identifier are assumed to be part of the same operation.
	//
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Required. An arbitrary producer identifier. The combination of
	// `id` and `producer` must be globally unique.  Examples for `producer`:
	// `"MyDivision.MyBigCompany.com"`, "github.com/MyProject/MyApplication"`.
	//
	Producer string `protobuf:"bytes,2,opt,name=producer" json:"producer,omitempty"`
	// Optional. Set this to True if this is the first log entry in the operation.
	First bool `protobuf:"varint,3,opt,name=first" json:"first,omitempty"`
	// Optional. Set this to True if this is the last log entry in the operation.
	Last bool `protobuf:"varint,4,opt,name=last" json:"last,omitempty"`
}

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

func init() {
	proto.RegisterType((*LogEntry)(nil), "google.logging.v2.LogEntry")
	proto.RegisterType((*LogEntryOperation)(nil), "google.logging.v2.LogEntryOperation")
}

func init() { proto.RegisterFile("google/logging/v2/log_entry.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 577 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x94, 0x5d, 0x6f, 0xd3, 0x30,
	0x14, 0x86, 0xe9, 0xc7, 0xda, 0xe4, 0xb4, 0x1b, 0xcc, 0x1a, 0x22, 0x0b, 0x43, 0x94, 0x0d, 0x01,
	0x37, 0x73, 0x51, 0xb9, 0xd9, 0x00, 0x09, 0x51, 0x84, 0x34, 0xa4, 0x01, 0x93, 0xc7, 0xd5, 0x6e,
	0xaa, 0xb4, 0xf5, 0x52, 0x43, 0x1a, 0x87, 0xc4, 0xa9, 0xe8, 0x0f, 0xe2, 0x7f, 0xe2, 0xcf, 0xb4,
	0x6a, 0xd1, 0xee, 0x7c, 0x7c, 0x9e, 0xd7, 0xe7, 0xe4, 0xf5, 0x71, 0xe0, 0x59, 0xcc, 0x79, 0x9c,
	0xd0, 0x7e, 0xc2, 0xe3, 0x98, 0xa5, 0x71, 0x7f, 0x31, 0x50, 0xcb, 0x11, 0x4d, 0x45, 0xbe, 0xc4,
	0x59, 0xce, 0x05, 0x47, 0xfb, 0x06, 0xc1, 0x16, 0xc1, 0x8b, 0x41, 0x78, 0x64, 0x55, 0x51, 0xc6,
	0xfa, 0x51, 0x9a, 0x72, 0x11, 0x09, 0xc6, 0xd3, 0xc2, 0x08, 0xc2, 0x93, 0xb5, 0xec, 0x9c, 0xa7,
	0x4c, 0xf0, 0x9c, 0x4e, 0x47, 0x39, 0x2d, 0x78, 0x99, 0x4f, 0xa8, 0x85, 0x5e, 0x6c, 0x14, 0x16,
	0xcb, 0x8c, 0xf6, 0x67, 0x42, 0x64, 0x12, 0xfc, 0x5d, 0xd2, 0x42, 0xdc, 0xc5, 0xa9, 0x16, 0x0b,
	0xba, 0xa0, 0x39, 0x13, 0xb6, 0xcb, 0xf0, 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