All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.servicecontrol.v1.LogEntry Maven / Gradle / Ivy

There is a newer version: 3.2.3
Show newest version
// 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.proto4pingcap.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.LogEntry) LogEntryOrBuilder { // Use LogEntry.newBuilder() to construct. private LogEntry(com.google.proto4pingcap.GeneratedMessageV3.Builder builder) { super(builder); } private LogEntry() { name_ = ""; severity_ = 0; insertId_ = ""; } @java.lang.Override public final com.google.proto4pingcap.UnknownFieldSet getUnknownFields() { return com.google.proto4pingcap.UnknownFieldSet.getDefaultInstance(); } private LogEntry( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.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.proto4pingcap.Any.Builder subBuilder = null; if (payloadCase_ == 2) { subBuilder = ((com.google.proto4pingcap.Any) payload_).toBuilder(); } payload_ = input.readMessage(com.google.proto4pingcap.Any.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.proto4pingcap.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.proto4pingcap.Struct.Builder subBuilder = null; if (payloadCase_ == 6) { subBuilder = ((com.google.proto4pingcap.Struct) payload_).toBuilder(); } payload_ = input.readMessage(com.google.proto4pingcap.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.proto4pingcap.Struct) payload_); payload_ = subBuilder.buildPartial(); } payloadCase_ = 6; break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 90: { com.google.proto4pingcap.Timestamp.Builder subBuilder = null; if (timestamp_ != null) { subBuilder = timestamp_.toBuilder(); } timestamp_ = input.readMessage(com.google.proto4pingcap.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.proto4pingcap.MapField.newMapField( LabelsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000010; } com.google.proto4pingcap.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); labels_.getMutableMap().put( labels__.getKey(), labels__.getValue()); break; } } } } catch (com.google.proto4pingcap.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.proto4pingcap.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable(); } } public static final com.google.proto4pingcap.Descriptors.Descriptor getDescriptor() { return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.proto4pingcap.MapField internalGetMapField( int number) { switch (number) { case 13: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.proto4pingcap.GeneratedMessageV3.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.proto4pingcap.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"`.
   * 
* * 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.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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"`.
   * 
* * string name = 10; */ public com.google.proto4pingcap.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } public static final int TIMESTAMP_FIELD_NUMBER = 11; private com.google.proto4pingcap.Timestamp timestamp_; /** *
   * The time the event described by the log entry occurred. If
   * omitted, defaults to operation start time.
   * 
* * .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.
   * 
* * .google.protobuf.Timestamp timestamp = 11; */ public com.google.proto4pingcap.Timestamp getTimestamp() { return timestamp_ == null ? com.google.proto4pingcap.Timestamp.getDefaultInstance() : timestamp_; } /** *
   * The time the event described by the log entry occurred. If
   * omitted, defaults to operation start time.
   * 
* * .google.protobuf.Timestamp timestamp = 11; */ public com.google.proto4pingcap.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`.
   * 
* * .google.logging.type.LogSeverity severity = 12; */ public int getSeverityValue() { return severity_; } /** *
   * The severity of the log entry. The default value is
   * `LogSeverity.DEFAULT`.
   * 
* * .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.
   * 
* * 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.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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.
   * 
* * string insert_id = 4; */ public com.google.proto4pingcap.ByteString getInsertIdBytes() { java.lang.Object ref = insertId_; if (ref instanceof java.lang.String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); insertId_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } public static final int LABELS_FIELD_NUMBER = 13; private static final class LabelsDefaultEntryHolder { static final com.google.proto4pingcap.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.proto4pingcap.MapEntry .newDefaultInstance( com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_LabelsEntry_descriptor, com.google.proto4pingcap.WireFormat.FieldType.STRING, "", com.google.proto4pingcap.WireFormat.FieldType.STRING, ""); } private com.google.proto4pingcap.MapField< java.lang.String, java.lang.String> labels_; private com.google.proto4pingcap.MapField internalGetLabels() { if (labels_ == null) { return com.google.proto4pingcap.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.
   * 
* * .google.protobuf.Any proto_payload = 2; */ public com.google.proto4pingcap.Any getProtoPayload() { if (payloadCase_ == 2) { return (com.google.proto4pingcap.Any) payload_; } return com.google.proto4pingcap.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.
   * 
* * .google.protobuf.Any proto_payload = 2; */ public com.google.proto4pingcap.AnyOrBuilder getProtoPayloadOrBuilder() { if (payloadCase_ == 2) { return (com.google.proto4pingcap.Any) payload_; } return com.google.proto4pingcap.Any.getDefaultInstance(); } public static final int TEXT_PAYLOAD_FIELD_NUMBER = 3; /** *
   * The log entry payload, represented as a Unicode string (UTF-8).
   * 
* * 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.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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).
   * 
* * string text_payload = 3; */ public com.google.proto4pingcap.ByteString getTextPayloadBytes() { java.lang.Object ref = ""; if (payloadCase_ == 3) { ref = payload_; } if (ref instanceof java.lang.String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); if (payloadCase_ == 3) { payload_ = b; } return b; } else { return (com.google.proto4pingcap.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.
   * 
* * .google.protobuf.Struct struct_payload = 6; */ public com.google.proto4pingcap.Struct getStructPayload() { if (payloadCase_ == 6) { return (com.google.proto4pingcap.Struct) payload_; } return com.google.proto4pingcap.Struct.getDefaultInstance(); } /** *
   * The log entry payload, represented as a structure that
   * is expressed as a JSON object.
   * 
* * .google.protobuf.Struct struct_payload = 6; */ public com.google.proto4pingcap.StructOrBuilder getStructPayloadOrBuilder() { if (payloadCase_ == 6) { return (com.google.proto4pingcap.Struct) payload_; } return com.google.proto4pingcap.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.proto4pingcap.CodedOutputStream output) throws java.io.IOException { if (payloadCase_ == 2) { output.writeMessage(2, (com.google.proto4pingcap.Any) payload_); } if (payloadCase_ == 3) { com.google.proto4pingcap.GeneratedMessageV3.writeString(output, 3, payload_); } if (!getInsertIdBytes().isEmpty()) { com.google.proto4pingcap.GeneratedMessageV3.writeString(output, 4, insertId_); } if (payloadCase_ == 6) { output.writeMessage(6, (com.google.proto4pingcap.Struct) payload_); } if (!getNameBytes().isEmpty()) { com.google.proto4pingcap.GeneratedMessageV3.writeString(output, 10, name_); } if (timestamp_ != null) { output.writeMessage(11, getTimestamp()); } if (severity_ != com.google.logging.type.LogSeverity.DEFAULT.getNumber()) { output.writeEnum(12, severity_); } com.google.proto4pingcap.GeneratedMessageV3 .serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 13); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (payloadCase_ == 2) { size += com.google.proto4pingcap.CodedOutputStream .computeMessageSize(2, (com.google.proto4pingcap.Any) payload_); } if (payloadCase_ == 3) { size += com.google.proto4pingcap.GeneratedMessageV3.computeStringSize(3, payload_); } if (!getInsertIdBytes().isEmpty()) { size += com.google.proto4pingcap.GeneratedMessageV3.computeStringSize(4, insertId_); } if (payloadCase_ == 6) { size += com.google.proto4pingcap.CodedOutputStream .computeMessageSize(6, (com.google.proto4pingcap.Struct) payload_); } if (!getNameBytes().isEmpty()) { size += com.google.proto4pingcap.GeneratedMessageV3.computeStringSize(10, name_); } if (timestamp_ != null) { size += com.google.proto4pingcap.CodedOutputStream .computeMessageSize(11, getTimestamp()); } if (severity_ != com.google.logging.type.LogSeverity.DEFAULT.getNumber()) { size += com.google.proto4pingcap.CodedOutputStream .computeEnumSize(12, severity_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.proto4pingcap.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.proto4pingcap.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) + getDescriptor().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.proto4pingcap.ByteString data) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( com.google.proto4pingcap.ByteString data, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom(byte[] data) throws com.google.proto4pingcap.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( byte[] data, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.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.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( java.io.InputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.api.servicecontrol.v1.LogEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.servicecontrol.v1.LogEntry parseDelimitedFrom( java.io.InputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( com.google.proto4pingcap.CodedInputStream input) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.proto4pingcap.GeneratedMessageV3 .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.proto4pingcap.GeneratedMessageV3.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.proto4pingcap.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.LogEntry) com.google.api.servicecontrol.v1.LogEntryOrBuilder { public static final com.google.proto4pingcap.Descriptors.Descriptor getDescriptor() { return com.google.api.servicecontrol.v1.LogEntryProto.internal_static_google_api_servicecontrol_v1_LogEntry_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.proto4pingcap.MapField internalGetMapField( int number) { switch (number) { case 13: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.proto4pingcap.MapField internalGetMutableMapField( int number) { switch (number) { case 13: return internalGetMutableLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.proto4pingcap.GeneratedMessageV3.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.proto4pingcap.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.proto4pingcap.GeneratedMessageV3 .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.proto4pingcap.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.proto4pingcap.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.proto4pingcap.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.proto4pingcap.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.proto4pingcap.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.proto4pingcap.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.proto4pingcap.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.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.api.servicecontrol.v1.LogEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.proto4pingcap.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"`.
     * 
* * string name = 10; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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"`.
     * 
* * string name = 10; */ public com.google.proto4pingcap.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } /** *
     * Required. The log to which this log entry belongs. Examples: `"syslog"`,
     * `"book_log"`.
     * 
* * 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"`.
     * 
* * 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"`.
     * 
* * string name = 10; */ public Builder setNameBytes( com.google.proto4pingcap.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private com.google.proto4pingcap.Timestamp timestamp_ = null; private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Timestamp, com.google.proto4pingcap.Timestamp.Builder, com.google.proto4pingcap.TimestampOrBuilder> timestampBuilder_; /** *
     * The time the event described by the log entry occurred. If
     * omitted, defaults to operation start time.
     * 
* * .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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public com.google.proto4pingcap.Timestamp getTimestamp() { if (timestampBuilder_ == null) { return timestamp_ == null ? com.google.proto4pingcap.Timestamp.getDefaultInstance() : timestamp_; } else { return timestampBuilder_.getMessage(); } } /** *
     * The time the event described by the log entry occurred. If
     * omitted, defaults to operation start time.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public Builder setTimestamp(com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public Builder setTimestamp( com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public Builder mergeTimestamp(com.google.proto4pingcap.Timestamp value) { if (timestampBuilder_ == null) { if (timestamp_ != null) { timestamp_ = com.google.proto4pingcap.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.
     * 
* * .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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public com.google.proto4pingcap.Timestamp.Builder getTimestampBuilder() { onChanged(); return getTimestampFieldBuilder().getBuilder(); } /** *
     * The time the event described by the log entry occurred. If
     * omitted, defaults to operation start time.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public com.google.proto4pingcap.TimestampOrBuilder getTimestampOrBuilder() { if (timestampBuilder_ != null) { return timestampBuilder_.getMessageOrBuilder(); } else { return timestamp_ == null ? com.google.proto4pingcap.Timestamp.getDefaultInstance() : timestamp_; } } /** *
     * The time the event described by the log entry occurred. If
     * omitted, defaults to operation start time.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Timestamp, com.google.proto4pingcap.Timestamp.Builder, com.google.proto4pingcap.TimestampOrBuilder> getTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = new com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Timestamp, com.google.proto4pingcap.Timestamp.Builder, com.google.proto4pingcap.TimestampOrBuilder>( getTimestamp(), getParentForChildren(), isClean()); timestamp_ = null; } return timestampBuilder_; } private int severity_ = 0; /** *
     * The severity of the log entry. The default value is
     * `LogSeverity.DEFAULT`.
     * 
* * .google.logging.type.LogSeverity severity = 12; */ public int getSeverityValue() { return severity_; } /** *
     * The severity of the log entry. The default value is
     * `LogSeverity.DEFAULT`.
     * 
* * .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`.
     * 
* * .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`.
     * 
* * .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`.
     * 
* * .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.
     * 
* * string insert_id = 4; */ public java.lang.String getInsertId() { java.lang.Object ref = insertId_; if (!(ref instanceof java.lang.String)) { com.google.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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.
     * 
* * string insert_id = 4; */ public com.google.proto4pingcap.ByteString getInsertIdBytes() { java.lang.Object ref = insertId_; if (ref instanceof String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); insertId_ = b; return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } /** *
     * A unique ID for the log entry used for deduplication. If omitted,
     * the implementation will generate one based on operation_id.
     * 
* * 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.
     * 
* * 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.
     * 
* * string insert_id = 4; */ public Builder setInsertIdBytes( com.google.proto4pingcap.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); insertId_ = value; onChanged(); return this; } private com.google.proto4pingcap.MapField< java.lang.String, java.lang.String> labels_; private com.google.proto4pingcap.MapField internalGetLabels() { if (labels_ == null) { return com.google.proto4pingcap.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.proto4pingcap.MapField internalGetMutableLabels() { onChanged();; if (labels_ == null) { labels_ = com.google.proto4pingcap.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() { internalGetMutableLabels().getMutableMap() .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(); } internalGetMutableLabels().getMutableMap() .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(); } internalGetMutableLabels().getMutableMap() .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) { internalGetMutableLabels().getMutableMap() .putAll(values); return this; } private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Any, com.google.proto4pingcap.Any.Builder, com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public com.google.proto4pingcap.Any getProtoPayload() { if (protoPayloadBuilder_ == null) { if (payloadCase_ == 2) { return (com.google.proto4pingcap.Any) payload_; } return com.google.proto4pingcap.Any.getDefaultInstance(); } else { if (payloadCase_ == 2) { return protoPayloadBuilder_.getMessage(); } return com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public Builder setProtoPayload(com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public Builder setProtoPayload( com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public Builder mergeProtoPayload(com.google.proto4pingcap.Any value) { if (protoPayloadBuilder_ == null) { if (payloadCase_ == 2 && payload_ != com.google.proto4pingcap.Any.getDefaultInstance()) { payload_ = com.google.proto4pingcap.Any.newBuilder((com.google.proto4pingcap.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.
     * 
* * .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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ public com.google.proto4pingcap.AnyOrBuilder getProtoPayloadOrBuilder() { if ((payloadCase_ == 2) && (protoPayloadBuilder_ != null)) { return protoPayloadBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 2) { return (com.google.proto4pingcap.Any) payload_; } return com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Any proto_payload = 2; */ private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Any, com.google.proto4pingcap.Any.Builder, com.google.proto4pingcap.AnyOrBuilder> getProtoPayloadFieldBuilder() { if (protoPayloadBuilder_ == null) { if (!(payloadCase_ == 2)) { payload_ = com.google.proto4pingcap.Any.getDefaultInstance(); } protoPayloadBuilder_ = new com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Any, com.google.proto4pingcap.Any.Builder, com.google.proto4pingcap.AnyOrBuilder>( (com.google.proto4pingcap.Any) payload_, getParentForChildren(), isClean()); payload_ = null; } payloadCase_ = 2; onChanged();; return protoPayloadBuilder_; } /** *
     * The log entry payload, represented as a Unicode string (UTF-8).
     * 
* * 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.proto4pingcap.ByteString bs = (com.google.proto4pingcap.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).
     * 
* * string text_payload = 3; */ public com.google.proto4pingcap.ByteString getTextPayloadBytes() { java.lang.Object ref = ""; if (payloadCase_ == 3) { ref = payload_; } if (ref instanceof String) { com.google.proto4pingcap.ByteString b = com.google.proto4pingcap.ByteString.copyFromUtf8( (java.lang.String) ref); if (payloadCase_ == 3) { payload_ = b; } return b; } else { return (com.google.proto4pingcap.ByteString) ref; } } /** *
     * The log entry payload, represented as a Unicode string (UTF-8).
     * 
* * 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).
     * 
* * 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).
     * 
* * string text_payload = 3; */ public Builder setTextPayloadBytes( com.google.proto4pingcap.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); payloadCase_ = 3; payload_ = value; onChanged(); return this; } private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Struct, com.google.proto4pingcap.Struct.Builder, com.google.proto4pingcap.StructOrBuilder> structPayloadBuilder_; /** *
     * The log entry payload, represented as a structure that
     * is expressed as a JSON object.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public com.google.proto4pingcap.Struct getStructPayload() { if (structPayloadBuilder_ == null) { if (payloadCase_ == 6) { return (com.google.proto4pingcap.Struct) payload_; } return com.google.proto4pingcap.Struct.getDefaultInstance(); } else { if (payloadCase_ == 6) { return structPayloadBuilder_.getMessage(); } return com.google.proto4pingcap.Struct.getDefaultInstance(); } } /** *
     * The log entry payload, represented as a structure that
     * is expressed as a JSON object.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public Builder setStructPayload(com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public Builder setStructPayload( com.google.proto4pingcap.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.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public Builder mergeStructPayload(com.google.proto4pingcap.Struct value) { if (structPayloadBuilder_ == null) { if (payloadCase_ == 6 && payload_ != com.google.proto4pingcap.Struct.getDefaultInstance()) { payload_ = com.google.proto4pingcap.Struct.newBuilder((com.google.proto4pingcap.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.
     * 
* * .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.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public com.google.proto4pingcap.Struct.Builder getStructPayloadBuilder() { return getStructPayloadFieldBuilder().getBuilder(); } /** *
     * The log entry payload, represented as a structure that
     * is expressed as a JSON object.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ public com.google.proto4pingcap.StructOrBuilder getStructPayloadOrBuilder() { if ((payloadCase_ == 6) && (structPayloadBuilder_ != null)) { return structPayloadBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 6) { return (com.google.proto4pingcap.Struct) payload_; } return com.google.proto4pingcap.Struct.getDefaultInstance(); } } /** *
     * The log entry payload, represented as a structure that
     * is expressed as a JSON object.
     * 
* * .google.protobuf.Struct struct_payload = 6; */ private com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Struct, com.google.proto4pingcap.Struct.Builder, com.google.proto4pingcap.StructOrBuilder> getStructPayloadFieldBuilder() { if (structPayloadBuilder_ == null) { if (!(payloadCase_ == 6)) { payload_ = com.google.proto4pingcap.Struct.getDefaultInstance(); } structPayloadBuilder_ = new com.google.proto4pingcap.SingleFieldBuilderV3< com.google.proto4pingcap.Struct, com.google.proto4pingcap.Struct.Builder, com.google.proto4pingcap.StructOrBuilder>( (com.google.proto4pingcap.Struct) payload_, getParentForChildren(), isClean()); payload_ = null; } payloadCase_ = 6; onChanged();; return structPayloadBuilder_; } public final Builder setUnknownFields( final com.google.proto4pingcap.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.proto4pingcap.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.proto4pingcap.Parser PARSER = new com.google.proto4pingcap.AbstractParser() { public LogEntry parsePartialFrom( com.google.proto4pingcap.CodedInputStream input, com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry) throws com.google.proto4pingcap.InvalidProtocolBufferException { return new LogEntry(input, extensionRegistry); } }; public static com.google.proto4pingcap.Parser parser() { return PARSER; } @java.lang.Override public com.google.proto4pingcap.Parser getParserForType() { return PARSER; } public com.google.api.servicecontrol.v1.LogEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy