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

com.google.datastore.v1.GqlQuery Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/datastore/v1/query.proto

package com.google.datastore.v1;

/**
 * 
 * A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
 * 
* * Protobuf type {@code google.datastore.v1.GqlQuery} */ public final class GqlQuery extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.datastore.v1.GqlQuery) GqlQueryOrBuilder { // Use GqlQuery.newBuilder() to construct. private GqlQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GqlQuery() { queryString_ = ""; allowLiterals_ = false; positionalBindings_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private GqlQuery( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); queryString_ = s; break; } case 16: { allowLiterals_ = input.readBool(); break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { positionalBindings_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } positionalBindings_.add( input.readMessage(com.google.datastore.v1.GqlQueryParameter.parser(), extensionRegistry)); break; } case 42: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { namedBindings_ = com.google.protobuf.MapField.newMapField( NamedBindingsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000004; } com.google.protobuf.MapEntry namedBindings = input.readMessage( NamedBindingsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); namedBindings_.getMutableMap().put(namedBindings.getKey(), namedBindings.getValue()); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { positionalBindings_ = java.util.Collections.unmodifiableList(positionalBindings_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetNamedBindings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.GqlQuery.class, com.google.datastore.v1.GqlQuery.Builder.class); } private int bitField0_; public static final int QUERY_STRING_FIELD_NUMBER = 1; private volatile java.lang.Object queryString_; /** *
   * A string of the format described
   * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
   * 
* * optional string query_string = 1; */ public java.lang.String getQueryString() { java.lang.Object ref = queryString_; 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(); queryString_ = s; return s; } } /** *
   * A string of the format described
   * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
   * 
* * optional string query_string = 1; */ public com.google.protobuf.ByteString getQueryStringBytes() { java.lang.Object ref = queryString_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queryString_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ALLOW_LITERALS_FIELD_NUMBER = 2; private boolean allowLiterals_; /** *
   * When false, the query string must not contain any literals and instead must
   * bind all values. For example,
   * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
   * `SELECT * FROM Kind WHERE a = @value` is.
   * 
* * optional bool allow_literals = 2; */ public boolean getAllowLiterals() { return allowLiterals_; } public static final int NAMED_BINDINGS_FIELD_NUMBER = 5; private static final class NamedBindingsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.datastore.v1.GqlQueryParameter> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_NamedBindingsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.datastore.v1.GqlQueryParameter.getDefaultInstance()); } private com.google.protobuf.MapField< java.lang.String, com.google.datastore.v1.GqlQueryParameter> namedBindings_; private com.google.protobuf.MapField internalGetNamedBindings() { if (namedBindings_ == null) { return com.google.protobuf.MapField.emptyMapField( NamedBindingsDefaultEntryHolder.defaultEntry); } return namedBindings_; } public int getNamedBindingsCount() { return internalGetNamedBindings().getMap().size(); } /** *
   * For each non-reserved named binding site in the query string, there must be
   * a named parameter with that name, but not necessarily the inverse.
   * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
   * `__.*__`, and must not be `""`.
   * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public boolean containsNamedBindings( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetNamedBindings().getMap().containsKey(key); } /** * Use {@link #getNamedBindingsMap()} instead. */ @java.lang.Deprecated public java.util.Map getNamedBindings() { return getNamedBindingsMap(); } /** *
   * For each non-reserved named binding site in the query string, there must be
   * a named parameter with that name, but not necessarily the inverse.
   * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
   * `__.*__`, and must not be `""`.
   * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public java.util.Map getNamedBindingsMap() { return internalGetNamedBindings().getMap(); } /** *
   * For each non-reserved named binding site in the query string, there must be
   * a named parameter with that name, but not necessarily the inverse.
   * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
   * `__.*__`, and must not be `""`.
   * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public com.google.datastore.v1.GqlQueryParameter getNamedBindingsOrDefault( java.lang.String key, com.google.datastore.v1.GqlQueryParameter defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetNamedBindings().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * For each non-reserved named binding site in the query string, there must be
   * a named parameter with that name, but not necessarily the inverse.
   * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
   * `__.*__`, and must not be `""`.
   * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public com.google.datastore.v1.GqlQueryParameter getNamedBindingsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetNamedBindings().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int POSITIONAL_BINDINGS_FIELD_NUMBER = 4; private java.util.List positionalBindings_; /** *
   * Numbered binding site @1 references the first numbered parameter,
   * effectively using 1-based indexing, rather than the usual 0.
   * For each binding site numbered i in `query_string`, there must be an i-th
   * numbered parameter. The inverse must also be true.
   * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public java.util.List getPositionalBindingsList() { return positionalBindings_; } /** *
   * Numbered binding site @1 references the first numbered parameter,
   * effectively using 1-based indexing, rather than the usual 0.
   * For each binding site numbered i in `query_string`, there must be an i-th
   * numbered parameter. The inverse must also be true.
   * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public java.util.List getPositionalBindingsOrBuilderList() { return positionalBindings_; } /** *
   * Numbered binding site @1 references the first numbered parameter,
   * effectively using 1-based indexing, rather than the usual 0.
   * For each binding site numbered i in `query_string`, there must be an i-th
   * numbered parameter. The inverse must also be true.
   * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public int getPositionalBindingsCount() { return positionalBindings_.size(); } /** *
   * Numbered binding site @1 references the first numbered parameter,
   * effectively using 1-based indexing, rather than the usual 0.
   * For each binding site numbered i in `query_string`, there must be an i-th
   * numbered parameter. The inverse must also be true.
   * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameter getPositionalBindings(int index) { return positionalBindings_.get(index); } /** *
   * Numbered binding site @1 references the first numbered parameter,
   * effectively using 1-based indexing, rather than the usual 0.
   * For each binding site numbered i in `query_string`, there must be an i-th
   * numbered parameter. The inverse must also be true.
   * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameterOrBuilder getPositionalBindingsOrBuilder( int index) { return positionalBindings_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getQueryStringBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryString_); } if (allowLiterals_ != false) { output.writeBool(2, allowLiterals_); } for (int i = 0; i < positionalBindings_.size(); i++) { output.writeMessage(4, positionalBindings_.get(i)); } for (java.util.Map.Entry entry : internalGetNamedBindings().getMap().entrySet()) { com.google.protobuf.MapEntry namedBindings = NamedBindingsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); output.writeMessage(5, namedBindings); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getQueryStringBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryString_); } if (allowLiterals_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, allowLiterals_); } for (int i = 0; i < positionalBindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, positionalBindings_.get(i)); } for (java.util.Map.Entry entry : internalGetNamedBindings().getMap().entrySet()) { com.google.protobuf.MapEntry namedBindings = NamedBindingsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, namedBindings); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.GqlQuery)) { return super.equals(obj); } com.google.datastore.v1.GqlQuery other = (com.google.datastore.v1.GqlQuery) obj; boolean result = true; result = result && getQueryString() .equals(other.getQueryString()); result = result && (getAllowLiterals() == other.getAllowLiterals()); result = result && internalGetNamedBindings().equals( other.internalGetNamedBindings()); result = result && getPositionalBindingsList() .equals(other.getPositionalBindingsList()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + QUERY_STRING_FIELD_NUMBER; hash = (53 * hash) + getQueryString().hashCode(); hash = (37 * hash) + ALLOW_LITERALS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getAllowLiterals()); if (!internalGetNamedBindings().getMap().isEmpty()) { hash = (37 * hash) + NAMED_BINDINGS_FIELD_NUMBER; hash = (53 * hash) + internalGetNamedBindings().hashCode(); } if (getPositionalBindingsCount() > 0) { hash = (37 * hash) + POSITIONAL_BINDINGS_FIELD_NUMBER; hash = (53 * hash) + getPositionalBindingsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.datastore.v1.GqlQuery parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.GqlQuery 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.datastore.v1.GqlQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.datastore.v1.GqlQuery parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.datastore.v1.GqlQuery parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.GqlQuery 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.datastore.v1.GqlQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.datastore.v1.GqlQuery 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.datastore.v1.GqlQuery parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.datastore.v1.GqlQuery parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.datastore.v1.GqlQuery prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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; } /** *
   * A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
   * 
* * Protobuf type {@code google.datastore.v1.GqlQuery} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.datastore.v1.GqlQuery) com.google.datastore.v1.GqlQueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetNamedBindings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 5: return internalGetMutableNamedBindings(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.datastore.v1.GqlQuery.class, com.google.datastore.v1.GqlQuery.Builder.class); } // Construct using com.google.datastore.v1.GqlQuery.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPositionalBindingsFieldBuilder(); } } public Builder clear() { super.clear(); queryString_ = ""; allowLiterals_ = false; internalGetMutableNamedBindings().clear(); if (positionalBindingsBuilder_ == null) { positionalBindings_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { positionalBindingsBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.datastore.v1.QueryProto.internal_static_google_datastore_v1_GqlQuery_descriptor; } public com.google.datastore.v1.GqlQuery getDefaultInstanceForType() { return com.google.datastore.v1.GqlQuery.getDefaultInstance(); } public com.google.datastore.v1.GqlQuery build() { com.google.datastore.v1.GqlQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.datastore.v1.GqlQuery buildPartial() { com.google.datastore.v1.GqlQuery result = new com.google.datastore.v1.GqlQuery(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.queryString_ = queryString_; result.allowLiterals_ = allowLiterals_; result.namedBindings_ = internalGetNamedBindings(); result.namedBindings_.makeImmutable(); if (positionalBindingsBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { positionalBindings_ = java.util.Collections.unmodifiableList(positionalBindings_); bitField0_ = (bitField0_ & ~0x00000008); } result.positionalBindings_ = positionalBindings_; } else { result.positionalBindings_ = positionalBindingsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.datastore.v1.GqlQuery) { return mergeFrom((com.google.datastore.v1.GqlQuery)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.datastore.v1.GqlQuery other) { if (other == com.google.datastore.v1.GqlQuery.getDefaultInstance()) return this; if (!other.getQueryString().isEmpty()) { queryString_ = other.queryString_; onChanged(); } if (other.getAllowLiterals() != false) { setAllowLiterals(other.getAllowLiterals()); } internalGetMutableNamedBindings().mergeFrom( other.internalGetNamedBindings()); if (positionalBindingsBuilder_ == null) { if (!other.positionalBindings_.isEmpty()) { if (positionalBindings_.isEmpty()) { positionalBindings_ = other.positionalBindings_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensurePositionalBindingsIsMutable(); positionalBindings_.addAll(other.positionalBindings_); } onChanged(); } } else { if (!other.positionalBindings_.isEmpty()) { if (positionalBindingsBuilder_.isEmpty()) { positionalBindingsBuilder_.dispose(); positionalBindingsBuilder_ = null; positionalBindings_ = other.positionalBindings_; bitField0_ = (bitField0_ & ~0x00000008); positionalBindingsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPositionalBindingsFieldBuilder() : null; } else { positionalBindingsBuilder_.addAllMessages(other.positionalBindings_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.datastore.v1.GqlQuery parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.datastore.v1.GqlQuery) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object queryString_ = ""; /** *
     * A string of the format described
     * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
     * 
* * optional string query_string = 1; */ public java.lang.String getQueryString() { java.lang.Object ref = queryString_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queryString_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * A string of the format described
     * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
     * 
* * optional string query_string = 1; */ public com.google.protobuf.ByteString getQueryStringBytes() { java.lang.Object ref = queryString_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queryString_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * A string of the format described
     * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
     * 
* * optional string query_string = 1; */ public Builder setQueryString( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queryString_ = value; onChanged(); return this; } /** *
     * A string of the format described
     * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
     * 
* * optional string query_string = 1; */ public Builder clearQueryString() { queryString_ = getDefaultInstance().getQueryString(); onChanged(); return this; } /** *
     * A string of the format described
     * [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
     * 
* * optional string query_string = 1; */ public Builder setQueryStringBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queryString_ = value; onChanged(); return this; } private boolean allowLiterals_ ; /** *
     * When false, the query string must not contain any literals and instead must
     * bind all values. For example,
     * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
     * `SELECT * FROM Kind WHERE a = @value` is.
     * 
* * optional bool allow_literals = 2; */ public boolean getAllowLiterals() { return allowLiterals_; } /** *
     * When false, the query string must not contain any literals and instead must
     * bind all values. For example,
     * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
     * `SELECT * FROM Kind WHERE a = @value` is.
     * 
* * optional bool allow_literals = 2; */ public Builder setAllowLiterals(boolean value) { allowLiterals_ = value; onChanged(); return this; } /** *
     * When false, the query string must not contain any literals and instead must
     * bind all values. For example,
     * `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
     * `SELECT * FROM Kind WHERE a = @value` is.
     * 
* * optional bool allow_literals = 2; */ public Builder clearAllowLiterals() { allowLiterals_ = false; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, com.google.datastore.v1.GqlQueryParameter> namedBindings_; private com.google.protobuf.MapField internalGetNamedBindings() { if (namedBindings_ == null) { return com.google.protobuf.MapField.emptyMapField( NamedBindingsDefaultEntryHolder.defaultEntry); } return namedBindings_; } private com.google.protobuf.MapField internalGetMutableNamedBindings() { onChanged();; if (namedBindings_ == null) { namedBindings_ = com.google.protobuf.MapField.newMapField( NamedBindingsDefaultEntryHolder.defaultEntry); } if (!namedBindings_.isMutable()) { namedBindings_ = namedBindings_.copy(); } return namedBindings_; } public int getNamedBindingsCount() { return internalGetNamedBindings().getMap().size(); } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public boolean containsNamedBindings( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetNamedBindings().getMap().containsKey(key); } /** * Use {@link #getNamedBindingsMap()} instead. */ @java.lang.Deprecated public java.util.Map getNamedBindings() { return getNamedBindingsMap(); } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public java.util.Map getNamedBindingsMap() { return internalGetNamedBindings().getMap(); } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public com.google.datastore.v1.GqlQueryParameter getNamedBindingsOrDefault( java.lang.String key, com.google.datastore.v1.GqlQueryParameter defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetNamedBindings().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public com.google.datastore.v1.GqlQueryParameter getNamedBindingsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetNamedBindings().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearNamedBindings() { getMutableNamedBindings().clear(); return this; } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public Builder removeNamedBindings( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } getMutableNamedBindings().remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableNamedBindings() { return internalGetMutableNamedBindings().getMutableMap(); } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public Builder putNamedBindings( java.lang.String key, com.google.datastore.v1.GqlQueryParameter value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } getMutableNamedBindings().put(key, value); return this; } /** *
     * For each non-reserved named binding site in the query string, there must be
     * a named parameter with that name, but not necessarily the inverse.
     * Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex
     * `__.*__`, and must not be `""`.
     * 
* * map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5; */ public Builder putAllNamedBindings( java.util.Map values) { getMutableNamedBindings().putAll(values); return this; } private java.util.List positionalBindings_ = java.util.Collections.emptyList(); private void ensurePositionalBindingsIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { positionalBindings_ = new java.util.ArrayList(positionalBindings_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.GqlQueryParameter, com.google.datastore.v1.GqlQueryParameter.Builder, com.google.datastore.v1.GqlQueryParameterOrBuilder> positionalBindingsBuilder_; /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public java.util.List getPositionalBindingsList() { if (positionalBindingsBuilder_ == null) { return java.util.Collections.unmodifiableList(positionalBindings_); } else { return positionalBindingsBuilder_.getMessageList(); } } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public int getPositionalBindingsCount() { if (positionalBindingsBuilder_ == null) { return positionalBindings_.size(); } else { return positionalBindingsBuilder_.getCount(); } } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameter getPositionalBindings(int index) { if (positionalBindingsBuilder_ == null) { return positionalBindings_.get(index); } else { return positionalBindingsBuilder_.getMessage(index); } } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder setPositionalBindings( int index, com.google.datastore.v1.GqlQueryParameter value) { if (positionalBindingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePositionalBindingsIsMutable(); positionalBindings_.set(index, value); onChanged(); } else { positionalBindingsBuilder_.setMessage(index, value); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder setPositionalBindings( int index, com.google.datastore.v1.GqlQueryParameter.Builder builderForValue) { if (positionalBindingsBuilder_ == null) { ensurePositionalBindingsIsMutable(); positionalBindings_.set(index, builderForValue.build()); onChanged(); } else { positionalBindingsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder addPositionalBindings(com.google.datastore.v1.GqlQueryParameter value) { if (positionalBindingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePositionalBindingsIsMutable(); positionalBindings_.add(value); onChanged(); } else { positionalBindingsBuilder_.addMessage(value); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder addPositionalBindings( int index, com.google.datastore.v1.GqlQueryParameter value) { if (positionalBindingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePositionalBindingsIsMutable(); positionalBindings_.add(index, value); onChanged(); } else { positionalBindingsBuilder_.addMessage(index, value); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder addPositionalBindings( com.google.datastore.v1.GqlQueryParameter.Builder builderForValue) { if (positionalBindingsBuilder_ == null) { ensurePositionalBindingsIsMutable(); positionalBindings_.add(builderForValue.build()); onChanged(); } else { positionalBindingsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder addPositionalBindings( int index, com.google.datastore.v1.GqlQueryParameter.Builder builderForValue) { if (positionalBindingsBuilder_ == null) { ensurePositionalBindingsIsMutable(); positionalBindings_.add(index, builderForValue.build()); onChanged(); } else { positionalBindingsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder addAllPositionalBindings( java.lang.Iterable values) { if (positionalBindingsBuilder_ == null) { ensurePositionalBindingsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, positionalBindings_); onChanged(); } else { positionalBindingsBuilder_.addAllMessages(values); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder clearPositionalBindings() { if (positionalBindingsBuilder_ == null) { positionalBindings_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { positionalBindingsBuilder_.clear(); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public Builder removePositionalBindings(int index) { if (positionalBindingsBuilder_ == null) { ensurePositionalBindingsIsMutable(); positionalBindings_.remove(index); onChanged(); } else { positionalBindingsBuilder_.remove(index); } return this; } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameter.Builder getPositionalBindingsBuilder( int index) { return getPositionalBindingsFieldBuilder().getBuilder(index); } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameterOrBuilder getPositionalBindingsOrBuilder( int index) { if (positionalBindingsBuilder_ == null) { return positionalBindings_.get(index); } else { return positionalBindingsBuilder_.getMessageOrBuilder(index); } } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public java.util.List getPositionalBindingsOrBuilderList() { if (positionalBindingsBuilder_ != null) { return positionalBindingsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(positionalBindings_); } } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameter.Builder addPositionalBindingsBuilder() { return getPositionalBindingsFieldBuilder().addBuilder( com.google.datastore.v1.GqlQueryParameter.getDefaultInstance()); } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public com.google.datastore.v1.GqlQueryParameter.Builder addPositionalBindingsBuilder( int index) { return getPositionalBindingsFieldBuilder().addBuilder( index, com.google.datastore.v1.GqlQueryParameter.getDefaultInstance()); } /** *
     * Numbered binding site @1 references the first numbered parameter,
     * effectively using 1-based indexing, rather than the usual 0.
     * For each binding site numbered i in `query_string`, there must be an i-th
     * numbered parameter. The inverse must also be true.
     * 
* * repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4; */ public java.util.List getPositionalBindingsBuilderList() { return getPositionalBindingsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.GqlQueryParameter, com.google.datastore.v1.GqlQueryParameter.Builder, com.google.datastore.v1.GqlQueryParameterOrBuilder> getPositionalBindingsFieldBuilder() { if (positionalBindingsBuilder_ == null) { positionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.datastore.v1.GqlQueryParameter, com.google.datastore.v1.GqlQueryParameter.Builder, com.google.datastore.v1.GqlQueryParameterOrBuilder>( positionalBindings_, ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean()); positionalBindings_ = null; } return positionalBindingsBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:google.datastore.v1.GqlQuery) } // @@protoc_insertion_point(class_scope:google.datastore.v1.GqlQuery) private static final com.google.datastore.v1.GqlQuery DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.datastore.v1.GqlQuery(); } public static com.google.datastore.v1.GqlQuery getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public GqlQuery parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GqlQuery(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.datastore.v1.GqlQuery getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy