
com.google.api.expr.v1alpha1.SourceInfo Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/expr/v1alpha1/syntax.proto
package com.google.api.expr.v1alpha1;
/**
*
* Source information collected at parse time.
*
*
* Protobuf type {@code google.api.expr.v1alpha1.SourceInfo}
*/
public final class SourceInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.SourceInfo)
SourceInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use SourceInfo.newBuilder() to construct.
private SourceInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourceInfo() {
syntaxVersion_ = "";
location_ = "";
lineOffsets_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SourceInfo();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SourceInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
syntaxVersion_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
location_ = s;
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
lineOffsets_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
lineOffsets_.addInt(input.readInt32());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
lineOffsets_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
lineOffsets_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
positions_ = com.google.protobuf.MapField.newMapField(
PositionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
positions__ = input.readMessage(
PositionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
positions_.getMutableMap().put(
positions__.getKey(), positions__.getValue());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
macroCalls_ = com.google.protobuf.MapField.newMapField(
MacroCallsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000004;
}
com.google.protobuf.MapEntry
macroCalls__ = input.readMessage(
MacroCallsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
macroCalls_.getMutableMap().put(
macroCalls__.getKey(), macroCalls__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
lineOffsets_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetPositions();
case 5:
return internalGetMacroCalls();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.expr.v1alpha1.SourceInfo.class, com.google.api.expr.v1alpha1.SourceInfo.Builder.class);
}
public static final int SYNTAX_VERSION_FIELD_NUMBER = 1;
private volatile java.lang.Object syntaxVersion_;
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @return The syntaxVersion.
*/
@java.lang.Override
public java.lang.String getSyntaxVersion() {
java.lang.Object ref = syntaxVersion_;
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();
syntaxVersion_ = s;
return s;
}
}
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @return The bytes for syntaxVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSyntaxVersionBytes() {
java.lang.Object ref = syntaxVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
syntaxVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCATION_FIELD_NUMBER = 2;
private volatile java.lang.Object location_;
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @return The location.
*/
@java.lang.Override
public java.lang.String getLocation() {
java.lang.Object ref = location_;
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();
location_ = s;
return s;
}
}
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @return The bytes for location.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LINE_OFFSETS_FIELD_NUMBER = 3;
private com.google.protobuf.Internal.IntList lineOffsets_;
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @return A list containing the lineOffsets.
*/
@java.lang.Override
public java.util.List
getLineOffsetsList() {
return lineOffsets_;
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @return The count of lineOffsets.
*/
public int getLineOffsetsCount() {
return lineOffsets_.size();
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @param index The index of the element to return.
* @return The lineOffsets at the given index.
*/
public int getLineOffsets(int index) {
return lineOffsets_.getInt(index);
}
private int lineOffsetsMemoizedSerializedSize = -1;
public static final int POSITIONS_FIELD_NUMBER = 4;
private static final class PositionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_PositionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.INT32,
0);
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.Integer> positions_;
private com.google.protobuf.MapField
internalGetPositions() {
if (positions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PositionsDefaultEntryHolder.defaultEntry);
}
return positions_;
}
public int getPositionsCount() {
return internalGetPositions().getMap().size();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public boolean containsPositions(
long key) {
return internalGetPositions().getMap().containsKey(key);
}
/**
* Use {@link #getPositionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPositions() {
return getPositionsMap();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public java.util.Map getPositionsMap() {
return internalGetPositions().getMap();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public int getPositionsOrDefault(
long key,
int defaultValue) {
java.util.Map map =
internalGetPositions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public int getPositionsOrThrow(
long key) {
java.util.Map map =
internalGetPositions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int MACRO_CALLS_FIELD_NUMBER = 5;
private static final class MacroCallsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, com.google.api.expr.v1alpha1.Expr> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.api.expr.v1alpha1.Expr.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, com.google.api.expr.v1alpha1.Expr> macroCalls_;
private com.google.protobuf.MapField
internalGetMacroCalls() {
if (macroCalls_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MacroCallsDefaultEntryHolder.defaultEntry);
}
return macroCalls_;
}
public int getMacroCallsCount() {
return internalGetMacroCalls().getMap().size();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public boolean containsMacroCalls(
long key) {
return internalGetMacroCalls().getMap().containsKey(key);
}
/**
* Use {@link #getMacroCallsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMacroCalls() {
return getMacroCallsMap();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public java.util.Map getMacroCallsMap() {
return internalGetMacroCalls().getMap();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.Expr getMacroCallsOrDefault(
long key,
com.google.api.expr.v1alpha1.Expr defaultValue) {
java.util.Map map =
internalGetMacroCalls().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.Expr getMacroCallsOrThrow(
long key) {
java.util.Map map =
internalGetMacroCalls().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(syntaxVersion_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, syntaxVersion_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_);
}
if (getLineOffsetsList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(lineOffsetsMemoizedSerializedSize);
}
for (int i = 0; i < lineOffsets_.size(); i++) {
output.writeInt32NoTag(lineOffsets_.getInt(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetPositions(),
PositionsDefaultEntryHolder.defaultEntry,
4);
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetMacroCalls(),
MacroCallsDefaultEntryHolder.defaultEntry,
5);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(syntaxVersion_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, syntaxVersion_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_);
}
{
int dataSize = 0;
for (int i = 0; i < lineOffsets_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(lineOffsets_.getInt(i));
}
size += dataSize;
if (!getLineOffsetsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
lineOffsetsMemoizedSerializedSize = dataSize;
}
for (java.util.Map.Entry entry
: internalGetPositions().getMap().entrySet()) {
com.google.protobuf.MapEntry
positions__ = PositionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, positions__);
}
for (java.util.Map.Entry entry
: internalGetMacroCalls().getMap().entrySet()) {
com.google.protobuf.MapEntry
macroCalls__ = MacroCallsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, macroCalls__);
}
size += unknownFields.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.expr.v1alpha1.SourceInfo)) {
return super.equals(obj);
}
com.google.api.expr.v1alpha1.SourceInfo other = (com.google.api.expr.v1alpha1.SourceInfo) obj;
if (!getSyntaxVersion()
.equals(other.getSyntaxVersion())) return false;
if (!getLocation()
.equals(other.getLocation())) return false;
if (!getLineOffsetsList()
.equals(other.getLineOffsetsList())) return false;
if (!internalGetPositions().equals(
other.internalGetPositions())) return false;
if (!internalGetMacroCalls().equals(
other.internalGetMacroCalls())) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + SYNTAX_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getSyntaxVersion().hashCode();
hash = (37 * hash) + LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getLocation().hashCode();
if (getLineOffsetsCount() > 0) {
hash = (37 * hash) + LINE_OFFSETS_FIELD_NUMBER;
hash = (53 * hash) + getLineOffsetsList().hashCode();
}
if (!internalGetPositions().getMap().isEmpty()) {
hash = (37 * hash) + POSITIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetPositions().hashCode();
}
if (!internalGetMacroCalls().getMap().isEmpty()) {
hash = (37 * hash) + MACRO_CALLS_FIELD_NUMBER;
hash = (53 * hash) + internalGetMacroCalls().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.expr.v1alpha1.SourceInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.expr.v1alpha1.SourceInfo 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.expr.v1alpha1.SourceInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.expr.v1alpha1.SourceInfo 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.expr.v1alpha1.SourceInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.expr.v1alpha1.SourceInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.expr.v1alpha1.SourceInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.expr.v1alpha1.SourceInfo 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.expr.v1alpha1.SourceInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.expr.v1alpha1.SourceInfo 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.expr.v1alpha1.SourceInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.expr.v1alpha1.SourceInfo 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.expr.v1alpha1.SourceInfo 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;
}
/**
*
* Source information collected at parse time.
*
*
* Protobuf type {@code google.api.expr.v1alpha1.SourceInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.SourceInfo)
com.google.api.expr.v1alpha1.SourceInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetPositions();
case 5:
return internalGetMacroCalls();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutablePositions();
case 5:
return internalGetMutableMacroCalls();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.expr.v1alpha1.SourceInfo.class, com.google.api.expr.v1alpha1.SourceInfo.Builder.class);
}
// Construct using com.google.api.expr.v1alpha1.SourceInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
syntaxVersion_ = "";
location_ = "";
lineOffsets_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutablePositions().clear();
internalGetMutableMacroCalls().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.expr.v1alpha1.SyntaxProto.internal_static_google_api_expr_v1alpha1_SourceInfo_descriptor;
}
@java.lang.Override
public com.google.api.expr.v1alpha1.SourceInfo getDefaultInstanceForType() {
return com.google.api.expr.v1alpha1.SourceInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.api.expr.v1alpha1.SourceInfo build() {
com.google.api.expr.v1alpha1.SourceInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.expr.v1alpha1.SourceInfo buildPartial() {
com.google.api.expr.v1alpha1.SourceInfo result = new com.google.api.expr.v1alpha1.SourceInfo(this);
int from_bitField0_ = bitField0_;
result.syntaxVersion_ = syntaxVersion_;
result.location_ = location_;
if (((bitField0_ & 0x00000001) != 0)) {
lineOffsets_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.lineOffsets_ = lineOffsets_;
result.positions_ = internalGetPositions();
result.positions_.makeImmutable();
result.macroCalls_ = internalGetMacroCalls();
result.macroCalls_.makeImmutable();
onBuilt();
return result;
}
@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.expr.v1alpha1.SourceInfo) {
return mergeFrom((com.google.api.expr.v1alpha1.SourceInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.expr.v1alpha1.SourceInfo other) {
if (other == com.google.api.expr.v1alpha1.SourceInfo.getDefaultInstance()) return this;
if (!other.getSyntaxVersion().isEmpty()) {
syntaxVersion_ = other.syntaxVersion_;
onChanged();
}
if (!other.getLocation().isEmpty()) {
location_ = other.location_;
onChanged();
}
if (!other.lineOffsets_.isEmpty()) {
if (lineOffsets_.isEmpty()) {
lineOffsets_ = other.lineOffsets_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLineOffsetsIsMutable();
lineOffsets_.addAll(other.lineOffsets_);
}
onChanged();
}
internalGetMutablePositions().mergeFrom(
other.internalGetPositions());
internalGetMutableMacroCalls().mergeFrom(
other.internalGetMacroCalls());
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.api.expr.v1alpha1.SourceInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.api.expr.v1alpha1.SourceInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object syntaxVersion_ = "";
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @return The syntaxVersion.
*/
public java.lang.String getSyntaxVersion() {
java.lang.Object ref = syntaxVersion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
syntaxVersion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @return The bytes for syntaxVersion.
*/
public com.google.protobuf.ByteString
getSyntaxVersionBytes() {
java.lang.Object ref = syntaxVersion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
syntaxVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @param value The syntaxVersion to set.
* @return This builder for chaining.
*/
public Builder setSyntaxVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
syntaxVersion_ = value;
onChanged();
return this;
}
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @return This builder for chaining.
*/
public Builder clearSyntaxVersion() {
syntaxVersion_ = getDefaultInstance().getSyntaxVersion();
onChanged();
return this;
}
/**
*
* The syntax version of the source, e.g. `cel1`.
*
*
* string syntax_version = 1;
* @param value The bytes for syntaxVersion to set.
* @return This builder for chaining.
*/
public Builder setSyntaxVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
syntaxVersion_ = value;
onChanged();
return this;
}
private java.lang.Object location_ = "";
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @return The location.
*/
public java.lang.String getLocation() {
java.lang.Object ref = location_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
location_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @return The bytes for location.
*/
public com.google.protobuf.ByteString
getLocationBytes() {
java.lang.Object ref = location_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
location_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @param value The location to set.
* @return This builder for chaining.
*/
public Builder setLocation(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
location_ = value;
onChanged();
return this;
}
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @return This builder for chaining.
*/
public Builder clearLocation() {
location_ = getDefaultInstance().getLocation();
onChanged();
return this;
}
/**
*
* The location name. All position information attached to an expression is
* relative to this location.
* The location could be a file, UI element, or similar. For example,
* `acme/app/AnvilPolicy.cel`.
*
*
* string location = 2;
* @param value The bytes for location to set.
* @return This builder for chaining.
*/
public Builder setLocationBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
location_ = value;
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList lineOffsets_ = emptyIntList();
private void ensureLineOffsetsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
lineOffsets_ = mutableCopy(lineOffsets_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @return A list containing the lineOffsets.
*/
public java.util.List
getLineOffsetsList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(lineOffsets_) : lineOffsets_;
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @return The count of lineOffsets.
*/
public int getLineOffsetsCount() {
return lineOffsets_.size();
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @param index The index of the element to return.
* @return The lineOffsets at the given index.
*/
public int getLineOffsets(int index) {
return lineOffsets_.getInt(index);
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @param index The index to set the value at.
* @param value The lineOffsets to set.
* @return This builder for chaining.
*/
public Builder setLineOffsets(
int index, int value) {
ensureLineOffsetsIsMutable();
lineOffsets_.setInt(index, value);
onChanged();
return this;
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @param value The lineOffsets to add.
* @return This builder for chaining.
*/
public Builder addLineOffsets(int value) {
ensureLineOffsetsIsMutable();
lineOffsets_.addInt(value);
onChanged();
return this;
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @param values The lineOffsets to add.
* @return This builder for chaining.
*/
public Builder addAllLineOffsets(
java.lang.Iterable extends java.lang.Integer> values) {
ensureLineOffsetsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, lineOffsets_);
onChanged();
return this;
}
/**
*
* Monotonically increasing list of code point offsets where newlines
* `\n` appear.
* The line number of a given position is the index `i` where for a given
* `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The
* column may be derivd from `id_positions[id] - line_offsets[i]`.
*
*
* repeated int32 line_offsets = 3;
* @return This builder for chaining.
*/
public Builder clearLineOffsets() {
lineOffsets_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.Integer> positions_;
private com.google.protobuf.MapField
internalGetPositions() {
if (positions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PositionsDefaultEntryHolder.defaultEntry);
}
return positions_;
}
private com.google.protobuf.MapField
internalGetMutablePositions() {
onChanged();;
if (positions_ == null) {
positions_ = com.google.protobuf.MapField.newMapField(
PositionsDefaultEntryHolder.defaultEntry);
}
if (!positions_.isMutable()) {
positions_ = positions_.copy();
}
return positions_;
}
public int getPositionsCount() {
return internalGetPositions().getMap().size();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public boolean containsPositions(
long key) {
return internalGetPositions().getMap().containsKey(key);
}
/**
* Use {@link #getPositionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getPositions() {
return getPositionsMap();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public java.util.Map getPositionsMap() {
return internalGetPositions().getMap();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public int getPositionsOrDefault(
long key,
int defaultValue) {
java.util.Map map =
internalGetPositions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
@java.lang.Override
public int getPositionsOrThrow(
long key) {
java.util.Map map =
internalGetPositions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearPositions() {
internalGetMutablePositions().getMutableMap()
.clear();
return this;
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
public Builder removePositions(
long key) {
internalGetMutablePositions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePositions() {
return internalGetMutablePositions().getMutableMap();
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
public Builder putPositions(
long key,
int value) {
internalGetMutablePositions().getMutableMap()
.put(key, value);
return this;
}
/**
*
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*
*
* map<int64, int32> positions = 4;
*/
public Builder putAllPositions(
java.util.Map values) {
internalGetMutablePositions().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, com.google.api.expr.v1alpha1.Expr> macroCalls_;
private com.google.protobuf.MapField
internalGetMacroCalls() {
if (macroCalls_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MacroCallsDefaultEntryHolder.defaultEntry);
}
return macroCalls_;
}
private com.google.protobuf.MapField
internalGetMutableMacroCalls() {
onChanged();;
if (macroCalls_ == null) {
macroCalls_ = com.google.protobuf.MapField.newMapField(
MacroCallsDefaultEntryHolder.defaultEntry);
}
if (!macroCalls_.isMutable()) {
macroCalls_ = macroCalls_.copy();
}
return macroCalls_;
}
public int getMacroCallsCount() {
return internalGetMacroCalls().getMap().size();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public boolean containsMacroCalls(
long key) {
return internalGetMacroCalls().getMap().containsKey(key);
}
/**
* Use {@link #getMacroCallsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMacroCalls() {
return getMacroCallsMap();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public java.util.Map getMacroCallsMap() {
return internalGetMacroCalls().getMap();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.Expr getMacroCallsOrDefault(
long key,
com.google.api.expr.v1alpha1.Expr defaultValue) {
java.util.Map map =
internalGetMacroCalls().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
@java.lang.Override
public com.google.api.expr.v1alpha1.Expr getMacroCallsOrThrow(
long key) {
java.util.Map map =
internalGetMacroCalls().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMacroCalls() {
internalGetMutableMacroCalls().getMutableMap()
.clear();
return this;
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
public Builder removeMacroCalls(
long key) {
internalGetMutableMacroCalls().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMacroCalls() {
return internalGetMutableMacroCalls().getMutableMap();
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
public Builder putMacroCalls(
long key,
com.google.api.expr.v1alpha1.Expr value) {
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableMacroCalls().getMutableMap()
.put(key, value);
return this;
}
/**
*
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
* For example, `has(value.field)` is a function call that is replaced by a
* `test_only` field selection in the AST. Likewise, the call
* `list.exists(e, e > 10)` translates to a comprehension expression. The key
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*
*
* map<int64, .google.api.expr.v1alpha1.Expr> macro_calls = 5;
*/
public Builder putAllMacroCalls(
java.util.Map values) {
internalGetMutableMacroCalls().getMutableMap()
.putAll(values);
return this;
}
@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.expr.v1alpha1.SourceInfo)
}
// @@protoc_insertion_point(class_scope:google.api.expr.v1alpha1.SourceInfo)
private static final com.google.api.expr.v1alpha1.SourceInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.expr.v1alpha1.SourceInfo();
}
public static com.google.api.expr.v1alpha1.SourceInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SourceInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SourceInfo(input, extensionRegistry);
}
};
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.expr.v1alpha1.SourceInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy