/** * * * <pre> * 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`. * </pre> * * <code>.google.datastore.v1.ArrayValue array_value = 9;</code> */ 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; } /**
/** * Set a list of values for this {@code Value}. * <p> * The supplied value items must comply with the data types supported by Datastore. * * @param values a list of values to set. * @return this value builder. * @throws IllegalArgumentException if supplied {@code values} contains types * that are not recognised. */ public Builder value(final List<Object> values) { final ArrayValue arrayValues = ArrayValue .newBuilder() .addAllValues( values .stream() .map(v -> Value.builder(v).build().getPb()).collect(Collectors.toList())) .build(); this.value.setArrayValue(arrayValues); return this; }
/** * <pre> * 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`. * </pre> * * <code>optional .google.datastore.v1.ArrayValue array_value = 9;</code> */ 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; } /**
v = Value.newBuilder().setArrayValue(arrayValueBuilder.build()).build();
/** * * * <pre> * 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`. * </pre> * * <code>.google.datastore.v1.ArrayValue array_value = 9;</code> */ 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; } /**