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

com.google.api.expr.v1alpha1.Decl Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/expr/v1alpha1/checked.proto

package com.google.api.expr.v1alpha1;

/**
 * 
 * Represents a declaration of a named value or function.
 * A declaration is part of the contract between the expression, the agent
 * evaluating that expression, and the caller requesting evaluation.
 * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl} */ public final class Decl extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.Decl) DeclOrBuilder { private static final long serialVersionUID = 0L; // Use Decl.newBuilder() to construct. private Decl(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Decl() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Decl(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Decl( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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(); name_ = s; break; } case 18: { com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder subBuilder = null; if (declKindCase_ == 2) { subBuilder = ((com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_).toBuilder(); } declKind_ = input.readMessage(com.google.api.expr.v1alpha1.Decl.IdentDecl.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_); declKind_ = subBuilder.buildPartial(); } declKindCase_ = 2; break; } case 26: { com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder subBuilder = null; if (declKindCase_ == 3) { subBuilder = ((com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_).toBuilder(); } declKind_ = input.readMessage(com.google.api.expr.v1alpha1.Decl.FunctionDecl.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_); declKind_ = subBuilder.buildPartial(); } declKindCase_ = 3; 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.class, com.google.api.expr.v1alpha1.Decl.Builder.class); } public interface IdentDeclOrBuilder extends // @@protoc_insertion_point(interface_extends:google.api.expr.v1alpha1.Decl.IdentDecl) com.google.protobuf.MessageOrBuilder { /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return Whether the type field is set. */ boolean hasType(); /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return The type. */ com.google.api.expr.v1alpha1.Type getType(); /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; */ com.google.api.expr.v1alpha1.TypeOrBuilder getTypeOrBuilder(); /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return Whether the value field is set. */ boolean hasValue(); /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return The value. */ com.google.api.expr.v1alpha1.Constant getValue(); /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ com.google.api.expr.v1alpha1.ConstantOrBuilder getValueOrBuilder(); /** *
     * Documentation string for the identifier.
     * 
* * string doc = 3; * @return The doc. */ java.lang.String getDoc(); /** *
     * Documentation string for the identifier.
     * 
* * string doc = 3; * @return The bytes for doc. */ com.google.protobuf.ByteString getDocBytes(); } /** *
   * Identifier declaration which specifies its type and optional `Expr` value.
   * An identifier without a value is a declaration that must be provided at
   * evaluation time. An identifier with a value should resolve to a constant,
   * but may be used in conjunction with other identifiers bound at evaluation
   * time.
   * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.IdentDecl} */ public static final class IdentDecl extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.Decl.IdentDecl) IdentDeclOrBuilder { private static final long serialVersionUID = 0L; // Use IdentDecl.newBuilder() to construct. private IdentDecl(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private IdentDecl() { doc_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new IdentDecl(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private IdentDecl( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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: { com.google.api.expr.v1alpha1.Type.Builder subBuilder = null; if (type_ != null) { subBuilder = type_.toBuilder(); } type_ = input.readMessage(com.google.api.expr.v1alpha1.Type.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(type_); type_ = subBuilder.buildPartial(); } break; } case 18: { com.google.api.expr.v1alpha1.Constant.Builder subBuilder = null; if (value_ != null) { subBuilder = value_.toBuilder(); } value_ = input.readMessage(com.google.api.expr.v1alpha1.Constant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(value_); value_ = subBuilder.buildPartial(); } break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); doc_ = s; 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_IdentDecl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_IdentDecl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.IdentDecl.class, com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder.class); } public static final int TYPE_FIELD_NUMBER = 1; private com.google.api.expr.v1alpha1.Type type_; /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { return type_ != null; } /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return The type. */ @java.lang.Override public com.google.api.expr.v1alpha1.Type getType() { return type_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : type_; } /** *
     * Required. The type of the identifier.
     * 
* * .google.api.expr.v1alpha1.Type type = 1; */ @java.lang.Override public com.google.api.expr.v1alpha1.TypeOrBuilder getTypeOrBuilder() { return getType(); } public static final int VALUE_FIELD_NUMBER = 2; private com.google.api.expr.v1alpha1.Constant value_; /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return value_ != null; } /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return The value. */ @java.lang.Override public com.google.api.expr.v1alpha1.Constant getValue() { return value_ == null ? com.google.api.expr.v1alpha1.Constant.getDefaultInstance() : value_; } /** *
     * The constant value of the identifier. If not specified, the identifier
     * must be supplied at evaluation time.
     * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ @java.lang.Override public com.google.api.expr.v1alpha1.ConstantOrBuilder getValueOrBuilder() { return getValue(); } public static final int DOC_FIELD_NUMBER = 3; private volatile java.lang.Object doc_; /** *
     * Documentation string for the identifier.
     * 
* * string doc = 3; * @return The doc. */ @java.lang.Override public java.lang.String getDoc() { java.lang.Object ref = doc_; 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(); doc_ = s; return s; } } /** *
     * Documentation string for the identifier.
     * 
* * string doc = 3; * @return The bytes for doc. */ @java.lang.Override public com.google.protobuf.ByteString getDocBytes() { java.lang.Object ref = doc_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); doc_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (type_ != null) { output.writeMessage(1, getType()); } if (value_ != null) { output.writeMessage(2, getValue()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doc_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, doc_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getType()); } if (value_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getValue()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doc_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, doc_); } 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.Decl.IdentDecl)) { return super.equals(obj); } com.google.api.expr.v1alpha1.Decl.IdentDecl other = (com.google.api.expr.v1alpha1.Decl.IdentDecl) obj; if (hasType() != other.hasType()) return false; if (hasType()) { if (!getType() .equals(other.getType())) return false; } if (hasValue() != other.hasValue()) return false; if (hasValue()) { if (!getValue() .equals(other.getValue())) return false; } if (!getDoc() .equals(other.getDoc())) 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(); if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (37 * hash) + DOC_FIELD_NUMBER; hash = (53 * hash) + getDoc().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.expr.v1alpha1.Decl.IdentDecl parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl 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.Decl.IdentDecl parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl 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.Decl.IdentDecl parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl 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.Decl.IdentDecl parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl 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.Decl.IdentDecl parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl 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.Decl.IdentDecl 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.Decl.IdentDecl 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.Decl.IdentDecl 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; } /** *
     * Identifier declaration which specifies its type and optional `Expr` value.
     * An identifier without a value is a declaration that must be provided at
     * evaluation time. An identifier with a value should resolve to a constant,
     * but may be used in conjunction with other identifiers bound at evaluation
     * time.
     * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.IdentDecl} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.Decl.IdentDecl) com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_IdentDecl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_IdentDecl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.IdentDecl.class, com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder.class); } // Construct using com.google.api.expr.v1alpha1.Decl.IdentDecl.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(); if (typeBuilder_ == null) { type_ = null; } else { type_ = null; typeBuilder_ = null; } if (valueBuilder_ == null) { value_ = null; } else { value_ = null; valueBuilder_ = null; } doc_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_IdentDecl_descriptor; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDecl getDefaultInstanceForType() { return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDecl build() { com.google.api.expr.v1alpha1.Decl.IdentDecl result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDecl buildPartial() { com.google.api.expr.v1alpha1.Decl.IdentDecl result = new com.google.api.expr.v1alpha1.Decl.IdentDecl(this); if (typeBuilder_ == null) { result.type_ = type_; } else { result.type_ = typeBuilder_.build(); } if (valueBuilder_ == null) { result.value_ = value_; } else { result.value_ = valueBuilder_.build(); } result.doc_ = doc_; 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.Decl.IdentDecl) { return mergeFrom((com.google.api.expr.v1alpha1.Decl.IdentDecl)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.expr.v1alpha1.Decl.IdentDecl other) { if (other == com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance()) return this; if (other.hasType()) { mergeType(other.getType()); } if (other.hasValue()) { mergeValue(other.getValue()); } if (!other.getDoc().isEmpty()) { doc_ = other.doc_; onChanged(); } 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.Decl.IdentDecl parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.expr.v1alpha1.Decl.IdentDecl) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.api.expr.v1alpha1.Type type_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> typeBuilder_; /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return Whether the type field is set. */ public boolean hasType() { return typeBuilder_ != null || type_ != null; } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; * @return The type. */ public com.google.api.expr.v1alpha1.Type getType() { if (typeBuilder_ == null) { return type_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : type_; } else { return typeBuilder_.getMessage(); } } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public Builder setType(com.google.api.expr.v1alpha1.Type value) { if (typeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); } else { typeBuilder_.setMessage(value); } return this; } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public Builder setType( com.google.api.expr.v1alpha1.Type.Builder builderForValue) { if (typeBuilder_ == null) { type_ = builderForValue.build(); onChanged(); } else { typeBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public Builder mergeType(com.google.api.expr.v1alpha1.Type value) { if (typeBuilder_ == null) { if (type_ != null) { type_ = com.google.api.expr.v1alpha1.Type.newBuilder(type_).mergeFrom(value).buildPartial(); } else { type_ = value; } onChanged(); } else { typeBuilder_.mergeFrom(value); } return this; } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public Builder clearType() { if (typeBuilder_ == null) { type_ = null; onChanged(); } else { type_ = null; typeBuilder_ = null; } return this; } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public com.google.api.expr.v1alpha1.Type.Builder getTypeBuilder() { onChanged(); return getTypeFieldBuilder().getBuilder(); } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ public com.google.api.expr.v1alpha1.TypeOrBuilder getTypeOrBuilder() { if (typeBuilder_ != null) { return typeBuilder_.getMessageOrBuilder(); } else { return type_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : type_; } } /** *
       * Required. The type of the identifier.
       * 
* * .google.api.expr.v1alpha1.Type type = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> getTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder>( getType(), getParentForChildren(), isClean()); type_ = null; } return typeBuilder_; } private com.google.api.expr.v1alpha1.Constant value_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Constant, com.google.api.expr.v1alpha1.Constant.Builder, com.google.api.expr.v1alpha1.ConstantOrBuilder> valueBuilder_; /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return Whether the value field is set. */ public boolean hasValue() { return valueBuilder_ != null || value_ != null; } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; * @return The value. */ public com.google.api.expr.v1alpha1.Constant getValue() { if (valueBuilder_ == null) { return value_ == null ? com.google.api.expr.v1alpha1.Constant.getDefaultInstance() : value_; } else { return valueBuilder_.getMessage(); } } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public Builder setValue(com.google.api.expr.v1alpha1.Constant value) { if (valueBuilder_ == null) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); } else { valueBuilder_.setMessage(value); } return this; } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public Builder setValue( com.google.api.expr.v1alpha1.Constant.Builder builderForValue) { if (valueBuilder_ == null) { value_ = builderForValue.build(); onChanged(); } else { valueBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public Builder mergeValue(com.google.api.expr.v1alpha1.Constant value) { if (valueBuilder_ == null) { if (value_ != null) { value_ = com.google.api.expr.v1alpha1.Constant.newBuilder(value_).mergeFrom(value).buildPartial(); } else { value_ = value; } onChanged(); } else { valueBuilder_.mergeFrom(value); } return this; } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public Builder clearValue() { if (valueBuilder_ == null) { value_ = null; onChanged(); } else { value_ = null; valueBuilder_ = null; } return this; } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public com.google.api.expr.v1alpha1.Constant.Builder getValueBuilder() { onChanged(); return getValueFieldBuilder().getBuilder(); } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ public com.google.api.expr.v1alpha1.ConstantOrBuilder getValueOrBuilder() { if (valueBuilder_ != null) { return valueBuilder_.getMessageOrBuilder(); } else { return value_ == null ? com.google.api.expr.v1alpha1.Constant.getDefaultInstance() : value_; } } /** *
       * The constant value of the identifier. If not specified, the identifier
       * must be supplied at evaluation time.
       * 
* * .google.api.expr.v1alpha1.Constant value = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Constant, com.google.api.expr.v1alpha1.Constant.Builder, com.google.api.expr.v1alpha1.ConstantOrBuilder> getValueFieldBuilder() { if (valueBuilder_ == null) { valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Constant, com.google.api.expr.v1alpha1.Constant.Builder, com.google.api.expr.v1alpha1.ConstantOrBuilder>( getValue(), getParentForChildren(), isClean()); value_ = null; } return valueBuilder_; } private java.lang.Object doc_ = ""; /** *
       * Documentation string for the identifier.
       * 
* * string doc = 3; * @return The doc. */ public java.lang.String getDoc() { java.lang.Object ref = doc_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); doc_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Documentation string for the identifier.
       * 
* * string doc = 3; * @return The bytes for doc. */ public com.google.protobuf.ByteString getDocBytes() { java.lang.Object ref = doc_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); doc_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Documentation string for the identifier.
       * 
* * string doc = 3; * @param value The doc to set. * @return This builder for chaining. */ public Builder setDoc( java.lang.String value) { if (value == null) { throw new NullPointerException(); } doc_ = value; onChanged(); return this; } /** *
       * Documentation string for the identifier.
       * 
* * string doc = 3; * @return This builder for chaining. */ public Builder clearDoc() { doc_ = getDefaultInstance().getDoc(); onChanged(); return this; } /** *
       * Documentation string for the identifier.
       * 
* * string doc = 3; * @param value The bytes for doc to set. * @return This builder for chaining. */ public Builder setDocBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); doc_ = value; onChanged(); 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.Decl.IdentDecl) } // @@protoc_insertion_point(class_scope:google.api.expr.v1alpha1.Decl.IdentDecl) private static final com.google.api.expr.v1alpha1.Decl.IdentDecl DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.expr.v1alpha1.Decl.IdentDecl(); } public static com.google.api.expr.v1alpha1.Decl.IdentDecl getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public IdentDecl parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new IdentDecl(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.Decl.IdentDecl getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface FunctionDeclOrBuilder extends // @@protoc_insertion_point(interface_extends:google.api.expr.v1alpha1.Decl.FunctionDecl) com.google.protobuf.MessageOrBuilder { /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ java.util.List getOverloadsList(); /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload getOverloads(int index); /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ int getOverloadsCount(); /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ java.util.List getOverloadsOrBuilderList(); /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder getOverloadsOrBuilder( int index); } /** *
   * Function declaration specifies one or more overloads which indicate the
   * function's parameter types and return type.
   * Functions have no observable side-effects (there may be side-effects like
   * logging which are not observable from CEL).
   * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.FunctionDecl} */ public static final class FunctionDecl extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.Decl.FunctionDecl) FunctionDeclOrBuilder { private static final long serialVersionUID = 0L; // Use FunctionDecl.newBuilder() to construct. private FunctionDecl(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FunctionDecl() { overloads_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FunctionDecl(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private FunctionDecl( 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: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { overloads_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } overloads_.add( input.readMessage(com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.parser(), extensionRegistry)); 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)) { overloads_ = java.util.Collections.unmodifiableList(overloads_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.FunctionDecl.class, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder.class); } public interface OverloadOrBuilder extends // @@protoc_insertion_point(interface_extends:google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) com.google.protobuf.MessageOrBuilder { /** *
       * Required. Globally unique overload name of the function which reflects
       * the function name and argument types.
       * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       * to indicate the `overload_id` that was resolved for the function
       * `name`.
       * 
* * string overload_id = 1; * @return The overloadId. */ java.lang.String getOverloadId(); /** *
       * Required. Globally unique overload name of the function which reflects
       * the function name and argument types.
       * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       * to indicate the `overload_id` that was resolved for the function
       * `name`.
       * 
* * string overload_id = 1; * @return The bytes for overloadId. */ com.google.protobuf.ByteString getOverloadIdBytes(); /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ java.util.List getParamsList(); /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ com.google.api.expr.v1alpha1.Type getParams(int index); /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ int getParamsCount(); /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ java.util.List getParamsOrBuilderList(); /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ com.google.api.expr.v1alpha1.TypeOrBuilder getParamsOrBuilder( int index); /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @return A list containing the typeParams. */ java.util.List getTypeParamsList(); /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @return The count of typeParams. */ int getTypeParamsCount(); /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @param index The index of the element to return. * @return The typeParams at the given index. */ java.lang.String getTypeParams(int index); /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @param index The index of the value to return. * @return The bytes of the typeParams at the given index. */ com.google.protobuf.ByteString getTypeParamsBytes(int index); /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return Whether the resultType field is set. */ boolean hasResultType(); /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return The resultType. */ com.google.api.expr.v1alpha1.Type getResultType(); /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ com.google.api.expr.v1alpha1.TypeOrBuilder getResultTypeOrBuilder(); /** *
       * Whether the function is to be used in a method call-style `x.f(...)`
       * or a function call-style `f(x, ...)`.
       * For methods, the first parameter declaration, `params[0]` is the
       * expected type of the target receiver.
       * 
* * bool is_instance_function = 5; * @return The isInstanceFunction. */ boolean getIsInstanceFunction(); /** *
       * Documentation string for the overload.
       * 
* * string doc = 6; * @return The doc. */ java.lang.String getDoc(); /** *
       * Documentation string for the overload.
       * 
* * string doc = 6; * @return The bytes for doc. */ com.google.protobuf.ByteString getDocBytes(); } /** *
     * An overload indicates a function's parameter types and return type, and
     * may optionally include a function body described in terms of
     * [Expr][google.api.expr.v1alpha1.Expr] values.
     * Functions overloads are declared in either a function or method
     * call-style. For methods, the `params[0]` is the expected type of the
     * target receiver.
     * Overloads must have non-overlapping argument types after erasure of all
     * parameterized type variables (similar as type erasure in Java).
     * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} */ public static final class Overload extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) OverloadOrBuilder { private static final long serialVersionUID = 0L; // Use Overload.newBuilder() to construct. private Overload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Overload() { overloadId_ = ""; params_ = java.util.Collections.emptyList(); typeParams_ = com.google.protobuf.LazyStringArrayList.EMPTY; doc_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Overload(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Overload( 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(); overloadId_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { params_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } params_.add( input.readMessage(com.google.api.expr.v1alpha1.Type.parser(), extensionRegistry)); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { typeParams_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } typeParams_.add(s); break; } case 34: { com.google.api.expr.v1alpha1.Type.Builder subBuilder = null; if (resultType_ != null) { subBuilder = resultType_.toBuilder(); } resultType_ = input.readMessage(com.google.api.expr.v1alpha1.Type.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resultType_); resultType_ = subBuilder.buildPartial(); } break; } case 40: { isInstanceFunction_ = input.readBool(); break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); doc_ = s; 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)) { params_ = java.util.Collections.unmodifiableList(params_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { typeParams_ = typeParams_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.class, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder.class); } public static final int OVERLOAD_ID_FIELD_NUMBER = 1; private volatile java.lang.Object overloadId_; /** *
       * Required. Globally unique overload name of the function which reflects
       * the function name and argument types.
       * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       * to indicate the `overload_id` that was resolved for the function
       * `name`.
       * 
* * string overload_id = 1; * @return The overloadId. */ @java.lang.Override public java.lang.String getOverloadId() { java.lang.Object ref = overloadId_; 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(); overloadId_ = s; return s; } } /** *
       * Required. Globally unique overload name of the function which reflects
       * the function name and argument types.
       * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
       * to indicate the `overload_id` that was resolved for the function
       * `name`.
       * 
* * string overload_id = 1; * @return The bytes for overloadId. */ @java.lang.Override public com.google.protobuf.ByteString getOverloadIdBytes() { java.lang.Object ref = overloadId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); overloadId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PARAMS_FIELD_NUMBER = 2; private java.util.List params_; /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ @java.lang.Override public java.util.List getParamsList() { return params_; } /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ @java.lang.Override public java.util.List getParamsOrBuilderList() { return params_; } /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ @java.lang.Override public int getParamsCount() { return params_.size(); } /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ @java.lang.Override public com.google.api.expr.v1alpha1.Type getParams(int index) { return params_.get(index); } /** *
       * List of function parameter [Type][google.api.expr.v1alpha1.Type]
       * values.
       * Param types are disjoint after generic type parameters have been
       * replaced with the type `DYN`. Since the `DYN` type is compatible with
       * any other type, this means that if `A` is a type parameter, the
       * function types `int<A>` and `int<int>` are not disjoint. Likewise,
       * `map<string, string>` is not disjoint from `map<K, V>`.
       * When the `result_type` of a function is a generic type param, the
       * type param name also appears as the `type` of on at least one params.
       * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ @java.lang.Override public com.google.api.expr.v1alpha1.TypeOrBuilder getParamsOrBuilder( int index) { return params_.get(index); } public static final int TYPE_PARAMS_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList typeParams_; /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @return A list containing the typeParams. */ public com.google.protobuf.ProtocolStringList getTypeParamsList() { return typeParams_; } /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @return The count of typeParams. */ public int getTypeParamsCount() { return typeParams_.size(); } /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @param index The index of the element to return. * @return The typeParams at the given index. */ public java.lang.String getTypeParams(int index) { return typeParams_.get(index); } /** *
       * The type param names associated with the function declaration.
       * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
       * the type params of `K, V`.
       * 
* * repeated string type_params = 3; * @param index The index of the value to return. * @return The bytes of the typeParams at the given index. */ public com.google.protobuf.ByteString getTypeParamsBytes(int index) { return typeParams_.getByteString(index); } public static final int RESULT_TYPE_FIELD_NUMBER = 4; private com.google.api.expr.v1alpha1.Type resultType_; /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return Whether the resultType field is set. */ @java.lang.Override public boolean hasResultType() { return resultType_ != null; } /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return The resultType. */ @java.lang.Override public com.google.api.expr.v1alpha1.Type getResultType() { return resultType_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : resultType_; } /** *
       * Required. The result type of the function. For example, the operator
       * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
       * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ @java.lang.Override public com.google.api.expr.v1alpha1.TypeOrBuilder getResultTypeOrBuilder() { return getResultType(); } public static final int IS_INSTANCE_FUNCTION_FIELD_NUMBER = 5; private boolean isInstanceFunction_; /** *
       * Whether the function is to be used in a method call-style `x.f(...)`
       * or a function call-style `f(x, ...)`.
       * For methods, the first parameter declaration, `params[0]` is the
       * expected type of the target receiver.
       * 
* * bool is_instance_function = 5; * @return The isInstanceFunction. */ @java.lang.Override public boolean getIsInstanceFunction() { return isInstanceFunction_; } public static final int DOC_FIELD_NUMBER = 6; private volatile java.lang.Object doc_; /** *
       * Documentation string for the overload.
       * 
* * string doc = 6; * @return The doc. */ @java.lang.Override public java.lang.String getDoc() { java.lang.Object ref = doc_; 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(); doc_ = s; return s; } } /** *
       * Documentation string for the overload.
       * 
* * string doc = 6; * @return The bytes for doc. */ @java.lang.Override public com.google.protobuf.ByteString getDocBytes() { java.lang.Object ref = doc_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); doc_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(overloadId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, overloadId_); } for (int i = 0; i < params_.size(); i++) { output.writeMessage(2, params_.get(i)); } for (int i = 0; i < typeParams_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, typeParams_.getRaw(i)); } if (resultType_ != null) { output.writeMessage(4, getResultType()); } if (isInstanceFunction_ != false) { output.writeBool(5, isInstanceFunction_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doc_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, doc_); } 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(overloadId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, overloadId_); } for (int i = 0; i < params_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, params_.get(i)); } { int dataSize = 0; for (int i = 0; i < typeParams_.size(); i++) { dataSize += computeStringSizeNoTag(typeParams_.getRaw(i)); } size += dataSize; size += 1 * getTypeParamsList().size(); } if (resultType_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getResultType()); } if (isInstanceFunction_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, isInstanceFunction_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doc_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, doc_); } 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.Decl.FunctionDecl.Overload)) { return super.equals(obj); } com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload other = (com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) obj; if (!getOverloadId() .equals(other.getOverloadId())) return false; if (!getParamsList() .equals(other.getParamsList())) return false; if (!getTypeParamsList() .equals(other.getTypeParamsList())) return false; if (hasResultType() != other.hasResultType()) return false; if (hasResultType()) { if (!getResultType() .equals(other.getResultType())) return false; } if (getIsInstanceFunction() != other.getIsInstanceFunction()) return false; if (!getDoc() .equals(other.getDoc())) 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) + OVERLOAD_ID_FIELD_NUMBER; hash = (53 * hash) + getOverloadId().hashCode(); if (getParamsCount() > 0) { hash = (37 * hash) + PARAMS_FIELD_NUMBER; hash = (53 * hash) + getParamsList().hashCode(); } if (getTypeParamsCount() > 0) { hash = (37 * hash) + TYPE_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getTypeParamsList().hashCode(); } if (hasResultType()) { hash = (37 * hash) + RESULT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getResultType().hashCode(); } hash = (37 * hash) + IS_INSTANCE_FUNCTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsInstanceFunction()); hash = (37 * hash) + DOC_FIELD_NUMBER; hash = (53 * hash) + getDoc().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload 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.Decl.FunctionDecl.Overload 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 overload indicates a function's parameter types and return type, and
       * may optionally include a function body described in terms of
       * [Expr][google.api.expr.v1alpha1.Expr] values.
       * Functions overloads are declared in either a function or method
       * call-style. For methods, the `params[0]` is the expected type of the
       * target receiver.
       * Overloads must have non-overlapping argument types after erasure of all
       * parameterized type variables (similar as type erasure in Java).
       * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.class, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder.class); } // Construct using com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getParamsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); overloadId_ = ""; if (paramsBuilder_ == null) { params_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { paramsBuilder_.clear(); } typeParams_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (resultTypeBuilder_ == null) { resultType_ = null; } else { resultType_ = null; resultTypeBuilder_ = null; } isInstanceFunction_ = false; doc_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_descriptor; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload getDefaultInstanceForType() { return com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.getDefaultInstance(); } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload build() { com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload buildPartial() { com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload result = new com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload(this); int from_bitField0_ = bitField0_; result.overloadId_ = overloadId_; if (paramsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { params_ = java.util.Collections.unmodifiableList(params_); bitField0_ = (bitField0_ & ~0x00000001); } result.params_ = params_; } else { result.params_ = paramsBuilder_.build(); } if (((bitField0_ & 0x00000002) != 0)) { typeParams_ = typeParams_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.typeParams_ = typeParams_; if (resultTypeBuilder_ == null) { result.resultType_ = resultType_; } else { result.resultType_ = resultTypeBuilder_.build(); } result.isInstanceFunction_ = isInstanceFunction_; result.doc_ = doc_; 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.Decl.FunctionDecl.Overload) { return mergeFrom((com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload other) { if (other == com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.getDefaultInstance()) return this; if (!other.getOverloadId().isEmpty()) { overloadId_ = other.overloadId_; onChanged(); } if (paramsBuilder_ == null) { if (!other.params_.isEmpty()) { if (params_.isEmpty()) { params_ = other.params_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureParamsIsMutable(); params_.addAll(other.params_); } onChanged(); } } else { if (!other.params_.isEmpty()) { if (paramsBuilder_.isEmpty()) { paramsBuilder_.dispose(); paramsBuilder_ = null; params_ = other.params_; bitField0_ = (bitField0_ & ~0x00000001); paramsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getParamsFieldBuilder() : null; } else { paramsBuilder_.addAllMessages(other.params_); } } } if (!other.typeParams_.isEmpty()) { if (typeParams_.isEmpty()) { typeParams_ = other.typeParams_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTypeParamsIsMutable(); typeParams_.addAll(other.typeParams_); } onChanged(); } if (other.hasResultType()) { mergeResultType(other.getResultType()); } if (other.getIsInstanceFunction() != false) { setIsInstanceFunction(other.getIsInstanceFunction()); } if (!other.getDoc().isEmpty()) { doc_ = other.doc_; onChanged(); } 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.Decl.FunctionDecl.Overload parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object overloadId_ = ""; /** *
         * Required. Globally unique overload name of the function which reflects
         * the function name and argument types.
         * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
         * to indicate the `overload_id` that was resolved for the function
         * `name`.
         * 
* * string overload_id = 1; * @return The overloadId. */ public java.lang.String getOverloadId() { java.lang.Object ref = overloadId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); overloadId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Required. Globally unique overload name of the function which reflects
         * the function name and argument types.
         * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
         * to indicate the `overload_id` that was resolved for the function
         * `name`.
         * 
* * string overload_id = 1; * @return The bytes for overloadId. */ public com.google.protobuf.ByteString getOverloadIdBytes() { java.lang.Object ref = overloadId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); overloadId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Required. Globally unique overload name of the function which reflects
         * the function name and argument types.
         * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
         * to indicate the `overload_id` that was resolved for the function
         * `name`.
         * 
* * string overload_id = 1; * @param value The overloadId to set. * @return This builder for chaining. */ public Builder setOverloadId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } overloadId_ = value; onChanged(); return this; } /** *
         * Required. Globally unique overload name of the function which reflects
         * the function name and argument types.
         * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
         * to indicate the `overload_id` that was resolved for the function
         * `name`.
         * 
* * string overload_id = 1; * @return This builder for chaining. */ public Builder clearOverloadId() { overloadId_ = getDefaultInstance().getOverloadId(); onChanged(); return this; } /** *
         * Required. Globally unique overload name of the function which reflects
         * the function name and argument types.
         * This will be used by a [Reference][google.api.expr.v1alpha1.Reference]
         * to indicate the `overload_id` that was resolved for the function
         * `name`.
         * 
* * string overload_id = 1; * @param value The bytes for overloadId to set. * @return This builder for chaining. */ public Builder setOverloadIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); overloadId_ = value; onChanged(); return this; } private java.util.List params_ = java.util.Collections.emptyList(); private void ensureParamsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { params_ = new java.util.ArrayList(params_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> paramsBuilder_; /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public java.util.List getParamsList() { if (paramsBuilder_ == null) { return java.util.Collections.unmodifiableList(params_); } else { return paramsBuilder_.getMessageList(); } } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public int getParamsCount() { if (paramsBuilder_ == null) { return params_.size(); } else { return paramsBuilder_.getCount(); } } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public com.google.api.expr.v1alpha1.Type getParams(int index) { if (paramsBuilder_ == null) { return params_.get(index); } else { return paramsBuilder_.getMessage(index); } } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder setParams( int index, com.google.api.expr.v1alpha1.Type value) { if (paramsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureParamsIsMutable(); params_.set(index, value); onChanged(); } else { paramsBuilder_.setMessage(index, value); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder setParams( int index, com.google.api.expr.v1alpha1.Type.Builder builderForValue) { if (paramsBuilder_ == null) { ensureParamsIsMutable(); params_.set(index, builderForValue.build()); onChanged(); } else { paramsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder addParams(com.google.api.expr.v1alpha1.Type value) { if (paramsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureParamsIsMutable(); params_.add(value); onChanged(); } else { paramsBuilder_.addMessage(value); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder addParams( int index, com.google.api.expr.v1alpha1.Type value) { if (paramsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureParamsIsMutable(); params_.add(index, value); onChanged(); } else { paramsBuilder_.addMessage(index, value); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder addParams( com.google.api.expr.v1alpha1.Type.Builder builderForValue) { if (paramsBuilder_ == null) { ensureParamsIsMutable(); params_.add(builderForValue.build()); onChanged(); } else { paramsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder addParams( int index, com.google.api.expr.v1alpha1.Type.Builder builderForValue) { if (paramsBuilder_ == null) { ensureParamsIsMutable(); params_.add(index, builderForValue.build()); onChanged(); } else { paramsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder addAllParams( java.lang.Iterable values) { if (paramsBuilder_ == null) { ensureParamsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, params_); onChanged(); } else { paramsBuilder_.addAllMessages(values); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder clearParams() { if (paramsBuilder_ == null) { params_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { paramsBuilder_.clear(); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public Builder removeParams(int index) { if (paramsBuilder_ == null) { ensureParamsIsMutable(); params_.remove(index); onChanged(); } else { paramsBuilder_.remove(index); } return this; } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public com.google.api.expr.v1alpha1.Type.Builder getParamsBuilder( int index) { return getParamsFieldBuilder().getBuilder(index); } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public com.google.api.expr.v1alpha1.TypeOrBuilder getParamsOrBuilder( int index) { if (paramsBuilder_ == null) { return params_.get(index); } else { return paramsBuilder_.getMessageOrBuilder(index); } } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public java.util.List getParamsOrBuilderList() { if (paramsBuilder_ != null) { return paramsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(params_); } } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public com.google.api.expr.v1alpha1.Type.Builder addParamsBuilder() { return getParamsFieldBuilder().addBuilder( com.google.api.expr.v1alpha1.Type.getDefaultInstance()); } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public com.google.api.expr.v1alpha1.Type.Builder addParamsBuilder( int index) { return getParamsFieldBuilder().addBuilder( index, com.google.api.expr.v1alpha1.Type.getDefaultInstance()); } /** *
         * List of function parameter [Type][google.api.expr.v1alpha1.Type]
         * values.
         * Param types are disjoint after generic type parameters have been
         * replaced with the type `DYN`. Since the `DYN` type is compatible with
         * any other type, this means that if `A` is a type parameter, the
         * function types `int<A>` and `int<int>` are not disjoint. Likewise,
         * `map<string, string>` is not disjoint from `map<K, V>`.
         * When the `result_type` of a function is a generic type param, the
         * type param name also appears as the `type` of on at least one params.
         * 
* * repeated .google.api.expr.v1alpha1.Type params = 2; */ public java.util.List getParamsBuilderList() { return getParamsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> getParamsFieldBuilder() { if (paramsBuilder_ == null) { paramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder>( params_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); params_ = null; } return paramsBuilder_; } private com.google.protobuf.LazyStringList typeParams_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureTypeParamsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { typeParams_ = new com.google.protobuf.LazyStringArrayList(typeParams_); bitField0_ |= 0x00000002; } } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @return A list containing the typeParams. */ public com.google.protobuf.ProtocolStringList getTypeParamsList() { return typeParams_.getUnmodifiableView(); } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @return The count of typeParams. */ public int getTypeParamsCount() { return typeParams_.size(); } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param index The index of the element to return. * @return The typeParams at the given index. */ public java.lang.String getTypeParams(int index) { return typeParams_.get(index); } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param index The index of the value to return. * @return The bytes of the typeParams at the given index. */ public com.google.protobuf.ByteString getTypeParamsBytes(int index) { return typeParams_.getByteString(index); } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param index The index to set the value at. * @param value The typeParams to set. * @return This builder for chaining. */ public Builder setTypeParams( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTypeParamsIsMutable(); typeParams_.set(index, value); onChanged(); return this; } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param value The typeParams to add. * @return This builder for chaining. */ public Builder addTypeParams( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTypeParamsIsMutable(); typeParams_.add(value); onChanged(); return this; } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param values The typeParams to add. * @return This builder for chaining. */ public Builder addAllTypeParams( java.lang.Iterable values) { ensureTypeParamsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, typeParams_); onChanged(); return this; } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @return This builder for chaining. */ public Builder clearTypeParams() { typeParams_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
         * The type param names associated with the function declaration.
         * For example, `function ex<K,V>(K key, map<K, V> map) : V` would yield
         * the type params of `K, V`.
         * 
* * repeated string type_params = 3; * @param value The bytes of the typeParams to add. * @return This builder for chaining. */ public Builder addTypeParamsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureTypeParamsIsMutable(); typeParams_.add(value); onChanged(); return this; } private com.google.api.expr.v1alpha1.Type resultType_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> resultTypeBuilder_; /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return Whether the resultType field is set. */ public boolean hasResultType() { return resultTypeBuilder_ != null || resultType_ != null; } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; * @return The resultType. */ public com.google.api.expr.v1alpha1.Type getResultType() { if (resultTypeBuilder_ == null) { return resultType_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : resultType_; } else { return resultTypeBuilder_.getMessage(); } } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public Builder setResultType(com.google.api.expr.v1alpha1.Type value) { if (resultTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resultType_ = value; onChanged(); } else { resultTypeBuilder_.setMessage(value); } return this; } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public Builder setResultType( com.google.api.expr.v1alpha1.Type.Builder builderForValue) { if (resultTypeBuilder_ == null) { resultType_ = builderForValue.build(); onChanged(); } else { resultTypeBuilder_.setMessage(builderForValue.build()); } return this; } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public Builder mergeResultType(com.google.api.expr.v1alpha1.Type value) { if (resultTypeBuilder_ == null) { if (resultType_ != null) { resultType_ = com.google.api.expr.v1alpha1.Type.newBuilder(resultType_).mergeFrom(value).buildPartial(); } else { resultType_ = value; } onChanged(); } else { resultTypeBuilder_.mergeFrom(value); } return this; } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public Builder clearResultType() { if (resultTypeBuilder_ == null) { resultType_ = null; onChanged(); } else { resultType_ = null; resultTypeBuilder_ = null; } return this; } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public com.google.api.expr.v1alpha1.Type.Builder getResultTypeBuilder() { onChanged(); return getResultTypeFieldBuilder().getBuilder(); } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ public com.google.api.expr.v1alpha1.TypeOrBuilder getResultTypeOrBuilder() { if (resultTypeBuilder_ != null) { return resultTypeBuilder_.getMessageOrBuilder(); } else { return resultType_ == null ? com.google.api.expr.v1alpha1.Type.getDefaultInstance() : resultType_; } } /** *
         * Required. The result type of the function. For example, the operator
         * `string.isEmpty()` would have `result_type` of `kind: BOOL`.
         * 
* * .google.api.expr.v1alpha1.Type result_type = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder> getResultTypeFieldBuilder() { if (resultTypeBuilder_ == null) { resultTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Type, com.google.api.expr.v1alpha1.Type.Builder, com.google.api.expr.v1alpha1.TypeOrBuilder>( getResultType(), getParentForChildren(), isClean()); resultType_ = null; } return resultTypeBuilder_; } private boolean isInstanceFunction_ ; /** *
         * Whether the function is to be used in a method call-style `x.f(...)`
         * or a function call-style `f(x, ...)`.
         * For methods, the first parameter declaration, `params[0]` is the
         * expected type of the target receiver.
         * 
* * bool is_instance_function = 5; * @return The isInstanceFunction. */ @java.lang.Override public boolean getIsInstanceFunction() { return isInstanceFunction_; } /** *
         * Whether the function is to be used in a method call-style `x.f(...)`
         * or a function call-style `f(x, ...)`.
         * For methods, the first parameter declaration, `params[0]` is the
         * expected type of the target receiver.
         * 
* * bool is_instance_function = 5; * @param value The isInstanceFunction to set. * @return This builder for chaining. */ public Builder setIsInstanceFunction(boolean value) { isInstanceFunction_ = value; onChanged(); return this; } /** *
         * Whether the function is to be used in a method call-style `x.f(...)`
         * or a function call-style `f(x, ...)`.
         * For methods, the first parameter declaration, `params[0]` is the
         * expected type of the target receiver.
         * 
* * bool is_instance_function = 5; * @return This builder for chaining. */ public Builder clearIsInstanceFunction() { isInstanceFunction_ = false; onChanged(); return this; } private java.lang.Object doc_ = ""; /** *
         * Documentation string for the overload.
         * 
* * string doc = 6; * @return The doc. */ public java.lang.String getDoc() { java.lang.Object ref = doc_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); doc_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Documentation string for the overload.
         * 
* * string doc = 6; * @return The bytes for doc. */ public com.google.protobuf.ByteString getDocBytes() { java.lang.Object ref = doc_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); doc_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Documentation string for the overload.
         * 
* * string doc = 6; * @param value The doc to set. * @return This builder for chaining. */ public Builder setDoc( java.lang.String value) { if (value == null) { throw new NullPointerException(); } doc_ = value; onChanged(); return this; } /** *
         * Documentation string for the overload.
         * 
* * string doc = 6; * @return This builder for chaining. */ public Builder clearDoc() { doc_ = getDefaultInstance().getDoc(); onChanged(); return this; } /** *
         * Documentation string for the overload.
         * 
* * string doc = 6; * @param value The bytes for doc to set. * @return This builder for chaining. */ public Builder setDocBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); doc_ = value; onChanged(); 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.Decl.FunctionDecl.Overload) } // @@protoc_insertion_point(class_scope:google.api.expr.v1alpha1.Decl.FunctionDecl.Overload) private static final com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload(); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Overload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Overload(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.Decl.FunctionDecl.Overload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int OVERLOADS_FIELD_NUMBER = 1; private java.util.List overloads_; /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ @java.lang.Override public java.util.List getOverloadsList() { return overloads_; } /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ @java.lang.Override public java.util.List getOverloadsOrBuilderList() { return overloads_; } /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ @java.lang.Override public int getOverloadsCount() { return overloads_.size(); } /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload getOverloads(int index) { return overloads_.get(index); } /** *
     * Required. List of function overloads, must contain at least one overload.
     * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder getOverloadsOrBuilder( int index) { return overloads_.get(index); } 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 { for (int i = 0; i < overloads_.size(); i++) { output.writeMessage(1, overloads_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < overloads_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, overloads_.get(i)); } 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.Decl.FunctionDecl)) { return super.equals(obj); } com.google.api.expr.v1alpha1.Decl.FunctionDecl other = (com.google.api.expr.v1alpha1.Decl.FunctionDecl) obj; if (!getOverloadsList() .equals(other.getOverloadsList())) 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(); if (getOverloadsCount() > 0) { hash = (37 * hash) + OVERLOADS_FIELD_NUMBER; hash = (53 * hash) + getOverloadsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl 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.Decl.FunctionDecl parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl 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.Decl.FunctionDecl parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl 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.Decl.FunctionDecl parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl 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.Decl.FunctionDecl parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl 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.Decl.FunctionDecl 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.Decl.FunctionDecl 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.Decl.FunctionDecl 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; } /** *
     * Function declaration specifies one or more overloads which indicate the
     * function's parameter types and return type.
     * Functions have no observable side-effects (there may be side-effects like
     * logging which are not observable from CEL).
     * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl.FunctionDecl} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.Decl.FunctionDecl) com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.FunctionDecl.class, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder.class); } // Construct using com.google.api.expr.v1alpha1.Decl.FunctionDecl.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getOverloadsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (overloadsBuilder_ == null) { overloads_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { overloadsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_FunctionDecl_descriptor; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl getDefaultInstanceForType() { return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl build() { com.google.api.expr.v1alpha1.Decl.FunctionDecl result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl buildPartial() { com.google.api.expr.v1alpha1.Decl.FunctionDecl result = new com.google.api.expr.v1alpha1.Decl.FunctionDecl(this); int from_bitField0_ = bitField0_; if (overloadsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { overloads_ = java.util.Collections.unmodifiableList(overloads_); bitField0_ = (bitField0_ & ~0x00000001); } result.overloads_ = overloads_; } else { result.overloads_ = overloadsBuilder_.build(); } 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.Decl.FunctionDecl) { return mergeFrom((com.google.api.expr.v1alpha1.Decl.FunctionDecl)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.expr.v1alpha1.Decl.FunctionDecl other) { if (other == com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance()) return this; if (overloadsBuilder_ == null) { if (!other.overloads_.isEmpty()) { if (overloads_.isEmpty()) { overloads_ = other.overloads_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureOverloadsIsMutable(); overloads_.addAll(other.overloads_); } onChanged(); } } else { if (!other.overloads_.isEmpty()) { if (overloadsBuilder_.isEmpty()) { overloadsBuilder_.dispose(); overloadsBuilder_ = null; overloads_ = other.overloads_; bitField0_ = (bitField0_ & ~0x00000001); overloadsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOverloadsFieldBuilder() : null; } else { overloadsBuilder_.addAllMessages(other.overloads_); } } } 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.Decl.FunctionDecl parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.expr.v1alpha1.Decl.FunctionDecl) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List overloads_ = java.util.Collections.emptyList(); private void ensureOverloadsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { overloads_ = new java.util.ArrayList(overloads_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder> overloadsBuilder_; /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public java.util.List getOverloadsList() { if (overloadsBuilder_ == null) { return java.util.Collections.unmodifiableList(overloads_); } else { return overloadsBuilder_.getMessageList(); } } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public int getOverloadsCount() { if (overloadsBuilder_ == null) { return overloads_.size(); } else { return overloadsBuilder_.getCount(); } } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload getOverloads(int index) { if (overloadsBuilder_ == null) { return overloads_.get(index); } else { return overloadsBuilder_.getMessage(index); } } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder setOverloads( int index, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload value) { if (overloadsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOverloadsIsMutable(); overloads_.set(index, value); onChanged(); } else { overloadsBuilder_.setMessage(index, value); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder setOverloads( int index, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder builderForValue) { if (overloadsBuilder_ == null) { ensureOverloadsIsMutable(); overloads_.set(index, builderForValue.build()); onChanged(); } else { overloadsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder addOverloads(com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload value) { if (overloadsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOverloadsIsMutable(); overloads_.add(value); onChanged(); } else { overloadsBuilder_.addMessage(value); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder addOverloads( int index, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload value) { if (overloadsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOverloadsIsMutable(); overloads_.add(index, value); onChanged(); } else { overloadsBuilder_.addMessage(index, value); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder addOverloads( com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder builderForValue) { if (overloadsBuilder_ == null) { ensureOverloadsIsMutable(); overloads_.add(builderForValue.build()); onChanged(); } else { overloadsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder addOverloads( int index, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder builderForValue) { if (overloadsBuilder_ == null) { ensureOverloadsIsMutable(); overloads_.add(index, builderForValue.build()); onChanged(); } else { overloadsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder addAllOverloads( java.lang.Iterable values) { if (overloadsBuilder_ == null) { ensureOverloadsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, overloads_); onChanged(); } else { overloadsBuilder_.addAllMessages(values); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder clearOverloads() { if (overloadsBuilder_ == null) { overloads_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { overloadsBuilder_.clear(); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public Builder removeOverloads(int index) { if (overloadsBuilder_ == null) { ensureOverloadsIsMutable(); overloads_.remove(index); onChanged(); } else { overloadsBuilder_.remove(index); } return this; } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder getOverloadsBuilder( int index) { return getOverloadsFieldBuilder().getBuilder(index); } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder getOverloadsOrBuilder( int index) { if (overloadsBuilder_ == null) { return overloads_.get(index); } else { return overloadsBuilder_.getMessageOrBuilder(index); } } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public java.util.List getOverloadsOrBuilderList() { if (overloadsBuilder_ != null) { return overloadsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(overloads_); } } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder addOverloadsBuilder() { return getOverloadsFieldBuilder().addBuilder( com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.getDefaultInstance()); } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder addOverloadsBuilder( int index) { return getOverloadsFieldBuilder().addBuilder( index, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.getDefaultInstance()); } /** *
       * Required. List of function overloads, must contain at least one overload.
       * 
* * repeated .google.api.expr.v1alpha1.Decl.FunctionDecl.Overload overloads = 1; */ public java.util.List getOverloadsBuilderList() { return getOverloadsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder> getOverloadsFieldBuilder() { if (overloadsBuilder_ == null) { overloadsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDecl.OverloadOrBuilder>( overloads_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); overloads_ = null; } return overloadsBuilder_; } @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.Decl.FunctionDecl) } // @@protoc_insertion_point(class_scope:google.api.expr.v1alpha1.Decl.FunctionDecl) private static final com.google.api.expr.v1alpha1.Decl.FunctionDecl DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.expr.v1alpha1.Decl.FunctionDecl(); } public static com.google.api.expr.v1alpha1.Decl.FunctionDecl getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FunctionDecl parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new FunctionDecl(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.Decl.FunctionDecl getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int declKindCase_ = 0; private java.lang.Object declKind_; public enum DeclKindCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { IDENT(2), FUNCTION(3), DECLKIND_NOT_SET(0); private final int value; private DeclKindCase(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 DeclKindCase valueOf(int value) { return forNumber(value); } public static DeclKindCase forNumber(int value) { switch (value) { case 2: return IDENT; case 3: return FUNCTION; case 0: return DECLKIND_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public DeclKindCase getDeclKindCase() { return DeclKindCase.forNumber( declKindCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
   * The fully qualified name of the declaration.
   * Declarations are organized in containers and this represents the full path
   * to the declaration in its container, as in `google.api.expr.Decl`.
   * Declarations used as
   * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
   * parameters may or may not have a name depending on whether the overload is
   * function declaration or a function definition containing a result
   * [Expr][google.api.expr.v1alpha1.Expr].
   * 
* * string name = 1; * @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; } } /** *
   * The fully qualified name of the declaration.
   * Declarations are organized in containers and this represents the full path
   * to the declaration in its container, as in `google.api.expr.Decl`.
   * Declarations used as
   * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
   * parameters may or may not have a name depending on whether the overload is
   * function declaration or a function definition containing a result
   * [Expr][google.api.expr.v1alpha1.Expr].
   * 
* * string name = 1; * @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 IDENT_FIELD_NUMBER = 2; /** *
   * Identifier declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; * @return Whether the ident field is set. */ @java.lang.Override public boolean hasIdent() { return declKindCase_ == 2; } /** *
   * Identifier declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; * @return The ident. */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDecl getIdent() { if (declKindCase_ == 2) { return (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } /** *
   * Identifier declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder getIdentOrBuilder() { if (declKindCase_ == 2) { return (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } public static final int FUNCTION_FIELD_NUMBER = 3; /** *
   * Function declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; * @return Whether the function field is set. */ @java.lang.Override public boolean hasFunction() { return declKindCase_ == 3; } /** *
   * Function declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; * @return The function. */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl getFunction() { if (declKindCase_ == 3) { return (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } /** *
   * Function declaration.
   * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder getFunctionOrBuilder() { if (declKindCase_ == 3) { return (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (declKindCase_ == 2) { output.writeMessage(2, (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_); } if (declKindCase_ == 3) { output.writeMessage(3, (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_); } 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(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (declKindCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_); } if (declKindCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_); } 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.Decl)) { return super.equals(obj); } com.google.api.expr.v1alpha1.Decl other = (com.google.api.expr.v1alpha1.Decl) obj; if (!getName() .equals(other.getName())) return false; if (!getDeclKindCase().equals(other.getDeclKindCase())) return false; switch (declKindCase_) { case 2: if (!getIdent() .equals(other.getIdent())) return false; break; case 3: if (!getFunction() .equals(other.getFunction())) return false; break; case 0: default: } 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); switch (declKindCase_) { case 2: hash = (37 * hash) + IDENT_FIELD_NUMBER; hash = (53 * hash) + getIdent().hashCode(); break; case 3: hash = (37 * hash) + FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getFunction().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.expr.v1alpha1.Decl parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl 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.Decl parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl 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.Decl parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.expr.v1alpha1.Decl 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.Decl parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl 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.Decl parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.api.expr.v1alpha1.Decl 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.Decl 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.Decl 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.Decl 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; } /** *
   * Represents a declaration of a named value or function.
   * A declaration is part of the contract between the expression, the agent
   * evaluating that expression, and the caller requesting evaluation.
   * 
* * Protobuf type {@code google.api.expr.v1alpha1.Decl} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.expr.v1alpha1.Decl) com.google.api.expr.v1alpha1.DeclOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.expr.v1alpha1.Decl.class, com.google.api.expr.v1alpha1.Decl.Builder.class); } // Construct using com.google.api.expr.v1alpha1.Decl.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(); name_ = ""; declKindCase_ = 0; declKind_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.expr.v1alpha1.DeclProto.internal_static_google_api_expr_v1alpha1_Decl_descriptor; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl getDefaultInstanceForType() { return com.google.api.expr.v1alpha1.Decl.getDefaultInstance(); } @java.lang.Override public com.google.api.expr.v1alpha1.Decl build() { com.google.api.expr.v1alpha1.Decl result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.expr.v1alpha1.Decl buildPartial() { com.google.api.expr.v1alpha1.Decl result = new com.google.api.expr.v1alpha1.Decl(this); result.name_ = name_; if (declKindCase_ == 2) { if (identBuilder_ == null) { result.declKind_ = declKind_; } else { result.declKind_ = identBuilder_.build(); } } if (declKindCase_ == 3) { if (functionBuilder_ == null) { result.declKind_ = declKind_; } else { result.declKind_ = functionBuilder_.build(); } } result.declKindCase_ = declKindCase_; 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.Decl) { return mergeFrom((com.google.api.expr.v1alpha1.Decl)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.expr.v1alpha1.Decl other) { if (other == com.google.api.expr.v1alpha1.Decl.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } switch (other.getDeclKindCase()) { case IDENT: { mergeIdent(other.getIdent()); break; } case FUNCTION: { mergeFunction(other.getFunction()); break; } case DECLKIND_NOT_SET: { break; } } 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.Decl parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.api.expr.v1alpha1.Decl) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int declKindCase_ = 0; private java.lang.Object declKind_; public DeclKindCase getDeclKindCase() { return DeclKindCase.forNumber( declKindCase_); } public Builder clearDeclKind() { declKindCase_ = 0; declKind_ = null; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * The fully qualified name of the declaration.
     * Declarations are organized in containers and this represents the full path
     * to the declaration in its container, as in `google.api.expr.Decl`.
     * Declarations used as
     * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
     * parameters may or may not have a name depending on whether the overload is
     * function declaration or a function definition containing a result
     * [Expr][google.api.expr.v1alpha1.Expr].
     * 
* * string name = 1; * @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; } } /** *
     * The fully qualified name of the declaration.
     * Declarations are organized in containers and this represents the full path
     * to the declaration in its container, as in `google.api.expr.Decl`.
     * Declarations used as
     * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
     * parameters may or may not have a name depending on whether the overload is
     * function declaration or a function definition containing a result
     * [Expr][google.api.expr.v1alpha1.Expr].
     * 
* * string name = 1; * @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; } } /** *
     * The fully qualified name of the declaration.
     * Declarations are organized in containers and this represents the full path
     * to the declaration in its container, as in `google.api.expr.Decl`.
     * Declarations used as
     * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
     * parameters may or may not have a name depending on whether the overload is
     * function declaration or a function definition containing a result
     * [Expr][google.api.expr.v1alpha1.Expr].
     * 
* * string name = 1; * @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; onChanged(); return this; } /** *
     * The fully qualified name of the declaration.
     * Declarations are organized in containers and this represents the full path
     * to the declaration in its container, as in `google.api.expr.Decl`.
     * Declarations used as
     * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
     * parameters may or may not have a name depending on whether the overload is
     * function declaration or a function definition containing a result
     * [Expr][google.api.expr.v1alpha1.Expr].
     * 
* * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * The fully qualified name of the declaration.
     * Declarations are organized in containers and this represents the full path
     * to the declaration in its container, as in `google.api.expr.Decl`.
     * Declarations used as
     * [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload]
     * parameters may or may not have a name depending on whether the overload is
     * function declaration or a function definition containing a result
     * [Expr][google.api.expr.v1alpha1.Expr].
     * 
* * string name = 1; * @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; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.IdentDecl, com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder, com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder> identBuilder_; /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; * @return Whether the ident field is set. */ @java.lang.Override public boolean hasIdent() { return declKindCase_ == 2; } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; * @return The ident. */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDecl getIdent() { if (identBuilder_ == null) { if (declKindCase_ == 2) { return (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } else { if (declKindCase_ == 2) { return identBuilder_.getMessage(); } return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ public Builder setIdent(com.google.api.expr.v1alpha1.Decl.IdentDecl value) { if (identBuilder_ == null) { if (value == null) { throw new NullPointerException(); } declKind_ = value; onChanged(); } else { identBuilder_.setMessage(value); } declKindCase_ = 2; return this; } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ public Builder setIdent( com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder builderForValue) { if (identBuilder_ == null) { declKind_ = builderForValue.build(); onChanged(); } else { identBuilder_.setMessage(builderForValue.build()); } declKindCase_ = 2; return this; } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ public Builder mergeIdent(com.google.api.expr.v1alpha1.Decl.IdentDecl value) { if (identBuilder_ == null) { if (declKindCase_ == 2 && declKind_ != com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance()) { declKind_ = com.google.api.expr.v1alpha1.Decl.IdentDecl.newBuilder((com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_) .mergeFrom(value).buildPartial(); } else { declKind_ = value; } onChanged(); } else { if (declKindCase_ == 2) { identBuilder_.mergeFrom(value); } else { identBuilder_.setMessage(value); } } declKindCase_ = 2; return this; } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ public Builder clearIdent() { if (identBuilder_ == null) { if (declKindCase_ == 2) { declKindCase_ = 0; declKind_ = null; onChanged(); } } else { if (declKindCase_ == 2) { declKindCase_ = 0; declKind_ = null; } identBuilder_.clear(); } return this; } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ public com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder getIdentBuilder() { return getIdentFieldBuilder().getBuilder(); } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder getIdentOrBuilder() { if ((declKindCase_ == 2) && (identBuilder_ != null)) { return identBuilder_.getMessageOrBuilder(); } else { if (declKindCase_ == 2) { return (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } } /** *
     * Identifier declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.IdentDecl ident = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.IdentDecl, com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder, com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder> getIdentFieldBuilder() { if (identBuilder_ == null) { if (!(declKindCase_ == 2)) { declKind_ = com.google.api.expr.v1alpha1.Decl.IdentDecl.getDefaultInstance(); } identBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.IdentDecl, com.google.api.expr.v1alpha1.Decl.IdentDecl.Builder, com.google.api.expr.v1alpha1.Decl.IdentDeclOrBuilder>( (com.google.api.expr.v1alpha1.Decl.IdentDecl) declKind_, getParentForChildren(), isClean()); declKind_ = null; } declKindCase_ = 2; onChanged();; return identBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder> functionBuilder_; /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; * @return Whether the function field is set. */ @java.lang.Override public boolean hasFunction() { return declKindCase_ == 3; } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; * @return The function. */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDecl getFunction() { if (functionBuilder_ == null) { if (declKindCase_ == 3) { return (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } else { if (declKindCase_ == 3) { return functionBuilder_.getMessage(); } return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ public Builder setFunction(com.google.api.expr.v1alpha1.Decl.FunctionDecl value) { if (functionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } declKind_ = value; onChanged(); } else { functionBuilder_.setMessage(value); } declKindCase_ = 3; return this; } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ public Builder setFunction( com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder builderForValue) { if (functionBuilder_ == null) { declKind_ = builderForValue.build(); onChanged(); } else { functionBuilder_.setMessage(builderForValue.build()); } declKindCase_ = 3; return this; } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ public Builder mergeFunction(com.google.api.expr.v1alpha1.Decl.FunctionDecl value) { if (functionBuilder_ == null) { if (declKindCase_ == 3 && declKind_ != com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance()) { declKind_ = com.google.api.expr.v1alpha1.Decl.FunctionDecl.newBuilder((com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_) .mergeFrom(value).buildPartial(); } else { declKind_ = value; } onChanged(); } else { if (declKindCase_ == 3) { functionBuilder_.mergeFrom(value); } else { functionBuilder_.setMessage(value); } } declKindCase_ = 3; return this; } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ public Builder clearFunction() { if (functionBuilder_ == null) { if (declKindCase_ == 3) { declKindCase_ = 0; declKind_ = null; onChanged(); } } else { if (declKindCase_ == 3) { declKindCase_ = 0; declKind_ = null; } functionBuilder_.clear(); } return this; } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ public com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder getFunctionBuilder() { return getFunctionFieldBuilder().getBuilder(); } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ @java.lang.Override public com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder getFunctionOrBuilder() { if ((declKindCase_ == 3) && (functionBuilder_ != null)) { return functionBuilder_.getMessageOrBuilder(); } else { if (declKindCase_ == 3) { return (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_; } return com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } } /** *
     * Function declaration.
     * 
* * .google.api.expr.v1alpha1.Decl.FunctionDecl function = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder> getFunctionFieldBuilder() { if (functionBuilder_ == null) { if (!(declKindCase_ == 3)) { declKind_ = com.google.api.expr.v1alpha1.Decl.FunctionDecl.getDefaultInstance(); } functionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.expr.v1alpha1.Decl.FunctionDecl, com.google.api.expr.v1alpha1.Decl.FunctionDecl.Builder, com.google.api.expr.v1alpha1.Decl.FunctionDeclOrBuilder>( (com.google.api.expr.v1alpha1.Decl.FunctionDecl) declKind_, getParentForChildren(), isClean()); declKind_ = null; } declKindCase_ = 3; onChanged();; return functionBuilder_; } @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.Decl) } // @@protoc_insertion_point(class_scope:google.api.expr.v1alpha1.Decl) private static final com.google.api.expr.v1alpha1.Decl DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.expr.v1alpha1.Decl(); } public static com.google.api.expr.v1alpha1.Decl getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Decl parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Decl(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.Decl getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy