1# -*- coding: utf-8 -*-
2# Copyright 2025 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16from __future__ import annotations
17
18from typing import MutableMapping, MutableSequence
19
20import proto # type: ignore
21
22from google.cloud.firestore_v1.types import document
23
24
25__protobuf__ = proto.module(
26 package="google.firestore.v1",
27 manifest={
28 "StructuredPipeline",
29 },
30)
31
32
33class StructuredPipeline(proto.Message):
34 r"""A Firestore query represented as an ordered list of operations /
35 stages.
36
37 This is considered the top-level function which plans and executes a
38 query. It is logically equivalent to ``query(stages, options)``, but
39 prevents the client from having to build a function wrapper.
40
41 Attributes:
42 pipeline (google.cloud.firestore_v1.types.Pipeline):
43 Required. The pipeline query to execute.
44 options (MutableMapping[str, google.cloud.firestore_v1.types.Value]):
45 Optional. Optional query-level arguments.
46 """
47
48 pipeline: document.Pipeline = proto.Field(
49 proto.MESSAGE,
50 number=1,
51 message=document.Pipeline,
52 )
53 options: MutableMapping[str, document.Value] = proto.MapField(
54 proto.STRING,
55 proto.MESSAGE,
56 number=2,
57 message=document.Value,
58 )
59
60
61__all__ = tuple(sorted(__protobuf__.manifest))