4.6.0 (latest) 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.1 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0

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

Reference documentation and code samples for the Firestore v1 API class Value.

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Value

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Value), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Value), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Value), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Firestore.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)

## Assembly

Google.Cloud.Firestore.V1.dll

## Constructors

### Value()

    public Value()

### Value(Value)

    public Value(Value other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Value` |

## Properties

### ArrayValue

    public ArrayValue ArrayValue { get; set; }

An array value.

Cannot directly contain another array value, though can contain a
map which contains another array.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.ArrayValue` |   |

### BooleanValue

    public bool BooleanValue { get; set; }

A boolean value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### BytesValue

    public ByteString BytesValue { get; set; }

A bytes value.

Must not exceed 1 MiB - 89 bytes.
Only the first 1,500 bytes are considered by queries.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ByteString.html` |   |

### DoubleValue

    public double DoubleValue { get; set; }

A double value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.double` |   |

### FieldReferenceValue

    public string FieldReferenceValue { get; set; }

Value which references a field.

This is considered relative (vs absolute) since it only refers to a field
and not a field within a particular document.

**Requires:**

- Must follow \[field reference\]\[FieldReference.field_path\] limitations.

- Not allowed to be used when writing documents.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### FunctionValue

    public Function FunctionValue { get; set; }

A value that represents an unevaluated expression.

**Requires:**

- Not allowed to be used when writing documents.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Function` |   |

### GeoPointValue

    public LatLng GeoPointValue { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Type.LatLng.html` |   |

### HasBooleanValue

    public bool HasBooleanValue { get; }

Gets whether the "boolean_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasBytesValue

    public bool HasBytesValue { get; }

Gets whether the "bytes_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasDoubleValue

    public bool HasDoubleValue { get; }

Gets whether the "double_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasFieldReferenceValue

    public bool HasFieldReferenceValue { get; }

Gets whether the "field_reference_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasIntegerValue

    public bool HasIntegerValue { get; }

Gets whether the "integer_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasNullValue

    public bool HasNullValue { get; }

Gets whether the "null_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasReferenceValue

    public bool HasReferenceValue { get; }

Gets whether the "reference_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasStringValue

    public bool HasStringValue { get; }

Gets whether the "string_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasVariableReferenceValue

    public bool HasVariableReferenceValue { get; }

Gets whether the "variable_reference_value" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### IntegerValue

    public long IntegerValue { get; set; }

An integer value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### MapValue

    public MapValue MapValue { get; set; }

A map value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.MapValue` |   |

### NullValue

    public NullValue NullValue { get; set; }

A null value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.NullValue.html` |   |

### PipelineValue

    public Pipeline PipelineValue { get; set; }

A value that represents an unevaluated pipeline.

**Requires:**

- Not allowed to be used when writing documents.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Pipeline` |   |

### ReferenceValue

    public string ReferenceValue { get; set; }

A reference to a document. For example:
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### StringValue

    public string StringValue { get; set; }

A string value.

The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
Only the first 1,500 bytes of the UTF-8 representation are considered by
queries.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### TimestampValue

    public Timestamp TimestampValue { get; set; }

A timestamp value.

Precise only to microseconds. When stored, any additional precision is
rounded down.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### ValueTypeCase

    public Value.ValueTypeOneofCase ValueTypeCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Valuehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.Value.ValueTypeOneofCase` |   |

### VariableReferenceValue

    public string VariableReferenceValue { get; set; }

Pointer to a variable defined elsewhere in a pipeline.

Unlike `field_reference_value` which references a field within a
document, this refers to a variable, defined in a separate namespace than
the fields of a document.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |