Google Cloud Datastore v1 API - Class Value (4.11.0)

public sealed class Value : IMessage<Value>, IEquatable<Value>, IDeepCloneable<Value>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Datastore v1 API class Value.

A message that can hold any of the supported value types and associated metadata.

Inheritance

object > Value

Namespace

Google.Cloud.Datastore.V1

Assembly

Google.Cloud.Datastore.V1.dll

Constructors

Value()

public Value()

Value(Value)

public Value(Value other)
Parameter
Name Description
other Value

Properties

ArrayValue

public ArrayValue ArrayValue { get; set; }

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.

Property Value
Type Description
ArrayValue

BlobValue

public ByteString BlobValue { get; set; }

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.

Property Value
Type Description
ByteString

BooleanValue

public bool BooleanValue { get; set; }

A boolean value.

Property Value
Type Description
bool

DoubleValue

public double DoubleValue { get; set; }

A double value.

Property Value
Type Description
double

EntityValue

public Entity EntityValue { get; set; }

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.
Property Value
Type Description
Entity

ExcludeFromIndexes

public bool ExcludeFromIndexes { get; set; }

If the value should be excluded from all indexes including those defined explicitly.

Property Value
Type Description
bool

GeoPointValue

public LatLng GeoPointValue { get; set; }

A geo point value representing a point on the surface of Earth.

Property Value
Type Description
LatLng

HasBlobValue

public bool HasBlobValue { get; }

Gets whether the "blob_value" field is set

Property Value
Type Description
bool

HasBooleanValue

public bool HasBooleanValue { get; }

Gets whether the "boolean_value" field is set

Property Value
Type Description
bool

HasDoubleValue

public bool HasDoubleValue { get; }

Gets whether the "double_value" field is set

Property Value
Type Description
bool

HasIntegerValue

public bool HasIntegerValue { get; }

Gets whether the "integer_value" field is set

Property Value
Type Description
bool

HasNullValue

public bool HasNullValue { get; }

Gets whether the "null_value" field is set

Property Value
Type Description
bool

HasStringValue

public bool HasStringValue { get; }

Gets whether the "string_value" field is set

Property Value
Type Description
bool

IntegerValue

public long IntegerValue { get; set; }

An integer value.

Property Value
Type Description
long

IsNull

public bool IsNull { get; }

Convenience property to determine whether this value has a type of NullValue.

Property Value
Type Description
bool

true if the type is NullValue; false otherwise.

KeyValue

public Key KeyValue { get; set; }

A key value.

Property Value
Type Description
Key

Meaning

public int Meaning { get; set; }

The meaning field should only be populated for backwards compatibility.

Property Value
Type Description
int

NullValue

public NullValue NullValue { get; set; }

A null value.

Property Value
Type Description
NullValue

StringValue

public string StringValue { get; set; }

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.

Property Value
Type Description
string

TimestampValue

public Timestamp TimestampValue { get; set; }

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

Property Value
Type Description
Timestamp

ValueTypeCase

public Value.ValueTypeOneofCase ValueTypeCase { get; }
Property Value
Type Description
ValueValueTypeOneofCase

Methods

ForNull()

public static Value ForNull()

Creates a new Value with a type of NullValue.

Returns
Type Description
Value

A value with a type of NullValue.

ToDateTimeFromProjection()

public DateTime ToDateTimeFromProjection()

Converts this value to a DateTime, if it's either a timestamp value or a 64-bit integer value. This method is intended to be used if the value may have been returned from a projection, where timestamps are converted into integers in the form of a number of microseconds since the Unix epoch.

Returns
Type Description
DateTime

The converted value.

ToDateTimeOffsetFromProjection()

public DateTimeOffset ToDateTimeOffsetFromProjection()

Converts this value to a DateTimeOffset, if it's either a timestamp value or a 64-bit integer value. This method is intended to be used if the value may have been returned from a projection, where timestamps are converted into integers in the form of a number of microseconds since the Unix epoch.

Returns
Type Description
DateTimeOffset

The converted value.

Operators

explicit operator ArrayValue(Value)

public static explicit operator ArrayValue(Value value)

Extracts the array value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
ArrayValue

The embedded ArrayValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator ArrayValue[](Value)

public static explicit operator ArrayValue[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
ArrayValue

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Entity(Value)

public static explicit operator Entity(Value value)

Extracts the array value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Entity

The embedded EntityValue, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator Entity[](Value)

public static explicit operator Entity[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Entity

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Key(Value)

public static explicit operator Key(Value value)

Extracts the key value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Key

The embedded KeyValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator Key[](Value)

public static explicit operator Key[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Key

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Value[](Value)

public static explicit operator Value[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Value

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array.

explicit operator ByteString(Value)

public static explicit operator ByteString(Value value)

Extracts the blob value from a Value as a ByteString.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
ByteString

The embedded BlobValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator ByteString[](Value)

public static explicit operator ByteString[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
ByteString

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Timestamp(Value)

public static explicit operator Timestamp(Value value)

Extracts the timestamp value from a Value as a Timestamp.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Timestamp

The embedded TimestampValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator Timestamp[](Value)

public static explicit operator Timestamp[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
Timestamp

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator LatLng(Value)

public static explicit operator LatLng(Value value)

Extracts the geolocation value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
LatLng

The embedded GeoPointValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator LatLng[](Value)

public static explicit operator LatLng[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
LatLng

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator bool(Value)

public static explicit operator bool(Value value)

Extracts the Boolean value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
bool

The embedded BooleanValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator bool[](Value)

public static explicit operator bool[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
bool

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator byte[](Value)

public static explicit operator byte[](Value value)

Extracts the blob value from a Value as a byte array

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
byte

The embedded BlobValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator byte[][](Value)

public static explicit operator byte[][](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
byte

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime(Value)

public static explicit operator DateTime(Value value)

Extracts the timestamp value from a Value as a DateTime.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTime

The embedded TimestampValue as a DateTime with a DateTimeKind of Utc.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator DateTimeOffset(Value)

public static explicit operator DateTimeOffset(Value value)

Extracts the timestamp value from a Value as a DateTimeOffset.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTimeOffset

The embedded TimestampValue as a DateTimeOffset with an offset of zero.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator DateTimeOffset[](Value)

public static explicit operator DateTimeOffset[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTimeOffset

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime[](Value)

public static explicit operator DateTime[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTime

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator double(Value)

public static explicit operator double(Value value)

Extracts the floating point value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
double

The embedded DoubleValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator double[](Value)

public static explicit operator double[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
double

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator long(Value)

public static explicit operator long(Value value)

Extracts the integer value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
long

The embedded IntegerValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator long[](Value)

public static explicit operator long[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
long

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator bool?(Value)

public static explicit operator bool?(Value value)

Extracts the Boolean value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
bool

The embedded BooleanValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator bool?[](Value)

public static explicit operator bool?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
bool

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTimeOffset?(Value)

public static explicit operator DateTimeOffset?(Value value)

Extracts the timestamp value from a Value as a nullable DateTimeOffset.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTimeOffset

The embedded TimestampValue as a DateTimeOffset with an offset of zero, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator DateTimeOffset?[](Value)

public static explicit operator DateTimeOffset?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTimeOffset

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime?(Value)

public static explicit operator DateTime?(Value value)

Extracts the timestamp value from a Value as a nullable DateTime.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTime

The embedded TimestampValue as a DateTime with a DateTimeKind of Utc, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator DateTime?[](Value)

public static explicit operator DateTime?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
DateTime

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator double?(Value)

public static explicit operator double?(Value value)

Extracts the floating point value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
double

The embedded DoubleValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator double?[](Value)

public static explicit operator double?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
double

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator long?(Value)

public static explicit operator long?(Value value)

Extracts the integer value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
long

The embedded IntegerValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator long?[](Value)

public static explicit operator long?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
long

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator string(Value)

public static explicit operator string(Value value)

Extracts the string value from a Value.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
string

The embedded StringValue, or null if value is null or has a kind of NullValue.

Exceptions
Type Description
InvalidOperationException

The value does not have the expected kind.

explicit operator string[](Value)

public static explicit operator string[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
Name Description
value Value

The value to convert.

Returns
Type Description
string

The converted array, or null if value is null.

Exceptions
Type Description
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

implicit operator Value(ArrayValue)

public static implicit operator Value(ArrayValue value)

Returns a Value with a kind of ArrayValue and the given data, or a null reference of value is null.

Parameter
Name Description
value ArrayValue

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(ArrayValue[])

public static implicit operator Value(ArrayValue[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values ArrayValue

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Entity)

public static implicit operator Value(Entity value)

Returns a Value with a kind of EntityValue and the given data, or a null reference of value is null.

Parameter
Name Description
value Entity

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(Entity[])

public static implicit operator Value(Entity[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values Entity

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Key)

public static implicit operator Value(Key value)

Returns a Value with a kind of KeyValue and the given data, or a null reference of value is null.

Parameter
Name Description
value Key

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(Key[])

public static implicit operator Value(Key[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values Key

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Value[])

public static implicit operator Value(Value[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values Value

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(ByteString)

public static implicit operator Value(ByteString value)

Returns a Value with a kind of BlobValue and the given data, or a null reference of value is null.

Parameter
Name Description
value ByteString

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(ByteString[])

public static implicit operator Value(ByteString[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values ByteString

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Timestamp)

public static implicit operator Value(Timestamp value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
Name Description
value Timestamp

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(Timestamp[])

public static implicit operator Value(Timestamp[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values Timestamp

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(LatLng)

public static implicit operator Value(LatLng value)

Returns a Value with a kind of GeoPointValue and the given data, or a null reference of value is null.

Parameter
Name Description
value LatLng

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(LatLng[])

public static implicit operator Value(LatLng[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values LatLng

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(bool)

public static implicit operator Value(bool value)

Returns a Value with a kind of BooleanValue and the given data.

Parameter
Name Description
value bool

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(bool[])

public static implicit operator Value(bool[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values bool

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(byte[])

public static implicit operator Value(byte[] value)

Returns a Value with a kind of BlobValue and the given data, or a null reference of value is null.

Parameter
Name Description
value byte

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(byte[][])

public static implicit operator Value(byte[][] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values byte

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime)

public static implicit operator Value(DateTime value)

Returns a Value with a kind of TimestampValue and the given data.

Parameter
Name Description
value DateTime

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset)

public static implicit operator Value(DateTimeOffset value)

Returns a Value with a kind of TimestampValue and the given data.

Parameter
Name Description
value DateTimeOffset

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset[])

public static implicit operator Value(DateTimeOffset[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values DateTimeOffset

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime[])

public static implicit operator Value(DateTime[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values DateTime

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(double)

public static implicit operator Value(double value)

Returns a Value with a kind of DoubleValue and the given data.

Parameter
Name Description
value double

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(double[])

public static implicit operator Value(double[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values double

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(long)

public static implicit operator Value(long value)

Returns a Value with a kind of IntegerValue and the given data.

Parameter
Name Description
value long

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(long[])

public static implicit operator Value(long[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values long

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(bool?)

public static implicit operator Value(bool? value)

Returns a Value with a kind of BooleanValue and the given data, or a null reference of value is null.

Parameter
Name Description
value bool

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(bool?[])

public static implicit operator Value(bool?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values bool

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTimeOffset?)

public static implicit operator Value(DateTimeOffset? value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
Name Description
value DateTimeOffset

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset?[])

public static implicit operator Value(DateTimeOffset?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values DateTimeOffset

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime?)

public static implicit operator Value(DateTime? value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
Name Description
value DateTime

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(DateTime?[])

public static implicit operator Value(DateTime?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values DateTime

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(double?)

public static implicit operator Value(double? value)

Returns a Value with a kind of DoubleValue and the given data, or a null reference of value is null.

Parameter
Name Description
value double

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(double?[])

public static implicit operator Value(double?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values double

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(long?)

public static implicit operator Value(long? value)

Returns a Value with a kind of IntegerValue and the given data, or a null reference of value is null.

Parameter
Name Description
value long

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(long?[])

public static implicit operator Value(long?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values long

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

implicit operator Value(string)

public static implicit operator Value(string value)

Returns a Value with a kind of StringValue and the given data, or a null reference of value is null.

Parameter
Name Description
value string

The value to convert.

Returns
Type Description
Value

A Value corresponding to value.

implicit operator Value(string[])

public static implicit operator Value(string[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
Name Description
values string

The array to convert.

Returns
Type Description
Value

The converted array as a Value, or null if values is null.

Extension Method