com.google.api.servicecontrol.v1.LogEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of endpoints-management-protos Show documentation
Show all versions of endpoints-management-protos Show documentation
Contains the generated protocol buffer surface used by Endpoints
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v1/log_entry.proto
package com.google.api.servicecontrol.v1;
/**
*
* An individual log entry.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.LogEntry}
*/
public final class LogEntry extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.LogEntry)
LogEntryOrBuilder {
// Use LogEntry.newBuilder() to construct.
private LogEntry(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private LogEntry() {
name_ = "";
severity_ = 0;
insertId_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private LogEntry(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 18: {
com.google.protobuf.Any.Builder subBuilder = null;
if (payloadCase_ == 2) {
subBuilder = ((com.google.protobuf.Any) payload_).toBuilder();
}
payload_ =
input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.Any) payload_);
payload_ = subBuilder.buildPartial();
}
payloadCase_ = 2;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
payloadCase_ = 3;
payload_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
insertId_ = s;
break;
}
case 50: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (payloadCase_ == 6) {
subBuilder = ((com.google.protobuf.Struct) payload_).toBuilder();
}
payload_ =
input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.Struct) payload_);
payload_ = subBuilder.buildPartial();
}
payloadCase_ = 6;
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 90: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (timestamp_ != null) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
break;
}
case 96: {
int rawValue = input.readEnum();
severity_ = rawValue;
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000010;
}
com.google.protobuf.MapEntry
labels = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(labels.getKey(), labels.getValue());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 13:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.LogEntry.class, com.google.api.servicecontrol.v1.LogEntry.Builder.class);
}
private int bitField0_;
private int payloadCase_ = 0;
private java.lang.Object payload_;
public enum PayloadCase
implements com.google.protobuf.Internal.EnumLite {
PROTO_PAYLOAD(2),
TEXT_PAYLOAD(3),
STRUCT_PAYLOAD(6),
PAYLOAD_NOT_SET(0);
private final int value;
private PayloadCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PayloadCase valueOf(int value) {
return forNumber(value);
}
public static PayloadCase forNumber(int value) {
switch (value) {
case 2: return PROTO_PAYLOAD;
case 3: return TEXT_PAYLOAD;
case 6: return STRUCT_PAYLOAD;
case 0: return PAYLOAD_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public static final int NAME_FIELD_NUMBER = 10;
private volatile java.lang.Object name_;
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIMESTAMP_FIELD_NUMBER = 11;
private com.google.protobuf.Timestamp timestamp_;
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public boolean hasTimestamp() {
return timestamp_ != null;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return getTimestamp();
}
public static final int SEVERITY_FIELD_NUMBER = 12;
private int severity_;
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public int getSeverityValue() {
return severity_;
}
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public com.google.logging.type.LogSeverity getSeverity() {
com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.valueOf(severity_);
return result == null ? com.google.logging.type.LogSeverity.UNRECOGNIZED : result;
}
public static final int INSERT_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object insertId_;
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public java.lang.String getInsertId() {
java.lang.Object ref = insertId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
insertId_ = s;
return s;
}
}
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public com.google.protobuf.ByteString
getInsertIdBytes() {
java.lang.Object ref = insertId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
insertId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 13;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int PROTO_PAYLOAD_FIELD_NUMBER = 2;
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public com.google.protobuf.Any getProtoPayload() {
if (payloadCase_ == 2) {
return (com.google.protobuf.Any) payload_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public com.google.protobuf.AnyOrBuilder getProtoPayloadOrBuilder() {
if (payloadCase_ == 2) {
return (com.google.protobuf.Any) payload_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
public static final int TEXT_PAYLOAD_FIELD_NUMBER = 3;
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public java.lang.String getTextPayload() {
java.lang.Object ref = "";
if (payloadCase_ == 3) {
ref = payload_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (payloadCase_ == 3) {
payload_ = s;
}
return s;
}
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public com.google.protobuf.ByteString
getTextPayloadBytes() {
java.lang.Object ref = "";
if (payloadCase_ == 3) {
ref = payload_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (payloadCase_ == 3) {
payload_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STRUCT_PAYLOAD_FIELD_NUMBER = 6;
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public com.google.protobuf.Struct getStructPayload() {
if (payloadCase_ == 6) {
return (com.google.protobuf.Struct) payload_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public com.google.protobuf.StructOrBuilder getStructPayloadOrBuilder() {
if (payloadCase_ == 6) {
return (com.google.protobuf.Struct) payload_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (payloadCase_ == 2) {
output.writeMessage(2, (com.google.protobuf.Any) payload_);
}
if (payloadCase_ == 3) {
com.google.protobuf.GeneratedMessage.writeString(output, 3, payload_);
}
if (!getInsertIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 4, insertId_);
}
if (payloadCase_ == 6) {
output.writeMessage(6, (com.google.protobuf.Struct) payload_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessage.writeString(output, 10, name_);
}
if (timestamp_ != null) {
output.writeMessage(11, getTimestamp());
}
if (severity_ != com.google.logging.type.LogSeverity.DEFAULT.getNumber()) {
output.writeEnum(12, severity_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
output.writeMessage(13, labels);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (payloadCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.google.protobuf.Any) payload_);
}
if (payloadCase_ == 3) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, payload_);
}
if (!getInsertIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(4, insertId_);
}
if (payloadCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (com.google.protobuf.Struct) payload_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(10, name_);
}
if (timestamp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getTimestamp());
}
if (severity_ != com.google.logging.type.LogSeverity.DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(12, severity_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, labels);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.servicecontrol.v1.LogEntry)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.LogEntry other = (com.google.api.servicecontrol.v1.LogEntry) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasTimestamp() == other.hasTimestamp());
if (hasTimestamp()) {
result = result && getTimestamp()
.equals(other.getTimestamp());
}
result = result && severity_ == other.severity_;
result = result && getInsertId()
.equals(other.getInsertId());
result = result && internalGetLabels().equals(
other.internalGetLabels());
result = result && getPayloadCase().equals(
other.getPayloadCase());
if (!result) return false;
switch (payloadCase_) {
case 2:
result = result && getProtoPayload()
.equals(other.getProtoPayload());
break;
case 3:
result = result && getTextPayload()
.equals(other.getTextPayload());
break;
case 6:
result = result && getStructPayload()
.equals(other.getStructPayload());
break;
case 0:
default:
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
hash = (37 * hash) + SEVERITY_FIELD_NUMBER;
hash = (53 * hash) + severity_;
hash = (37 * hash) + INSERT_ID_FIELD_NUMBER;
hash = (53 * hash) + getInsertId().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
switch (payloadCase_) {
case 2:
hash = (37 * hash) + PROTO_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getProtoPayload().hashCode();
break;
case 3:
hash = (37 * hash) + TEXT_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getTextPayload().hashCode();
break;
case 6:
hash = (37 * hash) + STRUCT_PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getStructPayload().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.LogEntry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.LogEntry parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v1.LogEntry parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.api.servicecontrol.v1.LogEntry prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* An individual log entry.
*
*
* Protobuf type {@code google.api.servicecontrol.v1.LogEntry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.LogEntry)
com.google.api.servicecontrol.v1.LogEntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 13:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 13:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.LogEntry.class, com.google.api.servicecontrol.v1.LogEntry.Builder.class);
}
// Construct using com.google.api.servicecontrol.v1.LogEntry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
name_ = "";
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
severity_ = 0;
insertId_ = "";
internalGetMutableLabels().clear();
payloadCase_ = 0;
payload_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_descriptor;
}
public com.google.api.servicecontrol.v1.LogEntry getDefaultInstanceForType() {
return com.google.api.servicecontrol.v1.LogEntry.getDefaultInstance();
}
public com.google.api.servicecontrol.v1.LogEntry build() {
com.google.api.servicecontrol.v1.LogEntry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.api.servicecontrol.v1.LogEntry buildPartial() {
com.google.api.servicecontrol.v1.LogEntry result = new com.google.api.servicecontrol.v1.LogEntry(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
if (timestampBuilder_ == null) {
result.timestamp_ = timestamp_;
} else {
result.timestamp_ = timestampBuilder_.build();
}
result.severity_ = severity_;
result.insertId_ = insertId_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
if (payloadCase_ == 2) {
if (protoPayloadBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = protoPayloadBuilder_.build();
}
}
if (payloadCase_ == 3) {
result.payload_ = payload_;
}
if (payloadCase_ == 6) {
if (structPayloadBuilder_ == null) {
result.payload_ = payload_;
} else {
result.payload_ = structPayloadBuilder_.build();
}
}
result.bitField0_ = to_bitField0_;
result.payloadCase_ = payloadCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.servicecontrol.v1.LogEntry) {
return mergeFrom((com.google.api.servicecontrol.v1.LogEntry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v1.LogEntry other) {
if (other == com.google.api.servicecontrol.v1.LogEntry.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
if (other.severity_ != 0) {
setSeverityValue(other.getSeverityValue());
}
if (!other.getInsertId().isEmpty()) {
insertId_ = other.insertId_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
switch (other.getPayloadCase()) {
case PROTO_PAYLOAD: {
mergeProtoPayload(other.getProtoPayload());
break;
}
case TEXT_PAYLOAD: {
payloadCase_ = 3;
payload_ = other.payload_;
onChanged();
break;
}
case STRUCT_PAYLOAD: {
mergeStructPayload(other.getStructPayload());
break;
}
case PAYLOAD_NOT_SET: {
break;
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.api.servicecontrol.v1.LogEntry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.servicecontrol.v1.LogEntry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int payloadCase_ = 0;
private java.lang.Object payload_;
public PayloadCase
getPayloadCase() {
return PayloadCase.forNumber(
payloadCase_);
}
public Builder clearPayload() {
payloadCase_ = 0;
payload_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Required. The log to which this log entry belongs. Examples: `"syslog"`,
* `"book_log"`.
*
*
* optional string name = 10;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp timestamp_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public boolean hasTimestamp() {
return timestampBuilder_ != null || timestamp_ != null;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public com.google.protobuf.Timestamp getTimestamp() {
if (timestampBuilder_ == null) {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
} else {
return timestampBuilder_.getMessage();
}
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public Builder setTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestamp_ = value;
onChanged();
} else {
timestampBuilder_.setMessage(value);
}
return this;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public Builder setTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampBuilder_ == null) {
timestamp_ = builderForValue.build();
onChanged();
} else {
timestampBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (timestamp_ != null) {
timestamp_ =
com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
} else {
timestamp_ = value;
}
onChanged();
} else {
timestampBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public Builder clearTimestamp() {
if (timestampBuilder_ == null) {
timestamp_ = null;
onChanged();
} else {
timestamp_ = null;
timestampBuilder_ = null;
}
return this;
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
onChanged();
return getTimestampFieldBuilder().getBuilder();
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
if (timestampBuilder_ != null) {
return timestampBuilder_.getMessageOrBuilder();
} else {
return timestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
}
/**
*
* The time the event described by the log entry occurred. If
* omitted, defaults to operation start time.
*
*
* optional .google.protobuf.Timestamp timestamp = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimestampFieldBuilder() {
if (timestampBuilder_ == null) {
timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTimestamp(),
getParentForChildren(),
isClean());
timestamp_ = null;
}
return timestampBuilder_;
}
private int severity_ = 0;
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public int getSeverityValue() {
return severity_;
}
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public Builder setSeverityValue(int value) {
severity_ = value;
onChanged();
return this;
}
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public com.google.logging.type.LogSeverity getSeverity() {
com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.valueOf(severity_);
return result == null ? com.google.logging.type.LogSeverity.UNRECOGNIZED : result;
}
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public Builder setSeverity(com.google.logging.type.LogSeverity value) {
if (value == null) {
throw new NullPointerException();
}
severity_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The severity of the log entry. The default value is
* `LogSeverity.DEFAULT`.
*
*
* optional .google.logging.type.LogSeverity severity = 12;
*/
public Builder clearSeverity() {
severity_ = 0;
onChanged();
return this;
}
private java.lang.Object insertId_ = "";
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public java.lang.String getInsertId() {
java.lang.Object ref = insertId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
insertId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public com.google.protobuf.ByteString
getInsertIdBytes() {
java.lang.Object ref = insertId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
insertId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public Builder setInsertId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
insertId_ = value;
onChanged();
return this;
}
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public Builder clearInsertId() {
insertId_ = getDefaultInstance().getInsertId();
onChanged();
return this;
}
/**
*
* A unique ID for the log entry used for deduplication. If omitted,
* the implementation will generate one based on operation_id.
*
*
* optional string insert_id = 4;
*/
public Builder setInsertIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
insertId_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
getMutableLabels().clear();
return this;
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
getMutableLabels().remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
getMutableLabels().put(key, value);
return this;
}
/**
*
* A set of user-defined (key, value) data that provides additional
* information about the log entry.
*
*
* map<string, string> labels = 13;
*/
public Builder putAllLabels(
java.util.Map values) {
getMutableLabels().putAll(values);
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> protoPayloadBuilder_;
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public com.google.protobuf.Any getProtoPayload() {
if (protoPayloadBuilder_ == null) {
if (payloadCase_ == 2) {
return (com.google.protobuf.Any) payload_;
}
return com.google.protobuf.Any.getDefaultInstance();
} else {
if (payloadCase_ == 2) {
return protoPayloadBuilder_.getMessage();
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public Builder setProtoPayload(com.google.protobuf.Any value) {
if (protoPayloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
protoPayloadBuilder_.setMessage(value);
}
payloadCase_ = 2;
return this;
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public Builder setProtoPayload(
com.google.protobuf.Any.Builder builderForValue) {
if (protoPayloadBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
protoPayloadBuilder_.setMessage(builderForValue.build());
}
payloadCase_ = 2;
return this;
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public Builder mergeProtoPayload(com.google.protobuf.Any value) {
if (protoPayloadBuilder_ == null) {
if (payloadCase_ == 2 &&
payload_ != com.google.protobuf.Any.getDefaultInstance()) {
payload_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) payload_)
.mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
if (payloadCase_ == 2) {
protoPayloadBuilder_.mergeFrom(value);
}
protoPayloadBuilder_.setMessage(value);
}
payloadCase_ = 2;
return this;
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public Builder clearProtoPayload() {
if (protoPayloadBuilder_ == null) {
if (payloadCase_ == 2) {
payloadCase_ = 0;
payload_ = null;
onChanged();
}
} else {
if (payloadCase_ == 2) {
payloadCase_ = 0;
payload_ = null;
}
protoPayloadBuilder_.clear();
}
return this;
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public com.google.protobuf.Any.Builder getProtoPayloadBuilder() {
return getProtoPayloadFieldBuilder().getBuilder();
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
public com.google.protobuf.AnyOrBuilder getProtoPayloadOrBuilder() {
if ((payloadCase_ == 2) && (protoPayloadBuilder_ != null)) {
return protoPayloadBuilder_.getMessageOrBuilder();
} else {
if (payloadCase_ == 2) {
return (com.google.protobuf.Any) payload_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
* The log entry payload, represented as a protocol buffer that is
* expressed as a JSON object. You can only pass `protoPayload`
* values that belong to a set of approved types.
*
*
* optional .google.protobuf.Any proto_payload = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getProtoPayloadFieldBuilder() {
if (protoPayloadBuilder_ == null) {
if (!(payloadCase_ == 2)) {
payload_ = com.google.protobuf.Any.getDefaultInstance();
}
protoPayloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
(com.google.protobuf.Any) payload_,
getParentForChildren(),
isClean());
payload_ = null;
}
payloadCase_ = 2;
onChanged();;
return protoPayloadBuilder_;
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public java.lang.String getTextPayload() {
java.lang.Object ref = "";
if (payloadCase_ == 3) {
ref = payload_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (payloadCase_ == 3) {
payload_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public com.google.protobuf.ByteString
getTextPayloadBytes() {
java.lang.Object ref = "";
if (payloadCase_ == 3) {
ref = payload_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (payloadCase_ == 3) {
payload_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public Builder setTextPayload(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
payloadCase_ = 3;
payload_ = value;
onChanged();
return this;
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public Builder clearTextPayload() {
if (payloadCase_ == 3) {
payloadCase_ = 0;
payload_ = null;
onChanged();
}
return this;
}
/**
*
* The log entry payload, represented as a Unicode string (UTF-8).
*
*
* optional string text_payload = 3;
*/
public Builder setTextPayloadBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
payloadCase_ = 3;
payload_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> structPayloadBuilder_;
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public com.google.protobuf.Struct getStructPayload() {
if (structPayloadBuilder_ == null) {
if (payloadCase_ == 6) {
return (com.google.protobuf.Struct) payload_;
}
return com.google.protobuf.Struct.getDefaultInstance();
} else {
if (payloadCase_ == 6) {
return structPayloadBuilder_.getMessage();
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public Builder setStructPayload(com.google.protobuf.Struct value) {
if (structPayloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
} else {
structPayloadBuilder_.setMessage(value);
}
payloadCase_ = 6;
return this;
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public Builder setStructPayload(
com.google.protobuf.Struct.Builder builderForValue) {
if (structPayloadBuilder_ == null) {
payload_ = builderForValue.build();
onChanged();
} else {
structPayloadBuilder_.setMessage(builderForValue.build());
}
payloadCase_ = 6;
return this;
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public Builder mergeStructPayload(com.google.protobuf.Struct value) {
if (structPayloadBuilder_ == null) {
if (payloadCase_ == 6 &&
payload_ != com.google.protobuf.Struct.getDefaultInstance()) {
payload_ = com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) payload_)
.mergeFrom(value).buildPartial();
} else {
payload_ = value;
}
onChanged();
} else {
if (payloadCase_ == 6) {
structPayloadBuilder_.mergeFrom(value);
}
structPayloadBuilder_.setMessage(value);
}
payloadCase_ = 6;
return this;
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public Builder clearStructPayload() {
if (structPayloadBuilder_ == null) {
if (payloadCase_ == 6) {
payloadCase_ = 0;
payload_ = null;
onChanged();
}
} else {
if (payloadCase_ == 6) {
payloadCase_ = 0;
payload_ = null;
}
structPayloadBuilder_.clear();
}
return this;
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public com.google.protobuf.Struct.Builder getStructPayloadBuilder() {
return getStructPayloadFieldBuilder().getBuilder();
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
public com.google.protobuf.StructOrBuilder getStructPayloadOrBuilder() {
if ((payloadCase_ == 6) && (structPayloadBuilder_ != null)) {
return structPayloadBuilder_.getMessageOrBuilder();
} else {
if (payloadCase_ == 6) {
return (com.google.protobuf.Struct) payload_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* The log entry payload, represented as a structure that
* is expressed as a JSON object.
*
*
* optional .google.protobuf.Struct struct_payload = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getStructPayloadFieldBuilder() {
if (structPayloadBuilder_ == null) {
if (!(payloadCase_ == 6)) {
payload_ = com.google.protobuf.Struct.getDefaultInstance();
}
structPayloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
(com.google.protobuf.Struct) payload_,
getParentForChildren(),
isClean());
payload_ = null;
}
payloadCase_ = 6;
onChanged();;
return structPayloadBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.LogEntry)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.LogEntry)
private static final com.google.api.servicecontrol.v1.LogEntry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.LogEntry();
}
public static com.google.api.servicecontrol.v1.LogEntry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public LogEntry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LogEntry(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.api.servicecontrol.v1.LogEntry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}