/** * * * <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 setSourceLocation( com.google.logging.v2.LogEntrySourceLocation.Builder builderForValue) { if (sourceLocationBuilder_ == null) { sourceLocation_ = builderForValue.build(); onChanged(); } else { sourceLocationBuilder_.setMessage(builderForValue.build()); } return this; } /**
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; }
com.google.logging.v2.LogEntrySourceLocation.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(sourceLocation_); sourceLocation_ = subBuilder.buildPartial();
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 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. 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 setFunction(java.lang.String value) { if (value == null) { throw new NullPointerException(); } function_ = value; onChanged(); return this; } /**
/** * * * <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 setFunctionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); function_ = value; onChanged(); return this; }
/** * * * <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 setFileBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); file_ = value; onChanged(); return this; }
/** * * * <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; } /**
/** * * * <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 setFile(java.lang.String value) { if (value == null) { throw new NullPointerException(); } file_ = value; onChanged(); return this; } /**
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.logging.v2.LogEntrySourceLocation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.logging.v2.LogEntrySourceLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * Optional. Line within the source file. 1-based; 0 indicates no line number * available. * </pre> * * <code>int64 line = 2;</code> */ public Builder setLine(long value) { line_ = value; onChanged(); return this; } /**
/** * * * <pre> * Optional. Line within the source file. 1-based; 0 indicates no line number * available. * </pre> * * <code>int64 line = 2;</code> */ public Builder clearLine() { line_ = 0L; onChanged(); return this; }
/** * * * <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; } /**
public static Builder newBuilder(com.google.logging.v2.LogEntrySourceLocation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
private Builder() { maybeForceBuilderInitialization(); }
@java.lang.Override public com.google.logging.v2.LogEntrySourceLocation build() { com.google.logging.v2.LogEntrySourceLocation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
LogEntrySourceLocation toPb() { LogEntrySourceLocation.Builder builder = LogEntrySourceLocation.newBuilder(); builder.setFile(file); builder.setLine(line); builder.setFunction(function); return builder.build(); }