static Builder newBuilder(com.google.datastore.v1.Value valuePb) { Builder builder = new Builder(); builder.setExcludeFromIndexes(valuePb.getExcludeFromIndexes()); builder.setMeaning(valuePb.getMeaning()); builder.set(valuePb); return builder; } }
@SuppressWarnings("deprecation") @Override public final B fromProto(com.google.datastore.v1.Value proto) { B builder = newBuilder(getValue(proto)); builder.setExcludeFromIndexes(proto.getExcludeFromIndexes()); builder.setMeaning(proto.getMeaning()); return builder; }
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());
result = result && (getMeaning() == other.getMeaning()); result = result && (getExcludeFromIndexes() == other.getExcludeFromIndexes()); result = result && getValueTypeCase().equals(other.getValueTypeCase());
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());
/** * @return the blob contained in value * @throws IllegalArgumentException if the value does not contain a blob. */ public static ByteString getByteString(Value value) { if (value.getMeaning() == 18 && value.getValueTypeCase() == ValueTypeCase.STRING_VALUE) { return value.getStringValueBytes(); } else if (value.getValueTypeCase() == ValueTypeCase.BLOB_VALUE) { return value.getBlobValue(); } throw new IllegalArgumentException("Value does not contain a blob."); }
/** * @return the blob contained in value * @throws IllegalArgumentException if the value does not contain a blob. */ public static ByteString getByteString(Value value) { if (value.getMeaning() == 18 && value.getValueTypeCase() == ValueTypeCase.STRING_VALUE) { return value.getStringValueBytes(); } else if (value.getValueTypeCase() == ValueTypeCase.BLOB_VALUE) { return value.getBlobValue(); } throw new IllegalArgumentException("Value does not contain a blob."); }
/** * @return the timestamp in microseconds contained in value * @throws IllegalArgumentException if the value does not contain a timestamp. */ public static long getTimestamp(Value value) { if (value.getMeaning() == 18 && value.getValueTypeCase() == ValueTypeCase.INTEGER_VALUE) { return value.getIntegerValue(); } else if (value.getValueTypeCase() == ValueTypeCase.TIMESTAMP_VALUE) { return toMicroseconds(value.getTimestampValue()); } throw new IllegalArgumentException("Value does not contain a timestamp."); }
/** * @return the timestamp in microseconds contained in value * @throws IllegalArgumentException if the value does not contain a timestamp. */ public static long getTimestamp(Value value) { if (value.getMeaning() == 18 && value.getValueTypeCase() == ValueTypeCase.INTEGER_VALUE) { return value.getIntegerValue(); } else if (value.getValueTypeCase() == ValueTypeCase.TIMESTAMP_VALUE) { return toMicroseconds(value.getTimestampValue()); } throw new IllegalArgumentException("Value does not contain a timestamp."); }
static Builder newBuilder(com.google.datastore.v1.Value valuePb) { Builder builder = new Builder(); builder.setExcludeFromIndexes(valuePb.getExcludeFromIndexes()); builder.setMeaning(valuePb.getMeaning()); builder.set(valuePb); return builder; } }
@SuppressWarnings("deprecation") @Override public final B fromProto(com.google.datastore.v1.Value proto) { B builder = newBuilder(getValue(proto)); builder.setExcludeFromIndexes(proto.getExcludeFromIndexes()); builder.setMeaning(proto.getMeaning()); return builder; }
hash = (19 * hash) + getDescriptorForType().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(
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());
result = result && (getMeaning() == other.getMeaning()); result = result && (getExcludeFromIndexes() == other.getExcludeFromIndexes()); result = result && getValueTypeCase().equals(other.getValueTypeCase());
result = result && (getMeaning() == other.getMeaning()); result = result && (getExcludeFromIndexes() == other.getExcludeFromIndexes());
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());
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());