NAME

Google::Firestore::V1::Document - Compiled Protocol Buffers messages for google/firestore/v1/document.proto

SYNOPSIS

use Google::Firestore::V1::Document;

my $msg = Google::Firestore::V1::Document::Document->new({
    name => $name,
    fields => $fields,
    create_time => $create_time,
    update_time => $update_time,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Firestore::V1::Document::Document->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/firestore/v1/document.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Firestore::V1::Document::Document

A Firestore document.

Must not exceed 1 MiB - 4 bytes.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.

  • $msg->fields() / $msg->fields($value)

    Type: Message (Google::Firestore::V1::Document::Document::FieldsEntry)

    The document's fields.

    The map keys represent field names.

    Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

    Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `` foo.`x&y` ``.

    A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`.

    A quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``.

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The time at which the document was created.

    This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query.

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. The time at which the document was last changed.

    This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query.

Google::Firestore::V1::Document::Value

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

Inherits from Protobuf::Message.

Accessors

  • $msg->null_value() / $msg->null_value($value)

    Type: Enum (Google::Protobuf::NullValue)

    A null value.

  • $msg->boolean_value() / $msg->boolean_value($value)

    Type: Bool

    A boolean value.

  • $msg->integer_value() / $msg->integer_value($value)

    Type: Int64

    An integer value.

  • $msg->double_value() / $msg->double_value($value)

    Type: Double

    A double value.

  • $msg->timestamp_value() / $msg->timestamp_value($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    A timestamp value.

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

  • $msg->string_value() / $msg->string_value($value)

    Type: String

    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.

  • $msg->bytes_value() / $msg->bytes_value($value)

    Type: Bytes

    A bytes value.

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

  • $msg->reference_value() / $msg->reference_value($value)

    Type: String

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

  • $msg->geo_point_value() / $msg->geo_point_value($value)

    Type: Message (Google::Type::Latlng::LatLng)

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

  • $msg->array_value() / $msg->array_value($value)

    Type: Message (Google::Firestore::V1::Document::ArrayValue)

    An array value.

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

  • $msg->map_value() / $msg->map_value($value)

    Type: Message (Google::Firestore::V1::Document::MapValue)

    A map value.

  • $msg->field_reference_value() / $msg->field_reference_value($value)

    Type: String

    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.

  • $msg->variable_reference_value() / $msg->variable_reference_value($value)

    Type: String

    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.

  • $msg->function_value() / $msg->function_value($value)

    Type: Message (Google::Firestore::V1::Document::Function)

    A value that represents an unevaluated expression.

    Requires:

    * Not allowed to be used when writing documents.

  • $msg->pipeline_value() / $msg->pipeline_value($value)

    Type: Message (Google::Firestore::V1::Document::Pipeline)

    A value that represents an unevaluated pipeline.

    Requires:

    * Not allowed to be used when writing documents.

Google::Firestore::V1::Document::ArrayValue

An array value.

Inherits from Protobuf::Message.

Accessors

Google::Firestore::V1::Document::MapValue

A map value.

Inherits from Protobuf::Message.

Accessors

  • $msg->fields() / $msg->fields($value)

    Type: Message (Google::Firestore::V1::Document::MapValue::FieldsEntry)

    The map's fields.

    The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

Google::Firestore::V1::Document::Function

Represents an unevaluated scalar expression.

For example, the expression `like(user_name, "%alice%")` is represented as:

``` name: "like" args { field_reference: "user_name" } args { string_value: "%alice%" } ```

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the function to evaluate.

    Requires:

    * must be in snake case (lower case with underscore separator).

  • $msg->args() / $msg->args($value)

    Type: Message (Google::Firestore::V1::Document::Value)

    Optional. Ordered list of arguments the given function expects.

  • $msg->options() / $msg->options($value)

    Type: Message (Google::Firestore::V1::Document::Function::OptionsEntry)

    Optional. Optional named arguments that certain functions may support.

Google::Firestore::V1::Document::Pipeline

A Firestore query represented as an ordered list of operations / stages.

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Firestore::V1::Document::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.