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

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

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/servicecontrol/v1/log_entry.proto

// Protobuf Java Version: 3.25.5
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.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.LogEntry) LogEntryOrBuilder { private static final long serialVersionUID = 0L; // Use LogEntry.newBuilder() to construct. private LogEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LogEntry() { name_ = ""; severity_ = 0; trace_ = ""; insertId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new LogEntry(); } 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"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 13: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.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; @SuppressWarnings("serial") private java.lang.Object payload_; public enum PayloadCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { PROTO_PAYLOAD(2), TEXT_PAYLOAD(3), STRUCT_PAYLOAD(6), PAYLOAD_NOT_SET(0); private final int value; private PayloadCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @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; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Required. The log to which this log entry belongs. Examples: `"syslog"`,
   * `"book_log"`.
   * 
* * string name = 10; * * @return The name. */ @java.lang.Override 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"`.
   * 
* * string name = 10; * * @return The bytes for name. */ @java.lang.Override 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.
   * 
* * .google.protobuf.Timestamp timestamp = 11; * * @return Whether the timestamp field is set. */ @java.lang.Override public boolean hasTimestamp() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * The time the event described by the log entry occurred. If
   * omitted, defaults to operation start time.
   * 
* * .google.protobuf.Timestamp timestamp = 11; * * @return The timestamp. */ @java.lang.Override 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.
   * 
* * .google.protobuf.Timestamp timestamp = 11; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } public static final int SEVERITY_FIELD_NUMBER = 12; private int severity_ = 0; /** * * *
   * The severity of the log entry. The default value is
   * `LogSeverity.DEFAULT`.
   * 
* * .google.logging.type.LogSeverity severity = 12; * * @return The enum numeric value on the wire for severity. */ @java.lang.Override public int getSeverityValue() { return severity_; } /** * * *
   * The severity of the log entry. The default value is
   * `LogSeverity.DEFAULT`.
   * 
* * .google.logging.type.LogSeverity severity = 12; * * @return The severity. */ @java.lang.Override public com.google.logging.type.LogSeverity getSeverity() { com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.forNumber(severity_); return result == null ? com.google.logging.type.LogSeverity.UNRECOGNIZED : result; } public static final int HTTP_REQUEST_FIELD_NUMBER = 14; private com.google.api.servicecontrol.v1.HttpRequest httpRequest_; /** * * *
   * Optional. Information about the HTTP request associated with this
   * log entry, if applicable.
   * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; * * @return Whether the httpRequest field is set. */ @java.lang.Override public boolean hasHttpRequest() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Optional. Information about the HTTP request associated with this
   * log entry, if applicable.
   * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; * * @return The httpRequest. */ @java.lang.Override public com.google.api.servicecontrol.v1.HttpRequest getHttpRequest() { return httpRequest_ == null ? com.google.api.servicecontrol.v1.HttpRequest.getDefaultInstance() : httpRequest_; } /** * * *
   * Optional. Information about the HTTP request associated with this
   * log entry, if applicable.
   * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ @java.lang.Override public com.google.api.servicecontrol.v1.HttpRequestOrBuilder getHttpRequestOrBuilder() { return httpRequest_ == null ? com.google.api.servicecontrol.v1.HttpRequest.getDefaultInstance() : httpRequest_; } public static final int TRACE_FIELD_NUMBER = 15; @SuppressWarnings("serial") private volatile java.lang.Object trace_ = ""; /** * * *
   * Optional. Resource name of the trace associated with the log entry, if any.
   * If this field contains a relative resource name, you can assume the name is
   * relative to `//tracing.googleapis.com`. Example:
   * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
   * 
* * string trace = 15; * * @return The trace. */ @java.lang.Override public java.lang.String getTrace() { java.lang.Object ref = trace_; 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(); trace_ = s; return s; } } /** * * *
   * Optional. Resource name of the trace associated with the log entry, if any.
   * If this field contains a relative resource name, you can assume the name is
   * relative to `//tracing.googleapis.com`. Example:
   * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
   * 
* * string trace = 15; * * @return The bytes for trace. */ @java.lang.Override public com.google.protobuf.ByteString getTraceBytes() { java.lang.Object ref = trace_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); trace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INSERT_ID_FIELD_NUMBER = 4; @SuppressWarnings("serial") 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; * * @return The insertId. */ @java.lang.Override 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.
   * 
* * string insert_id = 4; * * @return The bytes for insertId. */ @java.lang.Override 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 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, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField 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; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @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; */ @java.lang.Override 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; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } 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; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } 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. The only accepted type currently is
   * [AuditLog][google.cloud.audit.AuditLog].
   * 
* * .google.protobuf.Any proto_payload = 2; * * @return Whether the protoPayload field is set. */ @java.lang.Override public boolean hasProtoPayload() { return payloadCase_ == 2; } /** * * *
   * The log entry payload, represented as a protocol buffer that is
   * expressed as a JSON object. The only accepted type currently is
   * [AuditLog][google.cloud.audit.AuditLog].
   * 
* * .google.protobuf.Any proto_payload = 2; * * @return The protoPayload. */ @java.lang.Override 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. The only accepted type currently is
   * [AuditLog][google.cloud.audit.AuditLog].
   * 
* * .google.protobuf.Any proto_payload = 2; */ @java.lang.Override 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).
   * 
* * string text_payload = 3; * * @return Whether the textPayload field is set. */ public boolean hasTextPayload() { return payloadCase_ == 3; } /** * * *
   * The log entry payload, represented as a Unicode string (UTF-8).
   * 
* * string text_payload = 3; * * @return The textPayload. */ 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).
   * 
* * string text_payload = 3; * * @return The bytes for textPayload. */ 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.
   * 
* * .google.protobuf.Struct struct_payload = 6; * * @return Whether the structPayload field is set. */ @java.lang.Override public boolean hasStructPayload() { return payloadCase_ == 6; } /** * * *
   * The log entry payload, represented as a structure that
   * is expressed as a JSON object.
   * 
* * .google.protobuf.Struct struct_payload = 6; * * @return The structPayload. */ @java.lang.Override 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.
   * 
* * .google.protobuf.Struct struct_payload = 6; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getStructPayloadOrBuilder() { if (payloadCase_ == 6) { return (com.google.protobuf.Struct) payload_; } return com.google.protobuf.Struct.getDefaultInstance(); } public static final int OPERATION_FIELD_NUMBER = 16; private com.google.api.servicecontrol.v1.LogEntryOperation operation_; /** * * *
   * Optional. Information about an operation associated with the log entry, if
   * applicable.
   * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; * * @return Whether the operation field is set. */ @java.lang.Override public boolean hasOperation() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Optional. Information about an operation associated with the log entry, if
   * applicable.
   * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; * * @return The operation. */ @java.lang.Override public com.google.api.servicecontrol.v1.LogEntryOperation getOperation() { return operation_ == null ? com.google.api.servicecontrol.v1.LogEntryOperation.getDefaultInstance() : operation_; } /** * * *
   * Optional. Information about an operation associated with the log entry, if
   * applicable.
   * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ @java.lang.Override public com.google.api.servicecontrol.v1.LogEntryOperationOrBuilder getOperationOrBuilder() { return operation_ == null ? com.google.api.servicecontrol.v1.LogEntryOperation.getDefaultInstance() : operation_; } public static final int SOURCE_LOCATION_FIELD_NUMBER = 17; private com.google.api.servicecontrol.v1.LogEntrySourceLocation sourceLocation_; /** * * *
   * Optional. Source code location information associated with the log entry,
   * if any.
   * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; * * @return Whether the sourceLocation field is set. */ @java.lang.Override public boolean hasSourceLocation() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Optional. Source code location information associated with the log entry,
   * if any.
   * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; * * @return The sourceLocation. */ @java.lang.Override public com.google.api.servicecontrol.v1.LogEntrySourceLocation getSourceLocation() { return sourceLocation_ == null ? com.google.api.servicecontrol.v1.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } /** * * *
   * Optional. Source code location information associated with the log entry,
   * if any.
   * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ @java.lang.Override public com.google.api.servicecontrol.v1.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder() { return sourceLocation_ == null ? com.google.api.servicecontrol.v1.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override 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.GeneratedMessageV3.writeString(output, 3, payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(insertId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, insertId_); } if (payloadCase_ == 6) { output.writeMessage(6, (com.google.protobuf.Struct) payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, name_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(11, getTimestamp()); } if (severity_ != com.google.logging.type.LogSeverity.DEFAULT.getNumber()) { output.writeEnum(12, severity_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 13); if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(14, getHttpRequest()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, trace_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(16, getOperation()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(17, getSourceLocation()); } getUnknownFields().writeTo(output); } @java.lang.Override 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.GeneratedMessageV3.computeStringSize(3, payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(insertId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, insertId_); } if (payloadCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.protobuf.Struct) payload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, name_); } if (((bitField0_ & 0x00000001) != 0)) { 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__); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getHttpRequest()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, trace_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getOperation()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getSourceLocation()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @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; if (!getName().equals(other.getName())) return false; if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp().equals(other.getTimestamp())) return false; } if (severity_ != other.severity_) return false; if (hasHttpRequest() != other.hasHttpRequest()) return false; if (hasHttpRequest()) { if (!getHttpRequest().equals(other.getHttpRequest())) return false; } if (!getTrace().equals(other.getTrace())) return false; if (!getInsertId().equals(other.getInsertId())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (hasOperation() != other.hasOperation()) return false; if (hasOperation()) { if (!getOperation().equals(other.getOperation())) return false; } if (hasSourceLocation() != other.hasSourceLocation()) return false; if (hasSourceLocation()) { if (!getSourceLocation().equals(other.getSourceLocation())) return false; } if (!getPayloadCase().equals(other.getPayloadCase())) return false; switch (payloadCase_) { case 2: if (!getProtoPayload().equals(other.getProtoPayload())) return false; break; case 3: if (!getTextPayload().equals(other.getTextPayload())) return false; break; case 6: if (!getStructPayload().equals(other.getStructPayload())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @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_; if (hasHttpRequest()) { hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER; hash = (53 * hash) + getHttpRequest().hashCode(); } hash = (37 * hash) + TRACE_FIELD_NUMBER; hash = (53 * hash) + getTrace().hashCode(); 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(); } if (hasOperation()) { hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + getOperation().hashCode(); } if (hasSourceLocation()) { hash = (37 * hash) + SOURCE_LOCATION_FIELD_NUMBER; hash = (53 * hash) + getSourceLocation().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) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.servicecontrol.v1.LogEntry parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.servicecontrol.v1.LogEntry parseFrom( java.nio.ByteBuffer 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( 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.GeneratedMessageV3.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.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.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override 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); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.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.protobuf.GeneratedMessageV3.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.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 13: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 13: return internalGetMutableLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.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.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTimestampFieldBuilder(); getHttpRequestFieldBuilder(); getOperationFieldBuilder(); getSourceLocationFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; timestamp_ = null; if (timestampBuilder_ != null) { timestampBuilder_.dispose(); timestampBuilder_ = null; } severity_ = 0; httpRequest_ = null; if (httpRequestBuilder_ != null) { httpRequestBuilder_.dispose(); httpRequestBuilder_ = null; } trace_ = ""; insertId_ = ""; internalGetMutableLabels().clear(); if (protoPayloadBuilder_ != null) { protoPayloadBuilder_.clear(); } if (structPayloadBuilder_ != null) { structPayloadBuilder_.clear(); } operation_ = null; if (operationBuilder_ != null) { operationBuilder_.dispose(); operationBuilder_ = null; } sourceLocation_ = null; if (sourceLocationBuilder_ != null) { sourceLocationBuilder_.dispose(); sourceLocationBuilder_ = null; } payloadCase_ = 0; payload_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.servicecontrol.v1.LogEntryProto .internal_static_google_api_servicecontrol_v1_LogEntry_descriptor; } @java.lang.Override public com.google.api.servicecontrol.v1.LogEntry getDefaultInstanceForType() { return com.google.api.servicecontrol.v1.LogEntry.getDefaultInstance(); } @java.lang.Override public com.google.api.servicecontrol.v1.LogEntry build() { com.google.api.servicecontrol.v1.LogEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.servicecontrol.v1.LogEntry buildPartial() { com.google.api.servicecontrol.v1.LogEntry result = new com.google.api.servicecontrol.v1.LogEntry(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.api.servicecontrol.v1.LogEntry result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.severity_ = severity_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.httpRequest_ = httpRequestBuilder_ == null ? httpRequest_ : httpRequestBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.trace_ = trace_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.insertId_ = insertId_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00000400) != 0)) { result.operation_ = operationBuilder_ == null ? operation_ : operationBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000800) != 0)) { result.sourceLocation_ = sourceLocationBuilder_ == null ? sourceLocation_ : sourceLocationBuilder_.build(); to_bitField0_ |= 0x00000008; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.api.servicecontrol.v1.LogEntry result) { result.payloadCase_ = payloadCase_; result.payload_ = this.payload_; if (payloadCase_ == 2 && protoPayloadBuilder_ != null) { result.payload_ = protoPayloadBuilder_.build(); } if (payloadCase_ == 6 && structPayloadBuilder_ != null) { result.payload_ = structPayloadBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override 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_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } if (other.severity_ != 0) { setSeverityValue(other.getSeverityValue()); } if (other.hasHttpRequest()) { mergeHttpRequest(other.getHttpRequest()); } if (!other.getTrace().isEmpty()) { trace_ = other.trace_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getInsertId().isEmpty()) { insertId_ = other.insertId_; bitField0_ |= 0x00000020; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000040; if (other.hasOperation()) { mergeOperation(other.getOperation()); } if (other.hasSourceLocation()) { mergeSourceLocation(other.getSourceLocation()); } 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; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { input.readMessage(getProtoPayloadFieldBuilder().getBuilder(), extensionRegistry); payloadCase_ = 2; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); payloadCase_ = 3; payload_ = s; break; } // case 26 case 34: { insertId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 34 case 50: { input.readMessage(getStructPayloadFieldBuilder().getBuilder(), extensionRegistry); payloadCase_ = 6; break; } // case 50 case 82: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 82 case 90: { input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 90 case 96: { severity_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 96 case 106: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000040; break; } // case 106 case 114: { input.readMessage(getHttpRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 114 case 122: { trace_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 122 case 130: { input.readMessage(getOperationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 130 case 138: { input.readMessage(getSourceLocationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 138 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally 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; * * @return The name. */ 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"`.
     * 
* * string name = 10; * * @return The bytes for name. */ 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"`.
     * 
* * string name = 10; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. The log to which this log entry belongs. Examples: `"syslog"`,
     * `"book_log"`.
     * 
* * string name = 10; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. The log to which this log entry belongs. Examples: `"syslog"`,
     * `"book_log"`.
     * 
* * string name = 10; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.Timestamp timestamp_; 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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; * * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * The time the event described by the log entry occurred. If
     * omitted, defaults to operation start time.
     * 
* * .google.protobuf.Timestamp timestamp = 11; * * @return The timestamp. */ 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.
     * 
* * .google.protobuf.Timestamp timestamp = 11; */ public Builder setTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestamp_ = value; } else { timestampBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); 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.protobuf.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); } else { timestampBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); 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.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && timestamp_ != null && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } } else { timestampBuilder_.mergeFrom(value); } if (timestamp_ != null) { bitField0_ |= 0x00000002; onChanged(); } 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() { bitField0_ = (bitField0_ & ~0x00000002); timestamp_ = null; if (timestampBuilder_ != null) { timestampBuilder_.dispose(); timestampBuilder_ = null; } onChanged(); 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.protobuf.Timestamp.Builder getTimestampBuilder() { bitField0_ |= 0x00000002; 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.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.
     * 
* * .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`.
     * 
* * .google.logging.type.LogSeverity severity = 12; * * @return The enum numeric value on the wire for severity. */ @java.lang.Override public int getSeverityValue() { return severity_; } /** * * *
     * The severity of the log entry. The default value is
     * `LogSeverity.DEFAULT`.
     * 
* * .google.logging.type.LogSeverity severity = 12; * * @param value The enum numeric value on the wire for severity to set. * @return This builder for chaining. */ public Builder setSeverityValue(int value) { severity_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The severity of the log entry. The default value is
     * `LogSeverity.DEFAULT`.
     * 
* * .google.logging.type.LogSeverity severity = 12; * * @return The severity. */ @java.lang.Override public com.google.logging.type.LogSeverity getSeverity() { com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.forNumber(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; * * @param value The severity to set. * @return This builder for chaining. */ public Builder setSeverity(com.google.logging.type.LogSeverity value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; severity_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The severity of the log entry. The default value is
     * `LogSeverity.DEFAULT`.
     * 
* * .google.logging.type.LogSeverity severity = 12; * * @return This builder for chaining. */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000004); severity_ = 0; onChanged(); return this; } private com.google.api.servicecontrol.v1.HttpRequest httpRequest_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.HttpRequest, com.google.api.servicecontrol.v1.HttpRequest.Builder, com.google.api.servicecontrol.v1.HttpRequestOrBuilder> httpRequestBuilder_; /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; * * @return Whether the httpRequest field is set. */ public boolean hasHttpRequest() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; * * @return The httpRequest. */ public com.google.api.servicecontrol.v1.HttpRequest getHttpRequest() { if (httpRequestBuilder_ == null) { return httpRequest_ == null ? com.google.api.servicecontrol.v1.HttpRequest.getDefaultInstance() : httpRequest_; } else { return httpRequestBuilder_.getMessage(); } } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public Builder setHttpRequest(com.google.api.servicecontrol.v1.HttpRequest value) { if (httpRequestBuilder_ == null) { if (value == null) { throw new NullPointerException(); } httpRequest_ = value; } else { httpRequestBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public Builder setHttpRequest( com.google.api.servicecontrol.v1.HttpRequest.Builder builderForValue) { if (httpRequestBuilder_ == null) { httpRequest_ = builderForValue.build(); } else { httpRequestBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public Builder mergeHttpRequest(com.google.api.servicecontrol.v1.HttpRequest value) { if (httpRequestBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && httpRequest_ != null && httpRequest_ != com.google.api.servicecontrol.v1.HttpRequest.getDefaultInstance()) { getHttpRequestBuilder().mergeFrom(value); } else { httpRequest_ = value; } } else { httpRequestBuilder_.mergeFrom(value); } if (httpRequest_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public Builder clearHttpRequest() { bitField0_ = (bitField0_ & ~0x00000008); httpRequest_ = null; if (httpRequestBuilder_ != null) { httpRequestBuilder_.dispose(); httpRequestBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public com.google.api.servicecontrol.v1.HttpRequest.Builder getHttpRequestBuilder() { bitField0_ |= 0x00000008; onChanged(); return getHttpRequestFieldBuilder().getBuilder(); } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ public com.google.api.servicecontrol.v1.HttpRequestOrBuilder getHttpRequestOrBuilder() { if (httpRequestBuilder_ != null) { return httpRequestBuilder_.getMessageOrBuilder(); } else { return httpRequest_ == null ? com.google.api.servicecontrol.v1.HttpRequest.getDefaultInstance() : httpRequest_; } } /** * * *
     * Optional. Information about the HTTP request associated with this
     * log entry, if applicable.
     * 
* * .google.api.servicecontrol.v1.HttpRequest http_request = 14; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.HttpRequest, com.google.api.servicecontrol.v1.HttpRequest.Builder, com.google.api.servicecontrol.v1.HttpRequestOrBuilder> getHttpRequestFieldBuilder() { if (httpRequestBuilder_ == null) { httpRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.HttpRequest, com.google.api.servicecontrol.v1.HttpRequest.Builder, com.google.api.servicecontrol.v1.HttpRequestOrBuilder>( getHttpRequest(), getParentForChildren(), isClean()); httpRequest_ = null; } return httpRequestBuilder_; } private java.lang.Object trace_ = ""; /** * * *
     * Optional. Resource name of the trace associated with the log entry, if any.
     * If this field contains a relative resource name, you can assume the name is
     * relative to `//tracing.googleapis.com`. Example:
     * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
     * 
* * string trace = 15; * * @return The trace. */ public java.lang.String getTrace() { java.lang.Object ref = trace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); trace_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Resource name of the trace associated with the log entry, if any.
     * If this field contains a relative resource name, you can assume the name is
     * relative to `//tracing.googleapis.com`. Example:
     * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
     * 
* * string trace = 15; * * @return The bytes for trace. */ public com.google.protobuf.ByteString getTraceBytes() { java.lang.Object ref = trace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); trace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Resource name of the trace associated with the log entry, if any.
     * If this field contains a relative resource name, you can assume the name is
     * relative to `//tracing.googleapis.com`. Example:
     * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
     * 
* * string trace = 15; * * @param value The trace to set. * @return This builder for chaining. */ public Builder setTrace(java.lang.String value) { if (value == null) { throw new NullPointerException(); } trace_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Optional. Resource name of the trace associated with the log entry, if any.
     * If this field contains a relative resource name, you can assume the name is
     * relative to `//tracing.googleapis.com`. Example:
     * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
     * 
* * string trace = 15; * * @return This builder for chaining. */ public Builder clearTrace() { trace_ = getDefaultInstance().getTrace(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * Optional. Resource name of the trace associated with the log entry, if any.
     * If this field contains a relative resource name, you can assume the name is
     * relative to `//tracing.googleapis.com`. Example:
     * `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`
     * 
* * string trace = 15; * * @param value The bytes for trace to set. * @return This builder for chaining. */ public Builder setTraceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); trace_ = value; bitField0_ |= 0x00000010; 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; * * @return The insertId. */ 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.
     * 
* * string insert_id = 4; * * @return The bytes for insertId. */ 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.
     * 
* * string insert_id = 4; * * @param value The insertId to set. * @return This builder for chaining. */ public Builder setInsertId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } insertId_ = value; bitField0_ |= 0x00000020; 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; * * @return This builder for chaining. */ public Builder clearInsertId() { insertId_ = getDefaultInstance().getInsertId(); bitField0_ = (bitField0_ & ~0x00000020); 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; * * @param value The bytes for insertId to set. * @return This builder for chaining. */ public Builder setInsertIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); insertId_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.MapField 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() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000040; onChanged(); 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; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @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; */ @java.lang.Override 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; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } 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; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000040); 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 NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000040; 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 NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000040; 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); bitField0_ |= 0x00000040; 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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .google.protobuf.Any proto_payload = 2; * * @return Whether the protoPayload field is set. */ @java.lang.Override public boolean hasProtoPayload() { return payloadCase_ == 2; } /** * * *
     * The log entry payload, represented as a protocol buffer that is
     * expressed as a JSON object. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .google.protobuf.Any proto_payload = 2; * * @return The protoPayload. */ @java.lang.Override 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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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); } else { protoPayloadBuilder_.setMessage(value); } } payloadCase_ = 2; return this; } /** * * *
     * The log entry payload, represented as a protocol buffer that is
     * expressed as a JSON object. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .google.protobuf.Any proto_payload = 2; */ @java.lang.Override 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. The only accepted type currently is
     * [AuditLog][google.cloud.audit.AuditLog].
     * 
* * .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).
     * 
* * string text_payload = 3; * * @return Whether the textPayload field is set. */ @java.lang.Override public boolean hasTextPayload() { return payloadCase_ == 3; } /** * * *
     * The log entry payload, represented as a Unicode string (UTF-8).
     * 
* * string text_payload = 3; * * @return The textPayload. */ @java.lang.Override 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).
     * 
* * string text_payload = 3; * * @return The bytes for textPayload. */ @java.lang.Override 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).
     * 
* * string text_payload = 3; * * @param value The textPayload to set. * @return This builder for chaining. */ 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; * * @return This builder for chaining. */ 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; * * @param value The bytes for textPayload to set. * @return This builder for chaining. */ 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.
     * 
* * .google.protobuf.Struct struct_payload = 6; * * @return Whether the structPayload field is set. */ @java.lang.Override public boolean hasStructPayload() { return payloadCase_ == 6; } /** * * *
     * The log entry payload, represented as a structure that
     * is expressed as a JSON object.
     * 
* * .google.protobuf.Struct struct_payload = 6; * * @return The structPayload. */ @java.lang.Override 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.
     * 
* * .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.
     * 
* * .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.
     * 
* * .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); } 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 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.protobuf.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; */ @java.lang.Override 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.
     * 
* * .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_; } private com.google.api.servicecontrol.v1.LogEntryOperation operation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntryOperation, com.google.api.servicecontrol.v1.LogEntryOperation.Builder, com.google.api.servicecontrol.v1.LogEntryOperationOrBuilder> operationBuilder_; /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; * * @return Whether the operation field is set. */ public boolean hasOperation() { return ((bitField0_ & 0x00000400) != 0); } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; * * @return The operation. */ public com.google.api.servicecontrol.v1.LogEntryOperation getOperation() { if (operationBuilder_ == null) { return operation_ == null ? com.google.api.servicecontrol.v1.LogEntryOperation.getDefaultInstance() : operation_; } else { return operationBuilder_.getMessage(); } } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public Builder setOperation(com.google.api.servicecontrol.v1.LogEntryOperation value) { if (operationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } operation_ = value; } else { operationBuilder_.setMessage(value); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public Builder setOperation( com.google.api.servicecontrol.v1.LogEntryOperation.Builder builderForValue) { if (operationBuilder_ == null) { operation_ = builderForValue.build(); } else { operationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public Builder mergeOperation(com.google.api.servicecontrol.v1.LogEntryOperation value) { if (operationBuilder_ == null) { if (((bitField0_ & 0x00000400) != 0) && operation_ != null && operation_ != com.google.api.servicecontrol.v1.LogEntryOperation.getDefaultInstance()) { getOperationBuilder().mergeFrom(value); } else { operation_ = value; } } else { operationBuilder_.mergeFrom(value); } if (operation_ != null) { bitField0_ |= 0x00000400; onChanged(); } return this; } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public Builder clearOperation() { bitField0_ = (bitField0_ & ~0x00000400); operation_ = null; if (operationBuilder_ != null) { operationBuilder_.dispose(); operationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public com.google.api.servicecontrol.v1.LogEntryOperation.Builder getOperationBuilder() { bitField0_ |= 0x00000400; onChanged(); return getOperationFieldBuilder().getBuilder(); } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ public com.google.api.servicecontrol.v1.LogEntryOperationOrBuilder getOperationOrBuilder() { if (operationBuilder_ != null) { return operationBuilder_.getMessageOrBuilder(); } else { return operation_ == null ? com.google.api.servicecontrol.v1.LogEntryOperation.getDefaultInstance() : operation_; } } /** * * *
     * Optional. Information about an operation associated with the log entry, if
     * applicable.
     * 
* * .google.api.servicecontrol.v1.LogEntryOperation operation = 16; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntryOperation, com.google.api.servicecontrol.v1.LogEntryOperation.Builder, com.google.api.servicecontrol.v1.LogEntryOperationOrBuilder> getOperationFieldBuilder() { if (operationBuilder_ == null) { operationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntryOperation, com.google.api.servicecontrol.v1.LogEntryOperation.Builder, com.google.api.servicecontrol.v1.LogEntryOperationOrBuilder>( getOperation(), getParentForChildren(), isClean()); operation_ = null; } return operationBuilder_; } private com.google.api.servicecontrol.v1.LogEntrySourceLocation sourceLocation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntrySourceLocation, com.google.api.servicecontrol.v1.LogEntrySourceLocation.Builder, com.google.api.servicecontrol.v1.LogEntrySourceLocationOrBuilder> sourceLocationBuilder_; /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; * * @return Whether the sourceLocation field is set. */ public boolean hasSourceLocation() { return ((bitField0_ & 0x00000800) != 0); } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; * * @return The sourceLocation. */ public com.google.api.servicecontrol.v1.LogEntrySourceLocation getSourceLocation() { if (sourceLocationBuilder_ == null) { return sourceLocation_ == null ? com.google.api.servicecontrol.v1.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } else { return sourceLocationBuilder_.getMessage(); } } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public Builder setSourceLocation( com.google.api.servicecontrol.v1.LogEntrySourceLocation value) { if (sourceLocationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sourceLocation_ = value; } else { sourceLocationBuilder_.setMessage(value); } bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public Builder setSourceLocation( com.google.api.servicecontrol.v1.LogEntrySourceLocation.Builder builderForValue) { if (sourceLocationBuilder_ == null) { sourceLocation_ = builderForValue.build(); } else { sourceLocationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public Builder mergeSourceLocation( com.google.api.servicecontrol.v1.LogEntrySourceLocation value) { if (sourceLocationBuilder_ == null) { if (((bitField0_ & 0x00000800) != 0) && sourceLocation_ != null && sourceLocation_ != com.google.api.servicecontrol.v1.LogEntrySourceLocation.getDefaultInstance()) { getSourceLocationBuilder().mergeFrom(value); } else { sourceLocation_ = value; } } else { sourceLocationBuilder_.mergeFrom(value); } if (sourceLocation_ != null) { bitField0_ |= 0x00000800; onChanged(); } return this; } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public Builder clearSourceLocation() { bitField0_ = (bitField0_ & ~0x00000800); sourceLocation_ = null; if (sourceLocationBuilder_ != null) { sourceLocationBuilder_.dispose(); sourceLocationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public com.google.api.servicecontrol.v1.LogEntrySourceLocation.Builder getSourceLocationBuilder() { bitField0_ |= 0x00000800; onChanged(); return getSourceLocationFieldBuilder().getBuilder(); } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ public com.google.api.servicecontrol.v1.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder() { if (sourceLocationBuilder_ != null) { return sourceLocationBuilder_.getMessageOrBuilder(); } else { return sourceLocation_ == null ? com.google.api.servicecontrol.v1.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } } /** * * *
     * Optional. Source code location information associated with the log entry,
     * if any.
     * 
* * .google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntrySourceLocation, com.google.api.servicecontrol.v1.LogEntrySourceLocation.Builder, com.google.api.servicecontrol.v1.LogEntrySourceLocationOrBuilder> getSourceLocationFieldBuilder() { if (sourceLocationBuilder_ == null) { sourceLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.servicecontrol.v1.LogEntrySourceLocation, com.google.api.servicecontrol.v1.LogEntrySourceLocation.Builder, com.google.api.servicecontrol.v1.LogEntrySourceLocationOrBuilder>( getSourceLocation(), getParentForChildren(), isClean()); sourceLocation_ = null; } return sourceLocationBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@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() { @java.lang.Override public LogEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.api.servicecontrol.v1.LogEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy