/** * * * <pre> * Optional. Source file name. Depending on the runtime environment, this * might be a simple name or a fully-qualified name. * </pre> * * <code>string file = 1;</code> */ public Builder clearFile() { file_ = getDefaultInstance().getFile(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.LogEntrySourceLocation)) { return super.equals(obj); } com.google.logging.v2.LogEntrySourceLocation other = (com.google.logging.v2.LogEntrySourceLocation) obj; boolean result = true; result = result && getFile().equals(other.getFile()); result = result && (getLine() == other.getLine()); result = result && getFunction().equals(other.getFunction()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FILE_FIELD_NUMBER; hash = (53 * hash) + getFile().hashCode(); hash = (37 * hash) + LINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLine()); hash = (37 * hash) + FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getFunction().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.logging.v2.LogEntrySourceLocation other) { if (other == com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance()) return this; if (!other.getFile().isEmpty()) { file_ = other.file_; onChanged(); } if (other.getLine() != 0L) { setLine(other.getLine()); } if (!other.getFunction().isEmpty()) { function_ = other.function_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
if (!entryPb.getSourceLocation().equals(LogEntrySourceLocation.getDefaultInstance())) { builder.setSourceLocation(SourceLocation.fromPb(entryPb.getSourceLocation()));
/** * * * <pre> * Optional. Human-readable name of the function or method being invoked, with * optional context such as the class or package name. This information may be * used in contexts such as the logs viewer, where a file and line number are * less meaningful. The format can vary by language. For example: * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` * (Python). * </pre> * * <code>string function = 3;</code> */ public Builder clearFunction() { function_ = getDefaultInstance().getFunction(); onChanged(); return this; } /**
@java.lang.Override public com.google.logging.v2.LogEntrySourceLocation getDefaultInstanceForType() { return com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getFileBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, file_); } if (line_ != 0L) { output.writeInt64(2, line_); } if (!getFunctionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, function_); } unknownFields.writeTo(output); }
result = result && (hasSourceLocation() == other.hasSourceLocation()); if (hasSourceLocation()) { result = result && getSourceLocation().equals(other.getSourceLocation());
@java.lang.Override public com.google.logging.v2.LogEntrySourceLocation buildPartial() { com.google.logging.v2.LogEntrySourceLocation result = new com.google.logging.v2.LogEntrySourceLocation(this); result.file_ = file_; result.line_ = line_; result.function_ = function_; onBuilt(); return result; }
if (!entryPb.getSourceLocation().equals(LogEntrySourceLocation.getDefaultInstance())) { builder.setSourceLocation(SourceLocation.fromPb(entryPb.getSourceLocation()));
/** * * * <pre> * Optional. Source code location information associated with the log entry, * if any. * </pre> * * <code>.google.logging.v2.LogEntrySourceLocation source_location = 23;</code> */ public com.google.logging.v2.LogEntrySourceLocation getSourceLocation() { return sourceLocation_ == null ? com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getFileBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, file_); } if (line_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, line_); } if (!getFunctionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, function_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
static SourceLocation fromPb(LogEntrySourceLocation sourceLocationPb) { return new Builder() .setFile(sourceLocationPb.getFile()) .setLine(sourceLocationPb.getLine()) .setFunction(sourceLocationPb.getFunction()) .build(); } }
/** * * * <pre> * Optional. Source code location information associated with the log entry, * if any. * </pre> * * <code>.google.logging.v2.LogEntrySourceLocation source_location = 23;</code> */ public Builder mergeSourceLocation(com.google.logging.v2.LogEntrySourceLocation value) { if (sourceLocationBuilder_ == null) { if (sourceLocation_ != null) { sourceLocation_ = com.google.logging.v2.LogEntrySourceLocation.newBuilder(sourceLocation_) .mergeFrom(value) .buildPartial(); } else { sourceLocation_ = value; } onChanged(); } else { sourceLocationBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * Optional. Source code location information associated with the log entry, * if any. * </pre> * * <code>.google.logging.v2.LogEntrySourceLocation source_location = 23;</code> */ public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder() { if (sourceLocationBuilder_ != null) { return sourceLocationBuilder_.getMessageOrBuilder(); } else { return sourceLocation_ == null ? com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } } /**
static SourceLocation fromPb(LogEntrySourceLocation sourceLocationPb) { return new Builder() .setFile(sourceLocationPb.getFile()) .setLine(sourceLocationPb.getLine()) .setFunction(sourceLocationPb.getFunction()) .build(); } }
LogEntrySourceLocation toPb() { LogEntrySourceLocation.Builder builder = LogEntrySourceLocation.newBuilder(); builder.setFile(file); builder.setLine(line); builder.setFunction(function); return builder.build(); }
/** * * * <pre> * Optional. Source code location information associated with the log entry, * if any. * </pre> * * <code>.google.logging.v2.LogEntrySourceLocation source_location = 23;</code> */ public com.google.logging.v2.LogEntrySourceLocation getSourceLocation() { if (sourceLocationBuilder_ == null) { return sourceLocation_ == null ? com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance() : sourceLocation_; } else { return sourceLocationBuilder_.getMessage(); } } /**