com.google.datastore.v1.Value Maven / Gradle / Ivy
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/datastore/v1/entity.proto
package com.google.datastore.v1;
/**
*
*
*
* A message that can hold any of the supported value types and associated
* metadata.
*
*
* Protobuf type {@code google.datastore.v1.Value}
*/
public final class Value extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.datastore.v1.Value)
ValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use Value.newBuilder() to construct.
private Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Value() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Value();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.datastore.v1.EntityProto.internal_static_google_datastore_v1_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.datastore.v1.EntityProto
.internal_static_google_datastore_v1_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.datastore.v1.Value.class, com.google.datastore.v1.Value.Builder.class);
}
private int valueTypeCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object valueType_;
public enum ValueTypeCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
NULL_VALUE(11),
BOOLEAN_VALUE(1),
INTEGER_VALUE(2),
DOUBLE_VALUE(3),
TIMESTAMP_VALUE(10),
KEY_VALUE(5),
STRING_VALUE(17),
BLOB_VALUE(18),
GEO_POINT_VALUE(8),
ENTITY_VALUE(6),
ARRAY_VALUE(9),
VALUETYPE_NOT_SET(0);
private final int value;
private ValueTypeCase(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 ValueTypeCase valueOf(int value) {
return forNumber(value);
}
public static ValueTypeCase forNumber(int value) {
switch (value) {
case 11:
return NULL_VALUE;
case 1:
return BOOLEAN_VALUE;
case 2:
return INTEGER_VALUE;
case 3:
return DOUBLE_VALUE;
case 10:
return TIMESTAMP_VALUE;
case 5:
return KEY_VALUE;
case 17:
return STRING_VALUE;
case 18:
return BLOB_VALUE;
case 8:
return GEO_POINT_VALUE;
case 6:
return ENTITY_VALUE;
case 9:
return ARRAY_VALUE;
case 0:
return VALUETYPE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueTypeCase getValueTypeCase() {
return ValueTypeCase.forNumber(valueTypeCase_);
}
public static final int NULL_VALUE_FIELD_NUMBER = 11;
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return Whether the nullValue field is set.
*/
public boolean hasNullValue() {
return valueTypeCase_ == 11;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return The enum numeric value on the wire for nullValue.
*/
public int getNullValueValue() {
if (valueTypeCase_ == 11) {
return (java.lang.Integer) valueType_;
}
return 0;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return The nullValue.
*/
public com.google.protobuf.NullValue getNullValue() {
if (valueTypeCase_ == 11) {
com.google.protobuf.NullValue result =
com.google.protobuf.NullValue.forNumber((java.lang.Integer) valueType_);
return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result;
}
return com.google.protobuf.NullValue.NULL_VALUE;
}
public static final int BOOLEAN_VALUE_FIELD_NUMBER = 1;
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @return Whether the booleanValue field is set.
*/
@java.lang.Override
public boolean hasBooleanValue() {
return valueTypeCase_ == 1;
}
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @return The booleanValue.
*/
@java.lang.Override
public boolean getBooleanValue() {
if (valueTypeCase_ == 1) {
return (java.lang.Boolean) valueType_;
}
return false;
}
public static final int INTEGER_VALUE_FIELD_NUMBER = 2;
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @return Whether the integerValue field is set.
*/
@java.lang.Override
public boolean hasIntegerValue() {
return valueTypeCase_ == 2;
}
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @return The integerValue.
*/
@java.lang.Override
public long getIntegerValue() {
if (valueTypeCase_ == 2) {
return (java.lang.Long) valueType_;
}
return 0L;
}
public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @return Whether the doubleValue field is set.
*/
@java.lang.Override
public boolean hasDoubleValue() {
return valueTypeCase_ == 3;
}
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @return The doubleValue.
*/
@java.lang.Override
public double getDoubleValue() {
if (valueTypeCase_ == 3) {
return (java.lang.Double) valueType_;
}
return 0D;
}
public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 10;
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*
* @return Whether the timestampValue field is set.
*/
@java.lang.Override
public boolean hasTimestampValue() {
return valueTypeCase_ == 10;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*
* @return The timestampValue.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestampValue() {
if (valueTypeCase_ == 10) {
return (com.google.protobuf.Timestamp) valueType_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() {
if (valueTypeCase_ == 10) {
return (com.google.protobuf.Timestamp) valueType_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
public static final int KEY_VALUE_FIELD_NUMBER = 5;
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*
* @return Whether the keyValue field is set.
*/
@java.lang.Override
public boolean hasKeyValue() {
return valueTypeCase_ == 5;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*
* @return The keyValue.
*/
@java.lang.Override
public com.google.datastore.v1.Key getKeyValue() {
if (valueTypeCase_ == 5) {
return (com.google.datastore.v1.Key) valueType_;
}
return com.google.datastore.v1.Key.getDefaultInstance();
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
@java.lang.Override
public com.google.datastore.v1.KeyOrBuilder getKeyValueOrBuilder() {
if (valueTypeCase_ == 5) {
return (com.google.datastore.v1.Key) valueType_;
}
return com.google.datastore.v1.Key.getDefaultInstance();
}
public static final int STRING_VALUE_FIELD_NUMBER = 17;
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return Whether the stringValue field is set.
*/
public boolean hasStringValue() {
return valueTypeCase_ == 17;
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return The stringValue.
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (valueTypeCase_ == 17) {
ref = valueType_;
}
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();
if (valueTypeCase_ == 17) {
valueType_ = s;
}
return s;
}
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return The bytes for stringValue.
*/
public com.google.protobuf.ByteString getStringValueBytes() {
java.lang.Object ref = "";
if (valueTypeCase_ == 17) {
ref = valueType_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueTypeCase_ == 17) {
valueType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BLOB_VALUE_FIELD_NUMBER = 18;
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @return Whether the blobValue field is set.
*/
@java.lang.Override
public boolean hasBlobValue() {
return valueTypeCase_ == 18;
}
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @return The blobValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBlobValue() {
if (valueTypeCase_ == 18) {
return (com.google.protobuf.ByteString) valueType_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int GEO_POINT_VALUE_FIELD_NUMBER = 8;
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*
* @return Whether the geoPointValue field is set.
*/
@java.lang.Override
public boolean hasGeoPointValue() {
return valueTypeCase_ == 8;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*
* @return The geoPointValue.
*/
@java.lang.Override
public com.google.type.LatLng getGeoPointValue() {
if (valueTypeCase_ == 8) {
return (com.google.type.LatLng) valueType_;
}
return com.google.type.LatLng.getDefaultInstance();
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
@java.lang.Override
public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() {
if (valueTypeCase_ == 8) {
return (com.google.type.LatLng) valueType_;
}
return com.google.type.LatLng.getDefaultInstance();
}
public static final int ENTITY_VALUE_FIELD_NUMBER = 6;
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*
* @return Whether the entityValue field is set.
*/
@java.lang.Override
public boolean hasEntityValue() {
return valueTypeCase_ == 6;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*
* @return The entityValue.
*/
@java.lang.Override
public com.google.datastore.v1.Entity getEntityValue() {
if (valueTypeCase_ == 6) {
return (com.google.datastore.v1.Entity) valueType_;
}
return com.google.datastore.v1.Entity.getDefaultInstance();
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
@java.lang.Override
public com.google.datastore.v1.EntityOrBuilder getEntityValueOrBuilder() {
if (valueTypeCase_ == 6) {
return (com.google.datastore.v1.Entity) valueType_;
}
return com.google.datastore.v1.Entity.getDefaultInstance();
}
public static final int ARRAY_VALUE_FIELD_NUMBER = 9;
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*
* @return Whether the arrayValue field is set.
*/
@java.lang.Override
public boolean hasArrayValue() {
return valueTypeCase_ == 9;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*
* @return The arrayValue.
*/
@java.lang.Override
public com.google.datastore.v1.ArrayValue getArrayValue() {
if (valueTypeCase_ == 9) {
return (com.google.datastore.v1.ArrayValue) valueType_;
}
return com.google.datastore.v1.ArrayValue.getDefaultInstance();
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
@java.lang.Override
public com.google.datastore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() {
if (valueTypeCase_ == 9) {
return (com.google.datastore.v1.ArrayValue) valueType_;
}
return com.google.datastore.v1.ArrayValue.getDefaultInstance();
}
public static final int MEANING_FIELD_NUMBER = 14;
private int meaning_ = 0;
/**
*
*
*
* The `meaning` field should only be populated for backwards compatibility.
*
*
* int32 meaning = 14;
*
* @return The meaning.
*/
@java.lang.Override
public int getMeaning() {
return meaning_;
}
public static final int EXCLUDE_FROM_INDEXES_FIELD_NUMBER = 19;
private boolean excludeFromIndexes_ = false;
/**
*
*
*
* If the value should be excluded from all indexes including those defined
* explicitly.
*
*
* bool exclude_from_indexes = 19;
*
* @return The excludeFromIndexes.
*/
@java.lang.Override
public boolean getExcludeFromIndexes() {
return excludeFromIndexes_;
}
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 (valueTypeCase_ == 1) {
output.writeBool(1, (boolean) ((java.lang.Boolean) valueType_));
}
if (valueTypeCase_ == 2) {
output.writeInt64(2, (long) ((java.lang.Long) valueType_));
}
if (valueTypeCase_ == 3) {
output.writeDouble(3, (double) ((java.lang.Double) valueType_));
}
if (valueTypeCase_ == 5) {
output.writeMessage(5, (com.google.datastore.v1.Key) valueType_);
}
if (valueTypeCase_ == 6) {
output.writeMessage(6, (com.google.datastore.v1.Entity) valueType_);
}
if (valueTypeCase_ == 8) {
output.writeMessage(8, (com.google.type.LatLng) valueType_);
}
if (valueTypeCase_ == 9) {
output.writeMessage(9, (com.google.datastore.v1.ArrayValue) valueType_);
}
if (valueTypeCase_ == 10) {
output.writeMessage(10, (com.google.protobuf.Timestamp) valueType_);
}
if (valueTypeCase_ == 11) {
output.writeEnum(11, ((java.lang.Integer) valueType_));
}
if (meaning_ != 0) {
output.writeInt32(14, meaning_);
}
if (valueTypeCase_ == 17) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, valueType_);
}
if (valueTypeCase_ == 18) {
output.writeBytes(18, (com.google.protobuf.ByteString) valueType_);
}
if (excludeFromIndexes_ != false) {
output.writeBool(19, excludeFromIndexes_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueTypeCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
1, (boolean) ((java.lang.Boolean) valueType_));
}
if (valueTypeCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(
2, (long) ((java.lang.Long) valueType_));
}
if (valueTypeCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeDoubleSize(
3, (double) ((java.lang.Double) valueType_));
}
if (valueTypeCase_ == 5) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
5, (com.google.datastore.v1.Key) valueType_);
}
if (valueTypeCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.datastore.v1.Entity) valueType_);
}
if (valueTypeCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.type.LatLng) valueType_);
}
if (valueTypeCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
9, (com.google.datastore.v1.ArrayValue) valueType_);
}
if (valueTypeCase_ == 10) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
10, (com.google.protobuf.Timestamp) valueType_);
}
if (valueTypeCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeEnumSize(
11, ((java.lang.Integer) valueType_));
}
if (meaning_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, meaning_);
}
if (valueTypeCase_ == 17) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, valueType_);
}
if (valueTypeCase_ == 18) {
size +=
com.google.protobuf.CodedOutputStream.computeBytesSize(
18, (com.google.protobuf.ByteString) valueType_);
}
if (excludeFromIndexes_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, excludeFromIndexes_);
}
size += getUnknownFields().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.datastore.v1.Value)) {
return super.equals(obj);
}
com.google.datastore.v1.Value other = (com.google.datastore.v1.Value) obj;
if (getMeaning() != other.getMeaning()) return false;
if (getExcludeFromIndexes() != other.getExcludeFromIndexes()) return false;
if (!getValueTypeCase().equals(other.getValueTypeCase())) return false;
switch (valueTypeCase_) {
case 11:
if (getNullValueValue() != other.getNullValueValue()) return false;
break;
case 1:
if (getBooleanValue() != other.getBooleanValue()) return false;
break;
case 2:
if (getIntegerValue() != other.getIntegerValue()) return false;
break;
case 3:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false;
break;
case 10:
if (!getTimestampValue().equals(other.getTimestampValue())) return false;
break;
case 5:
if (!getKeyValue().equals(other.getKeyValue())) return false;
break;
case 17:
if (!getStringValue().equals(other.getStringValue())) return false;
break;
case 18:
if (!getBlobValue().equals(other.getBlobValue())) return false;
break;
case 8:
if (!getGeoPointValue().equals(other.getGeoPointValue())) return false;
break;
case 6:
if (!getEntityValue().equals(other.getEntityValue())) return false;
break;
case 9:
if (!getArrayValue().equals(other.getArrayValue())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + MEANING_FIELD_NUMBER;
hash = (53 * hash) + getMeaning();
hash = (37 * hash) + EXCLUDE_FROM_INDEXES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExcludeFromIndexes());
switch (valueTypeCase_) {
case 11:
hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNullValueValue();
break;
case 1:
hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBooleanValue());
break;
case 2:
hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntegerValue());
break;
case 3:
hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 10:
hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTimestampValue().hashCode();
break;
case 5:
hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getKeyValue().hashCode();
break;
case 17:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 18:
hash = (37 * hash) + BLOB_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getBlobValue().hashCode();
break;
case 8:
hash = (37 * hash) + GEO_POINT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getGeoPointValue().hashCode();
break;
case 6:
hash = (37 * hash) + ENTITY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getEntityValue().hashCode();
break;
case 9:
hash = (37 * hash) + ARRAY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getArrayValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.datastore.v1.Value parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.Value parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.datastore.v1.Value parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.Value 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.Value parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.datastore.v1.Value parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.datastore.v1.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.datastore.v1.Value 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.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.datastore.v1.Value 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.Value parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.datastore.v1.Value 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.datastore.v1.Value 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;
}
/**
*
*
*
* A message that can hold any of the supported value types and associated
* metadata.
*
*
* Protobuf type {@code google.datastore.v1.Value}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.datastore.v1.Value)
com.google.datastore.v1.ValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.datastore.v1.EntityProto
.internal_static_google_datastore_v1_Value_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.datastore.v1.EntityProto
.internal_static_google_datastore_v1_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.datastore.v1.Value.class, com.google.datastore.v1.Value.Builder.class);
}
// Construct using com.google.datastore.v1.Value.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (timestampValueBuilder_ != null) {
timestampValueBuilder_.clear();
}
if (keyValueBuilder_ != null) {
keyValueBuilder_.clear();
}
if (geoPointValueBuilder_ != null) {
geoPointValueBuilder_.clear();
}
if (entityValueBuilder_ != null) {
entityValueBuilder_.clear();
}
if (arrayValueBuilder_ != null) {
arrayValueBuilder_.clear();
}
meaning_ = 0;
excludeFromIndexes_ = false;
valueTypeCase_ = 0;
valueType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.datastore.v1.EntityProto
.internal_static_google_datastore_v1_Value_descriptor;
}
@java.lang.Override
public com.google.datastore.v1.Value getDefaultInstanceForType() {
return com.google.datastore.v1.Value.getDefaultInstance();
}
@java.lang.Override
public com.google.datastore.v1.Value build() {
com.google.datastore.v1.Value result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.datastore.v1.Value buildPartial() {
com.google.datastore.v1.Value result = new com.google.datastore.v1.Value(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.datastore.v1.Value result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000800) != 0)) {
result.meaning_ = meaning_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.excludeFromIndexes_ = excludeFromIndexes_;
}
}
private void buildPartialOneofs(com.google.datastore.v1.Value result) {
result.valueTypeCase_ = valueTypeCase_;
result.valueType_ = this.valueType_;
if (valueTypeCase_ == 10 && timestampValueBuilder_ != null) {
result.valueType_ = timestampValueBuilder_.build();
}
if (valueTypeCase_ == 5 && keyValueBuilder_ != null) {
result.valueType_ = keyValueBuilder_.build();
}
if (valueTypeCase_ == 8 && geoPointValueBuilder_ != null) {
result.valueType_ = geoPointValueBuilder_.build();
}
if (valueTypeCase_ == 6 && entityValueBuilder_ != null) {
result.valueType_ = entityValueBuilder_.build();
}
if (valueTypeCase_ == 9 && arrayValueBuilder_ != null) {
result.valueType_ = arrayValueBuilder_.build();
}
}
@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.datastore.v1.Value) {
return mergeFrom((com.google.datastore.v1.Value) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.datastore.v1.Value other) {
if (other == com.google.datastore.v1.Value.getDefaultInstance()) return this;
if (other.getMeaning() != 0) {
setMeaning(other.getMeaning());
}
if (other.getExcludeFromIndexes() != false) {
setExcludeFromIndexes(other.getExcludeFromIndexes());
}
switch (other.getValueTypeCase()) {
case NULL_VALUE:
{
setNullValueValue(other.getNullValueValue());
break;
}
case BOOLEAN_VALUE:
{
setBooleanValue(other.getBooleanValue());
break;
}
case INTEGER_VALUE:
{
setIntegerValue(other.getIntegerValue());
break;
}
case DOUBLE_VALUE:
{
setDoubleValue(other.getDoubleValue());
break;
}
case TIMESTAMP_VALUE:
{
mergeTimestampValue(other.getTimestampValue());
break;
}
case KEY_VALUE:
{
mergeKeyValue(other.getKeyValue());
break;
}
case STRING_VALUE:
{
valueTypeCase_ = 17;
valueType_ = other.valueType_;
onChanged();
break;
}
case BLOB_VALUE:
{
setBlobValue(other.getBlobValue());
break;
}
case GEO_POINT_VALUE:
{
mergeGeoPointValue(other.getGeoPointValue());
break;
}
case ENTITY_VALUE:
{
mergeEntityValue(other.getEntityValue());
break;
}
case ARRAY_VALUE:
{
mergeArrayValue(other.getArrayValue());
break;
}
case VALUETYPE_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
valueType_ = input.readBool();
valueTypeCase_ = 1;
break;
} // case 8
case 16:
{
valueType_ = input.readInt64();
valueTypeCase_ = 2;
break;
} // case 16
case 25:
{
valueType_ = input.readDouble();
valueTypeCase_ = 3;
break;
} // case 25
case 42:
{
input.readMessage(getKeyValueFieldBuilder().getBuilder(), extensionRegistry);
valueTypeCase_ = 5;
break;
} // case 42
case 50:
{
input.readMessage(getEntityValueFieldBuilder().getBuilder(), extensionRegistry);
valueTypeCase_ = 6;
break;
} // case 50
case 66:
{
input.readMessage(getGeoPointValueFieldBuilder().getBuilder(), extensionRegistry);
valueTypeCase_ = 8;
break;
} // case 66
case 74:
{
input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry);
valueTypeCase_ = 9;
break;
} // case 74
case 82:
{
input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry);
valueTypeCase_ = 10;
break;
} // case 82
case 88:
{
int rawValue = input.readEnum();
valueTypeCase_ = 11;
valueType_ = rawValue;
break;
} // case 88
case 112:
{
meaning_ = input.readInt32();
bitField0_ |= 0x00000800;
break;
} // case 112
case 138:
{
java.lang.String s = input.readStringRequireUtf8();
valueTypeCase_ = 17;
valueType_ = s;
break;
} // case 138
case 146:
{
valueType_ = input.readBytes();
valueTypeCase_ = 18;
break;
} // case 146
case 152:
{
excludeFromIndexes_ = input.readBool();
bitField0_ |= 0x00001000;
break;
} // case 152
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int valueTypeCase_ = 0;
private java.lang.Object valueType_;
public ValueTypeCase getValueTypeCase() {
return ValueTypeCase.forNumber(valueTypeCase_);
}
public Builder clearValueType() {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return Whether the nullValue field is set.
*/
@java.lang.Override
public boolean hasNullValue() {
return valueTypeCase_ == 11;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return The enum numeric value on the wire for nullValue.
*/
@java.lang.Override
public int getNullValueValue() {
if (valueTypeCase_ == 11) {
return ((java.lang.Integer) valueType_).intValue();
}
return 0;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @param value The enum numeric value on the wire for nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValueValue(int value) {
valueTypeCase_ = 11;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return The nullValue.
*/
@java.lang.Override
public com.google.protobuf.NullValue getNullValue() {
if (valueTypeCase_ == 11) {
com.google.protobuf.NullValue result =
com.google.protobuf.NullValue.forNumber((java.lang.Integer) valueType_);
return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result;
}
return com.google.protobuf.NullValue.NULL_VALUE;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @param value The nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValue(com.google.protobuf.NullValue value) {
if (value == null) {
throw new NullPointerException();
}
valueTypeCase_ = 11;
valueType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* A null value.
*
*
* .google.protobuf.NullValue null_value = 11;
*
* @return This builder for chaining.
*/
public Builder clearNullValue() {
if (valueTypeCase_ == 11) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @return Whether the booleanValue field is set.
*/
public boolean hasBooleanValue() {
return valueTypeCase_ == 1;
}
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @return The booleanValue.
*/
public boolean getBooleanValue() {
if (valueTypeCase_ == 1) {
return (java.lang.Boolean) valueType_;
}
return false;
}
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @param value The booleanValue to set.
* @return This builder for chaining.
*/
public Builder setBooleanValue(boolean value) {
valueTypeCase_ = 1;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A boolean value.
*
*
* bool boolean_value = 1;
*
* @return This builder for chaining.
*/
public Builder clearBooleanValue() {
if (valueTypeCase_ == 1) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @return Whether the integerValue field is set.
*/
public boolean hasIntegerValue() {
return valueTypeCase_ == 2;
}
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @return The integerValue.
*/
public long getIntegerValue() {
if (valueTypeCase_ == 2) {
return (java.lang.Long) valueType_;
}
return 0L;
}
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @param value The integerValue to set.
* @return This builder for chaining.
*/
public Builder setIntegerValue(long value) {
valueTypeCase_ = 2;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* An integer value.
*
*
* int64 integer_value = 2;
*
* @return This builder for chaining.
*/
public Builder clearIntegerValue() {
if (valueTypeCase_ == 2) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @return Whether the doubleValue field is set.
*/
public boolean hasDoubleValue() {
return valueTypeCase_ == 3;
}
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @return The doubleValue.
*/
public double getDoubleValue() {
if (valueTypeCase_ == 3) {
return (java.lang.Double) valueType_;
}
return 0D;
}
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @param value The doubleValue to set.
* @return This builder for chaining.
*/
public Builder setDoubleValue(double value) {
valueTypeCase_ = 3;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A double value.
*
*
* double double_value = 3;
*
* @return This builder for chaining.
*/
public Builder clearDoubleValue() {
if (valueTypeCase_ == 3) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
timestampValueBuilder_;
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*
* @return Whether the timestampValue field is set.
*/
@java.lang.Override
public boolean hasTimestampValue() {
return valueTypeCase_ == 10;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*
* @return The timestampValue.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestampValue() {
if (timestampValueBuilder_ == null) {
if (valueTypeCase_ == 10) {
return (com.google.protobuf.Timestamp) valueType_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (valueTypeCase_ == 10) {
return timestampValueBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
public Builder setTimestampValue(com.google.protobuf.Timestamp value) {
if (timestampValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueType_ = value;
onChanged();
} else {
timestampValueBuilder_.setMessage(value);
}
valueTypeCase_ = 10;
return this;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampValueBuilder_ == null) {
valueType_ = builderForValue.build();
onChanged();
} else {
timestampValueBuilder_.setMessage(builderForValue.build());
}
valueTypeCase_ = 10;
return this;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) {
if (timestampValueBuilder_ == null) {
if (valueTypeCase_ == 10
&& valueType_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
valueType_ =
com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) valueType_)
.mergeFrom(value)
.buildPartial();
} else {
valueType_ = value;
}
onChanged();
} else {
if (valueTypeCase_ == 10) {
timestampValueBuilder_.mergeFrom(value);
} else {
timestampValueBuilder_.setMessage(value);
}
}
valueTypeCase_ = 10;
return this;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
public Builder clearTimestampValue() {
if (timestampValueBuilder_ == null) {
if (valueTypeCase_ == 10) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
} else {
if (valueTypeCase_ == 10) {
valueTypeCase_ = 0;
valueType_ = null;
}
timestampValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() {
return getTimestampValueFieldBuilder().getBuilder();
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() {
if ((valueTypeCase_ == 10) && (timestampValueBuilder_ != null)) {
return timestampValueBuilder_.getMessageOrBuilder();
} else {
if (valueTypeCase_ == 10) {
return (com.google.protobuf.Timestamp) valueType_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
*
*
* A timestamp value.
* When stored in the Datastore, precise only to microseconds;
* any additional precision is rounded down.
*
*
* .google.protobuf.Timestamp timestamp_value = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getTimestampValueFieldBuilder() {
if (timestampValueBuilder_ == null) {
if (!(valueTypeCase_ == 10)) {
valueType_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
timestampValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) valueType_, getParentForChildren(), isClean());
valueType_ = null;
}
valueTypeCase_ = 10;
onChanged();
return timestampValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Key,
com.google.datastore.v1.Key.Builder,
com.google.datastore.v1.KeyOrBuilder>
keyValueBuilder_;
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*
* @return Whether the keyValue field is set.
*/
@java.lang.Override
public boolean hasKeyValue() {
return valueTypeCase_ == 5;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*
* @return The keyValue.
*/
@java.lang.Override
public com.google.datastore.v1.Key getKeyValue() {
if (keyValueBuilder_ == null) {
if (valueTypeCase_ == 5) {
return (com.google.datastore.v1.Key) valueType_;
}
return com.google.datastore.v1.Key.getDefaultInstance();
} else {
if (valueTypeCase_ == 5) {
return keyValueBuilder_.getMessage();
}
return com.google.datastore.v1.Key.getDefaultInstance();
}
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
public Builder setKeyValue(com.google.datastore.v1.Key value) {
if (keyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueType_ = value;
onChanged();
} else {
keyValueBuilder_.setMessage(value);
}
valueTypeCase_ = 5;
return this;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
public Builder setKeyValue(com.google.datastore.v1.Key.Builder builderForValue) {
if (keyValueBuilder_ == null) {
valueType_ = builderForValue.build();
onChanged();
} else {
keyValueBuilder_.setMessage(builderForValue.build());
}
valueTypeCase_ = 5;
return this;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
public Builder mergeKeyValue(com.google.datastore.v1.Key value) {
if (keyValueBuilder_ == null) {
if (valueTypeCase_ == 5 && valueType_ != com.google.datastore.v1.Key.getDefaultInstance()) {
valueType_ =
com.google.datastore.v1.Key.newBuilder((com.google.datastore.v1.Key) valueType_)
.mergeFrom(value)
.buildPartial();
} else {
valueType_ = value;
}
onChanged();
} else {
if (valueTypeCase_ == 5) {
keyValueBuilder_.mergeFrom(value);
} else {
keyValueBuilder_.setMessage(value);
}
}
valueTypeCase_ = 5;
return this;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
public Builder clearKeyValue() {
if (keyValueBuilder_ == null) {
if (valueTypeCase_ == 5) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
} else {
if (valueTypeCase_ == 5) {
valueTypeCase_ = 0;
valueType_ = null;
}
keyValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
public com.google.datastore.v1.Key.Builder getKeyValueBuilder() {
return getKeyValueFieldBuilder().getBuilder();
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
@java.lang.Override
public com.google.datastore.v1.KeyOrBuilder getKeyValueOrBuilder() {
if ((valueTypeCase_ == 5) && (keyValueBuilder_ != null)) {
return keyValueBuilder_.getMessageOrBuilder();
} else {
if (valueTypeCase_ == 5) {
return (com.google.datastore.v1.Key) valueType_;
}
return com.google.datastore.v1.Key.getDefaultInstance();
}
}
/**
*
*
*
* A key value.
*
*
* .google.datastore.v1.Key key_value = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Key,
com.google.datastore.v1.Key.Builder,
com.google.datastore.v1.KeyOrBuilder>
getKeyValueFieldBuilder() {
if (keyValueBuilder_ == null) {
if (!(valueTypeCase_ == 5)) {
valueType_ = com.google.datastore.v1.Key.getDefaultInstance();
}
keyValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Key,
com.google.datastore.v1.Key.Builder,
com.google.datastore.v1.KeyOrBuilder>(
(com.google.datastore.v1.Key) valueType_, getParentForChildren(), isClean());
valueType_ = null;
}
valueTypeCase_ = 5;
onChanged();
return keyValueBuilder_;
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return Whether the stringValue field is set.
*/
@java.lang.Override
public boolean hasStringValue() {
return valueTypeCase_ == 17;
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return The stringValue.
*/
@java.lang.Override
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (valueTypeCase_ == 17) {
ref = valueType_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueTypeCase_ == 17) {
valueType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return The bytes for stringValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStringValueBytes() {
java.lang.Object ref = "";
if (valueTypeCase_ == 17) {
ref = valueType_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueTypeCase_ == 17) {
valueType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @param value The stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueTypeCase_ = 17;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @return This builder for chaining.
*/
public Builder clearStringValue() {
if (valueTypeCase_ == 17) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* A UTF-8 encoded string value.
* When `exclude_from_indexes` is false (it is indexed) , may have at most
* 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
*
*
* string string_value = 17;
*
* @param value The bytes for stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueTypeCase_ = 17;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @return Whether the blobValue field is set.
*/
public boolean hasBlobValue() {
return valueTypeCase_ == 18;
}
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @return The blobValue.
*/
public com.google.protobuf.ByteString getBlobValue() {
if (valueTypeCase_ == 18) {
return (com.google.protobuf.ByteString) valueType_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @param value The blobValue to set.
* @return This builder for chaining.
*/
public Builder setBlobValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
valueTypeCase_ = 18;
valueType_ = value;
onChanged();
return this;
}
/**
*
*
*
* A blob value.
* May have at most 1,000,000 bytes.
* When `exclude_from_indexes` is false, may have at most 1500 bytes.
* In JSON requests, must be base64-encoded.
*
*
* bytes blob_value = 18;
*
* @return This builder for chaining.
*/
public Builder clearBlobValue() {
if (valueTypeCase_ == 18) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
geoPointValueBuilder_;
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*
* @return Whether the geoPointValue field is set.
*/
@java.lang.Override
public boolean hasGeoPointValue() {
return valueTypeCase_ == 8;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*
* @return The geoPointValue.
*/
@java.lang.Override
public com.google.type.LatLng getGeoPointValue() {
if (geoPointValueBuilder_ == null) {
if (valueTypeCase_ == 8) {
return (com.google.type.LatLng) valueType_;
}
return com.google.type.LatLng.getDefaultInstance();
} else {
if (valueTypeCase_ == 8) {
return geoPointValueBuilder_.getMessage();
}
return com.google.type.LatLng.getDefaultInstance();
}
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
public Builder setGeoPointValue(com.google.type.LatLng value) {
if (geoPointValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueType_ = value;
onChanged();
} else {
geoPointValueBuilder_.setMessage(value);
}
valueTypeCase_ = 8;
return this;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
public Builder setGeoPointValue(com.google.type.LatLng.Builder builderForValue) {
if (geoPointValueBuilder_ == null) {
valueType_ = builderForValue.build();
onChanged();
} else {
geoPointValueBuilder_.setMessage(builderForValue.build());
}
valueTypeCase_ = 8;
return this;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
public Builder mergeGeoPointValue(com.google.type.LatLng value) {
if (geoPointValueBuilder_ == null) {
if (valueTypeCase_ == 8 && valueType_ != com.google.type.LatLng.getDefaultInstance()) {
valueType_ =
com.google.type.LatLng.newBuilder((com.google.type.LatLng) valueType_)
.mergeFrom(value)
.buildPartial();
} else {
valueType_ = value;
}
onChanged();
} else {
if (valueTypeCase_ == 8) {
geoPointValueBuilder_.mergeFrom(value);
} else {
geoPointValueBuilder_.setMessage(value);
}
}
valueTypeCase_ = 8;
return this;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
public Builder clearGeoPointValue() {
if (geoPointValueBuilder_ == null) {
if (valueTypeCase_ == 8) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
} else {
if (valueTypeCase_ == 8) {
valueTypeCase_ = 0;
valueType_ = null;
}
geoPointValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
public com.google.type.LatLng.Builder getGeoPointValueBuilder() {
return getGeoPointValueFieldBuilder().getBuilder();
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
@java.lang.Override
public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() {
if ((valueTypeCase_ == 8) && (geoPointValueBuilder_ != null)) {
return geoPointValueBuilder_.getMessageOrBuilder();
} else {
if (valueTypeCase_ == 8) {
return (com.google.type.LatLng) valueType_;
}
return com.google.type.LatLng.getDefaultInstance();
}
}
/**
*
*
*
* A geo point value representing a point on the surface of Earth.
*
*
* .google.type.LatLng geo_point_value = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
getGeoPointValueFieldBuilder() {
if (geoPointValueBuilder_ == null) {
if (!(valueTypeCase_ == 8)) {
valueType_ = com.google.type.LatLng.getDefaultInstance();
}
geoPointValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng,
com.google.type.LatLng.Builder,
com.google.type.LatLngOrBuilder>(
(com.google.type.LatLng) valueType_, getParentForChildren(), isClean());
valueType_ = null;
}
valueTypeCase_ = 8;
onChanged();
return geoPointValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Entity,
com.google.datastore.v1.Entity.Builder,
com.google.datastore.v1.EntityOrBuilder>
entityValueBuilder_;
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*
* @return Whether the entityValue field is set.
*/
@java.lang.Override
public boolean hasEntityValue() {
return valueTypeCase_ == 6;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*
* @return The entityValue.
*/
@java.lang.Override
public com.google.datastore.v1.Entity getEntityValue() {
if (entityValueBuilder_ == null) {
if (valueTypeCase_ == 6) {
return (com.google.datastore.v1.Entity) valueType_;
}
return com.google.datastore.v1.Entity.getDefaultInstance();
} else {
if (valueTypeCase_ == 6) {
return entityValueBuilder_.getMessage();
}
return com.google.datastore.v1.Entity.getDefaultInstance();
}
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
public Builder setEntityValue(com.google.datastore.v1.Entity value) {
if (entityValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueType_ = value;
onChanged();
} else {
entityValueBuilder_.setMessage(value);
}
valueTypeCase_ = 6;
return this;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
public Builder setEntityValue(com.google.datastore.v1.Entity.Builder builderForValue) {
if (entityValueBuilder_ == null) {
valueType_ = builderForValue.build();
onChanged();
} else {
entityValueBuilder_.setMessage(builderForValue.build());
}
valueTypeCase_ = 6;
return this;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
public Builder mergeEntityValue(com.google.datastore.v1.Entity value) {
if (entityValueBuilder_ == null) {
if (valueTypeCase_ == 6
&& valueType_ != com.google.datastore.v1.Entity.getDefaultInstance()) {
valueType_ =
com.google.datastore.v1.Entity.newBuilder((com.google.datastore.v1.Entity) valueType_)
.mergeFrom(value)
.buildPartial();
} else {
valueType_ = value;
}
onChanged();
} else {
if (valueTypeCase_ == 6) {
entityValueBuilder_.mergeFrom(value);
} else {
entityValueBuilder_.setMessage(value);
}
}
valueTypeCase_ = 6;
return this;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
public Builder clearEntityValue() {
if (entityValueBuilder_ == null) {
if (valueTypeCase_ == 6) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
} else {
if (valueTypeCase_ == 6) {
valueTypeCase_ = 0;
valueType_ = null;
}
entityValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
public com.google.datastore.v1.Entity.Builder getEntityValueBuilder() {
return getEntityValueFieldBuilder().getBuilder();
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
@java.lang.Override
public com.google.datastore.v1.EntityOrBuilder getEntityValueOrBuilder() {
if ((valueTypeCase_ == 6) && (entityValueBuilder_ != null)) {
return entityValueBuilder_.getMessageOrBuilder();
} else {
if (valueTypeCase_ == 6) {
return (com.google.datastore.v1.Entity) valueType_;
}
return com.google.datastore.v1.Entity.getDefaultInstance();
}
}
/**
*
*
*
* An entity value.
*
* - May have no key.
* - May have a key with an incomplete key path.
* - May have a reserved/read-only key.
*
*
* .google.datastore.v1.Entity entity_value = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Entity,
com.google.datastore.v1.Entity.Builder,
com.google.datastore.v1.EntityOrBuilder>
getEntityValueFieldBuilder() {
if (entityValueBuilder_ == null) {
if (!(valueTypeCase_ == 6)) {
valueType_ = com.google.datastore.v1.Entity.getDefaultInstance();
}
entityValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.Entity,
com.google.datastore.v1.Entity.Builder,
com.google.datastore.v1.EntityOrBuilder>(
(com.google.datastore.v1.Entity) valueType_, getParentForChildren(), isClean());
valueType_ = null;
}
valueTypeCase_ = 6;
onChanged();
return entityValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.ArrayValue,
com.google.datastore.v1.ArrayValue.Builder,
com.google.datastore.v1.ArrayValueOrBuilder>
arrayValueBuilder_;
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*
* @return Whether the arrayValue field is set.
*/
@java.lang.Override
public boolean hasArrayValue() {
return valueTypeCase_ == 9;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*
* @return The arrayValue.
*/
@java.lang.Override
public com.google.datastore.v1.ArrayValue getArrayValue() {
if (arrayValueBuilder_ == null) {
if (valueTypeCase_ == 9) {
return (com.google.datastore.v1.ArrayValue) valueType_;
}
return com.google.datastore.v1.ArrayValue.getDefaultInstance();
} else {
if (valueTypeCase_ == 9) {
return arrayValueBuilder_.getMessage();
}
return com.google.datastore.v1.ArrayValue.getDefaultInstance();
}
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
public Builder setArrayValue(com.google.datastore.v1.ArrayValue value) {
if (arrayValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueType_ = value;
onChanged();
} else {
arrayValueBuilder_.setMessage(value);
}
valueTypeCase_ = 9;
return this;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
public Builder setArrayValue(com.google.datastore.v1.ArrayValue.Builder builderForValue) {
if (arrayValueBuilder_ == null) {
valueType_ = builderForValue.build();
onChanged();
} else {
arrayValueBuilder_.setMessage(builderForValue.build());
}
valueTypeCase_ = 9;
return this;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
public Builder mergeArrayValue(com.google.datastore.v1.ArrayValue value) {
if (arrayValueBuilder_ == null) {
if (valueTypeCase_ == 9
&& valueType_ != com.google.datastore.v1.ArrayValue.getDefaultInstance()) {
valueType_ =
com.google.datastore.v1.ArrayValue.newBuilder(
(com.google.datastore.v1.ArrayValue) valueType_)
.mergeFrom(value)
.buildPartial();
} else {
valueType_ = value;
}
onChanged();
} else {
if (valueTypeCase_ == 9) {
arrayValueBuilder_.mergeFrom(value);
} else {
arrayValueBuilder_.setMessage(value);
}
}
valueTypeCase_ = 9;
return this;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
public Builder clearArrayValue() {
if (arrayValueBuilder_ == null) {
if (valueTypeCase_ == 9) {
valueTypeCase_ = 0;
valueType_ = null;
onChanged();
}
} else {
if (valueTypeCase_ == 9) {
valueTypeCase_ = 0;
valueType_ = null;
}
arrayValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
public com.google.datastore.v1.ArrayValue.Builder getArrayValueBuilder() {
return getArrayValueFieldBuilder().getBuilder();
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
@java.lang.Override
public com.google.datastore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() {
if ((valueTypeCase_ == 9) && (arrayValueBuilder_ != null)) {
return arrayValueBuilder_.getMessageOrBuilder();
} else {
if (valueTypeCase_ == 9) {
return (com.google.datastore.v1.ArrayValue) valueType_;
}
return com.google.datastore.v1.ArrayValue.getDefaultInstance();
}
}
/**
*
*
*
* An array value.
* Cannot contain another array value.
* A `Value` instance that sets field `array_value` must not set fields
* `meaning` or `exclude_from_indexes`.
*
*
* .google.datastore.v1.ArrayValue array_value = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.ArrayValue,
com.google.datastore.v1.ArrayValue.Builder,
com.google.datastore.v1.ArrayValueOrBuilder>
getArrayValueFieldBuilder() {
if (arrayValueBuilder_ == null) {
if (!(valueTypeCase_ == 9)) {
valueType_ = com.google.datastore.v1.ArrayValue.getDefaultInstance();
}
arrayValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.datastore.v1.ArrayValue,
com.google.datastore.v1.ArrayValue.Builder,
com.google.datastore.v1.ArrayValueOrBuilder>(
(com.google.datastore.v1.ArrayValue) valueType_, getParentForChildren(), isClean());
valueType_ = null;
}
valueTypeCase_ = 9;
onChanged();
return arrayValueBuilder_;
}
private int meaning_;
/**
*
*
*
* The `meaning` field should only be populated for backwards compatibility.
*
*
* int32 meaning = 14;
*
* @return The meaning.
*/
@java.lang.Override
public int getMeaning() {
return meaning_;
}
/**
*
*
*
* The `meaning` field should only be populated for backwards compatibility.
*
*
* int32 meaning = 14;
*
* @param value The meaning to set.
* @return This builder for chaining.
*/
public Builder setMeaning(int value) {
meaning_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* The `meaning` field should only be populated for backwards compatibility.
*
*
* int32 meaning = 14;
*
* @return This builder for chaining.
*/
public Builder clearMeaning() {
bitField0_ = (bitField0_ & ~0x00000800);
meaning_ = 0;
onChanged();
return this;
}
private boolean excludeFromIndexes_;
/**
*
*
*
* If the value should be excluded from all indexes including those defined
* explicitly.
*
*
* bool exclude_from_indexes = 19;
*
* @return The excludeFromIndexes.
*/
@java.lang.Override
public boolean getExcludeFromIndexes() {
return excludeFromIndexes_;
}
/**
*
*
*
* If the value should be excluded from all indexes including those defined
* explicitly.
*
*
* bool exclude_from_indexes = 19;
*
* @param value The excludeFromIndexes to set.
* @return This builder for chaining.
*/
public Builder setExcludeFromIndexes(boolean value) {
excludeFromIndexes_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* If the value should be excluded from all indexes including those defined
* explicitly.
*
*
* bool exclude_from_indexes = 19;
*
* @return This builder for chaining.
*/
public Builder clearExcludeFromIndexes() {
bitField0_ = (bitField0_ & ~0x00001000);
excludeFromIndexes_ = false;
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.datastore.v1.Value)
}
// @@protoc_insertion_point(class_scope:google.datastore.v1.Value)
private static final com.google.datastore.v1.Value DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.datastore.v1.Value();
}
public static com.google.datastore.v1.Value getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.datastore.v1.Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy