Firestore API - Class SetOptions (3.5.0)

public sealed class SetOptions

Reference documentation and code samples for the Firestore API class SetOptions.

Immutable class representing options for Set operations.

Inheritance

object > SetOptions

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Properties

FieldMask

public IReadOnlyList<FieldPath> FieldMask { get; }

The fields to merge. This property is never null; if the mask is empty, all fields will be merged or overwritten.

Property Value
TypeDescription
IReadOnlyListFieldPath

Merge

public bool Merge { get; }

Whether or not to merge values. If FieldMask is non-empty, this is always true.

Property Value
TypeDescription
bool

MergeAll

public static SetOptions MergeAll { get; }

Returns an instance that merges all fields.

Property Value
TypeDescription
SetOptions

Overwrite

public static SetOptions Overwrite { get; }

Returns an instance that overwrites the target object. This is the default when no options are provided.

Property Value
TypeDescription
SetOptions

Methods

MergeFields(params FieldPath[])

public static SetOptions MergeFields(params FieldPath[] fieldMask)

Returns an instance that merges the given fields.

Parameter
NameDescription
fieldMaskFieldPath

The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any null elements.

Returns
TypeDescription
SetOptions

An instance that merges the given fields.

MergeFields(params string[])

public static SetOptions MergeFields(params string[] fieldMask)

Returns an instance that merges the given fields.

Parameter
NameDescription
fieldMaskstring

The fields to merge. An empty array is equivalent to using MergeAll. Must not be null or contain any empty or null elements. Each field is treated as a dot-separated list of segments.

Returns
TypeDescription
SetOptions

An instance that merges the given fields.