google-cloud-firestore 1.4.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +23 -0
  4. data/lib/google-cloud-firestore.rb +14 -21
  5. data/lib/google/cloud/firestore.rb +12 -23
  6. data/lib/google/cloud/firestore/client.rb +12 -14
  7. data/lib/google/cloud/firestore/collection_reference.rb +1 -0
  8. data/lib/google/cloud/firestore/collection_reference_list.rb +137 -0
  9. data/lib/google/cloud/firestore/convert.rb +39 -39
  10. data/lib/google/cloud/firestore/credentials.rb +2 -2
  11. data/lib/google/cloud/firestore/document_reference.rb +8 -8
  12. data/lib/google/cloud/firestore/document_reference/list.rb +2 -2
  13. data/lib/google/cloud/firestore/document_snapshot.rb +4 -4
  14. data/lib/google/cloud/firestore/query.rb +4 -4
  15. data/lib/google/cloud/firestore/service.rb +63 -104
  16. data/lib/google/cloud/firestore/transaction.rb +2 -2
  17. data/lib/google/cloud/firestore/version.rb +1 -1
  18. data/lib/google/cloud/firestore/watch/listener.rb +9 -9
  19. data/lib/google/cloud/firestore/watch/order.rb +1 -1
  20. metadata +9 -107
  21. data/lib/google/cloud/firestore/admin.rb +0 -144
  22. data/lib/google/cloud/firestore/admin/v1.rb +0 -151
  23. data/lib/google/cloud/firestore/admin/v1/credentials.rb +0 -44
  24. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/field.rb +0 -86
  25. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/firestore_admin.rb +0 -161
  26. data/lib/google/cloud/firestore/admin/v1/doc/google/firestore/admin/v1/index.rb +0 -142
  27. data/lib/google/cloud/firestore/admin/v1/doc/google/longrunning/operations.rb +0 -51
  28. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/any.rb +0 -131
  29. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/empty.rb +0 -29
  30. data/lib/google/cloud/firestore/admin/v1/doc/google/protobuf/field_mask.rb +0 -222
  31. data/lib/google/cloud/firestore/admin/v1/doc/google/rpc/status.rb +0 -39
  32. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client.rb +0 -902
  33. data/lib/google/cloud/firestore/admin/v1/firestore_admin_client_config.json +0 -76
  34. data/lib/google/cloud/firestore/v1.rb +0 -152
  35. data/lib/google/cloud/firestore/v1/credentials.rb +0 -42
  36. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/common.rb +0 -64
  37. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/document.rb +0 -136
  38. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb +0 -566
  39. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/query.rb +0 -227
  40. data/lib/google/cloud/firestore/v1/doc/google/firestore/v1/write.rb +0 -241
  41. data/lib/google/cloud/firestore/v1/doc/google/protobuf/any.rb +0 -131
  42. data/lib/google/cloud/firestore/v1/doc/google/protobuf/empty.rb +0 -29
  43. data/lib/google/cloud/firestore/v1/doc/google/protobuf/timestamp.rb +0 -113
  44. data/lib/google/cloud/firestore/v1/doc/google/protobuf/wrappers.rb +0 -26
  45. data/lib/google/cloud/firestore/v1/doc/google/rpc/status.rb +0 -39
  46. data/lib/google/cloud/firestore/v1/firestore_client.rb +0 -1011
  47. data/lib/google/cloud/firestore/v1/firestore_client_config.json +0 -105
  48. data/lib/google/cloud/firestore/v1beta1.rb +0 -162
  49. data/lib/google/cloud/firestore/v1beta1/credentials.rb +0 -42
  50. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/common.rb +0 -64
  51. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/document.rb +0 -136
  52. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/firestore.rb +0 -564
  53. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/query.rb +0 -227
  54. data/lib/google/cloud/firestore/v1beta1/doc/google/firestore/v1beta1/write.rb +0 -237
  55. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/any.rb +0 -131
  56. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/empty.rb +0 -29
  57. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  58. data/lib/google/cloud/firestore/v1beta1/doc/google/protobuf/wrappers.rb +0 -26
  59. data/lib/google/cloud/firestore/v1beta1/doc/google/rpc/status.rb +0 -39
  60. data/lib/google/cloud/firestore/v1beta1/firestore_client.rb +0 -1021
  61. data/lib/google/cloud/firestore/v1beta1/firestore_client_config.json +0 -100
  62. data/lib/google/firestore/admin/v1/field_pb.rb +0 -32
  63. data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +0 -84
  64. data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +0 -94
  65. data/lib/google/firestore/admin/v1/index_pb.rb +0 -58
  66. data/lib/google/firestore/admin/v1/location_pb.rb +0 -22
  67. data/lib/google/firestore/admin/v1/operation_pb.rb +0 -90
  68. data/lib/google/firestore/v1/common_pb.rb +0 -45
  69. data/lib/google/firestore/v1/document_pb.rb +0 -50
  70. data/lib/google/firestore/v1/firestore_pb.rb +0 -222
  71. data/lib/google/firestore/v1/firestore_services_pb.rb +0 -80
  72. data/lib/google/firestore/v1/query_pb.rb +0 -107
  73. data/lib/google/firestore/v1/write_pb.rb +0 -80
  74. data/lib/google/firestore/v1beta1/common_pb.rb +0 -45
  75. data/lib/google/firestore/v1beta1/document_pb.rb +0 -50
  76. data/lib/google/firestore/v1beta1/firestore_pb.rb +0 -222
  77. data/lib/google/firestore/v1beta1/firestore_services_pb.rb +0 -89
  78. data/lib/google/firestore/v1beta1/query_pb.rb +0 -107
  79. data/lib/google/firestore/v1beta1/write_pb.rb +0 -79
@@ -1,105 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.firestore.v1.Firestore": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "INTERNAL",
8
- "UNAVAILABLE"
9
- ],
10
- "non_idempotent": [],
11
- "idempotent2": [
12
- "DEADLINE_EXCEEDED",
13
- "UNAVAILABLE"
14
- ]
15
- },
16
- "retry_params": {
17
- "default": {
18
- "initial_retry_delay_millis": 100,
19
- "retry_delay_multiplier": 1.3,
20
- "max_retry_delay_millis": 60000,
21
- "initial_rpc_timeout_millis": 60000,
22
- "rpc_timeout_multiplier": 1.0,
23
- "max_rpc_timeout_millis": 60000,
24
- "total_timeout_millis": 600000
25
- },
26
- "streaming": {
27
- "initial_retry_delay_millis": 100,
28
- "retry_delay_multiplier": 1.3,
29
- "max_retry_delay_millis": 60000,
30
- "initial_rpc_timeout_millis": 60000,
31
- "rpc_timeout_multiplier": 1.0,
32
- "max_rpc_timeout_millis": 60000,
33
- "total_timeout_millis": 600000
34
- }
35
- },
36
- "methods": {
37
- "GetDocument": {
38
- "timeout_millis": 60000,
39
- "retry_codes_name": "idempotent2",
40
- "retry_params_name": "default"
41
- },
42
- "ListDocuments": {
43
- "timeout_millis": 60000,
44
- "retry_codes_name": "idempotent2",
45
- "retry_params_name": "default"
46
- },
47
- "CreateDocument": {
48
- "timeout_millis": 60000,
49
- "retry_codes_name": "non_idempotent",
50
- "retry_params_name": "default"
51
- },
52
- "UpdateDocument": {
53
- "timeout_millis": 60000,
54
- "retry_codes_name": "non_idempotent",
55
- "retry_params_name": "default"
56
- },
57
- "DeleteDocument": {
58
- "timeout_millis": 60000,
59
- "retry_codes_name": "idempotent",
60
- "retry_params_name": "default"
61
- },
62
- "BatchGetDocuments": {
63
- "timeout_millis": 60000,
64
- "retry_codes_name": "idempotent",
65
- "retry_params_name": "streaming"
66
- },
67
- "BeginTransaction": {
68
- "timeout_millis": 60000,
69
- "retry_codes_name": "idempotent",
70
- "retry_params_name": "default"
71
- },
72
- "Commit": {
73
- "timeout_millis": 60000,
74
- "retry_codes_name": "non_idempotent",
75
- "retry_params_name": "default"
76
- },
77
- "Rollback": {
78
- "timeout_millis": 60000,
79
- "retry_codes_name": "idempotent",
80
- "retry_params_name": "default"
81
- },
82
- "RunQuery": {
83
- "timeout_millis": 60000,
84
- "retry_codes_name": "idempotent",
85
- "retry_params_name": "streaming"
86
- },
87
- "Write": {
88
- "timeout_millis": 60000,
89
- "retry_codes_name": "non_idempotent",
90
- "retry_params_name": "streaming"
91
- },
92
- "Listen": {
93
- "timeout_millis": 60000,
94
- "retry_codes_name": "idempotent",
95
- "retry_params_name": "streaming"
96
- },
97
- "ListCollectionIds": {
98
- "timeout_millis": 60000,
99
- "retry_codes_name": "idempotent",
100
- "retry_params_name": "default"
101
- }
102
- }
103
- }
104
- }
105
- }
@@ -1,162 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "google/cloud/firestore/v1beta1/firestore_client"
17
-
18
- module Google
19
- module Cloud
20
- module Firestore
21
- # rubocop:disable LineLength
22
-
23
- ##
24
- # @deprecated Use Google::Cloud::Firestore::V1 instead.
25
- #
26
- # # Ruby Client for Google Cloud Firestore API
27
- #
28
- # [Google Cloud Firestore API][Product Documentation]:
29
- #
30
- # - [Product Documentation][]
31
- #
32
- # ## Quick Start
33
- # In order to use this library, you first need to go through the following
34
- # steps:
35
- #
36
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
37
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
38
- # 3. [Enable the Google Cloud Firestore API.](https://console.cloud.google.com/apis/library/firestore.googleapis.com)
39
- # 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-firestore/latest/file.AUTHENTICATION.html)
40
- #
41
- # ### Installation
42
- # ```
43
- # $ gem install google-cloud-firestore
44
- # ```
45
- #
46
- # ### Next Steps
47
- # - Read the [Google Cloud Firestore API Product documentation][Product Documentation]
48
- # to learn more about the product and see How-to Guides.
49
- # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
50
- # to see the full list of Cloud APIs that we cover.
51
- #
52
- # [Product Documentation]: https://cloud.google.com/firestore
53
- #
54
- # ## Enabling Logging
55
- #
56
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
57
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
58
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
59
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
60
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
61
- #
62
- # Configuring a Ruby stdlib logger:
63
- #
64
- # ```ruby
65
- # require "logger"
66
- #
67
- # module MyLogger
68
- # LOGGER = Logger.new $stderr, level: Logger::WARN
69
- # def logger
70
- # LOGGER
71
- # end
72
- # end
73
- #
74
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
75
- # module GRPC
76
- # extend MyLogger
77
- # end
78
- # ```
79
- #
80
- module V1beta1
81
- # rubocop:enable LineLength
82
-
83
- ##
84
- # The Cloud Firestore service.
85
- #
86
- # This service exposes several types of comparable timestamps:
87
- #
88
- # * `create_time` - The time at which a document was created. Changes only
89
- # when a document is deleted, then re-created. Increases in a strict
90
- # monotonic fashion.
91
- # * `update_time` - The time at which a document was last updated. Changes
92
- # every time a document is modified. Does not change when a write results
93
- # in no modifications. Increases in a strict monotonic fashion.
94
- # * `read_time` - The time at which a particular state was observed. Used
95
- # to denote a consistent snapshot of the database or the time at which a
96
- # Document was observed to not exist.
97
- # * `commit_time` - The time at which the writes in a transaction were
98
- # committed. Any read with an equal or greater `read_time` is guaranteed
99
- # to see the effects of the transaction.
100
- #
101
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
102
- # Provides the means for authenticating requests made by the client. This parameter can
103
- # be many types.
104
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
105
- # authenticating requests made by this client.
106
- # A `String` will be treated as the path to the keyfile to be used for the construction of
107
- # credentials for this client.
108
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
109
- # credentials for this client.
110
- # A `GRPC::Core::Channel` will be used to make calls through.
111
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
112
- # should already be composed with a `GRPC::Core::CallCredentials` object.
113
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
114
- # metadata for requests, generally, to give OAuth credentials.
115
- # @param scopes [Array<String>]
116
- # The OAuth scopes for this service. This parameter is ignored if
117
- # an updater_proc is supplied.
118
- # @param client_config [Hash]
119
- # A Hash for call options for each method. See
120
- # Google::Gax#construct_settings for the structure of
121
- # this data. Falls back to the default config if not specified
122
- # or the specified config is missing data points.
123
- # @param timeout [Numeric]
124
- # The default timeout, in seconds, for calls made through this client.
125
- # @param metadata [Hash]
126
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
127
- # @param service_address [String]
128
- # Override for the service hostname, or `nil` to leave as the default.
129
- # @param service_port [Integer]
130
- # Override for the service port, or `nil` to leave as the default.
131
- # @param exception_transformer [Proc]
132
- # An optional proc that intercepts any exceptions raised during an API call to inject
133
- # custom error handling.
134
- def self.new \
135
- credentials: nil,
136
- scopes: nil,
137
- client_config: nil,
138
- timeout: nil,
139
- metadata: nil,
140
- service_address: nil,
141
- service_port: nil,
142
- exception_transformer: nil,
143
- lib_name: nil,
144
- lib_version: nil
145
- kwargs = {
146
- credentials: credentials,
147
- scopes: scopes,
148
- client_config: client_config,
149
- timeout: timeout,
150
- metadata: metadata,
151
- exception_transformer: exception_transformer,
152
- lib_name: lib_name,
153
- service_address: service_address,
154
- service_port: service_port,
155
- lib_version: lib_version
156
- }.select { |_, v| v != nil }
157
- Google::Cloud::Firestore::V1beta1::FirestoreClient.new(**kwargs)
158
- end
159
- end
160
- end
161
- end
162
- end
@@ -1,42 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Firestore
21
- module V1beta1
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform",
25
- "https://www.googleapis.com/auth/datastore"
26
- ].freeze
27
- PATH_ENV_VARS = %w(FIRESTORE_CREDENTIALS
28
- FIRESTORE_KEYFILE
29
- GOOGLE_CLOUD_CREDENTIALS
30
- GOOGLE_CLOUD_KEYFILE
31
- GCLOUD_KEYFILE)
32
- JSON_ENV_VARS = %w(FIRESTORE_CREDENTIALS_JSON
33
- FIRESTORE_KEYFILE_JSON
34
- GOOGLE_CLOUD_CREDENTIALS_JSON
35
- GOOGLE_CLOUD_KEYFILE_JSON
36
- GCLOUD_KEYFILE_JSON)
37
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
38
- end
39
- end
40
- end
41
- end
42
- end
@@ -1,64 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Firestore
18
- module V1beta1
19
- # A set of field paths on a document.
20
- # Used to restrict a get or update operation on a document to a subset of its
21
- # fields.
22
- # This is different from standard field masks, as this is always scoped to a
23
- # {Google::Firestore::V1beta1::Document Document}, and takes in account the dynamic nature of {Google::Firestore::V1beta1::Value Value}.
24
- # @!attribute [rw] field_paths
25
- # @return [Array<String>]
26
- # The list of field paths in the mask. See {Google::Firestore::V1beta1::Document#fields Document#fields} for a field
27
- # path syntax reference.
28
- class DocumentMask; end
29
-
30
- # A precondition on a document, used for conditional operations.
31
- # @!attribute [rw] exists
32
- # @return [true, false]
33
- # When set to `true`, the target document must exist.
34
- # When set to `false`, the target document must not exist.
35
- # @!attribute [rw] update_time
36
- # @return [Google::Protobuf::Timestamp]
37
- # When set, the target document must exist and have been last updated at
38
- # that time.
39
- class Precondition; end
40
-
41
- # Options for creating a new transaction.
42
- # @!attribute [rw] read_only
43
- # @return [Google::Firestore::V1beta1::TransactionOptions::ReadOnly]
44
- # The transaction can only be used for read operations.
45
- # @!attribute [rw] read_write
46
- # @return [Google::Firestore::V1beta1::TransactionOptions::ReadWrite]
47
- # The transaction can be used for both read and write operations.
48
- class TransactionOptions
49
- # Options for a transaction that can be used to read and write documents.
50
- # @!attribute [rw] retry_transaction
51
- # @return [String]
52
- # An optional transaction to retry.
53
- class ReadWrite; end
54
-
55
- # Options for a transaction that can only be used to read documents.
56
- # @!attribute [rw] read_time
57
- # @return [Google::Protobuf::Timestamp]
58
- # Reads documents at the given time.
59
- # This may not be older than 60 seconds.
60
- class ReadOnly; end
61
- end
62
- end
63
- end
64
- end
@@ -1,136 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Firestore
18
- module V1beta1
19
- # A Firestore document.
20
- #
21
- # Must not exceed 1 MiB - 4 bytes.
22
- # @!attribute [rw] name
23
- # @return [String]
24
- # The resource name of the document, for example
25
- # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
26
- # @!attribute [rw] fields
27
- # @return [Hash{String => Google::Firestore::V1beta1::Value}]
28
- # The document's fields.
29
- #
30
- # The map keys represent field names.
31
- #
32
- # A simple field name contains only characters `a` to `z`, `A` to `Z`,
33
- # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
34
- # `foo_bar_17`.
35
- #
36
- # Field names matching the regular expression `__.*__` are reserved. Reserved
37
- # field names are forbidden except in certain documented contexts. The map
38
- # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
39
- # empty.
40
- #
41
- # Field paths may be used in other contexts to refer to structured fields
42
- # defined here. For `map_value`, the field path is represented by the simple
43
- # or quoted field names of the containing fields, delimited by `.`. For
44
- # example, the structured field
45
- # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
46
- # represented by the field path `foo.x&y`.
47
- #
48
- # Within a field path, a quoted field name starts and ends with `` ` `` and
49
- # may contain any character. Some characters, including `` ` ``, must be
50
- # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
51
- # `` `bak\`tik` `` represents `` bak`tik ``.
52
- # @!attribute [rw] create_time
53
- # @return [Google::Protobuf::Timestamp]
54
- # Output only. The time at which the document was created.
55
- #
56
- # This value increases monotonically when a document is deleted then
57
- # recreated. It can also be compared to values from other documents and
58
- # the `read_time` of a query.
59
- # @!attribute [rw] update_time
60
- # @return [Google::Protobuf::Timestamp]
61
- # Output only. The time at which the document was last changed.
62
- #
63
- # This value is initially set to the `create_time` then increases
64
- # monotonically with each change to the document. It can also be
65
- # compared to values from other documents and the `read_time` of a query.
66
- class Document; end
67
-
68
- # A message that can hold any of the supported value types.
69
- # @!attribute [rw] null_value
70
- # @return [Google::Protobuf::NullValue]
71
- # A null value.
72
- # @!attribute [rw] boolean_value
73
- # @return [true, false]
74
- # A boolean value.
75
- # @!attribute [rw] integer_value
76
- # @return [Integer]
77
- # An integer value.
78
- # @!attribute [rw] double_value
79
- # @return [Float]
80
- # A double value.
81
- # @!attribute [rw] timestamp_value
82
- # @return [Google::Protobuf::Timestamp]
83
- # A timestamp value.
84
- #
85
- # Precise only to microseconds. When stored, any additional precision is
86
- # rounded down.
87
- # @!attribute [rw] string_value
88
- # @return [String]
89
- # A string value.
90
- #
91
- # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
92
- # Only the first 1,500 bytes of the UTF-8 representation are considered by
93
- # queries.
94
- # @!attribute [rw] bytes_value
95
- # @return [String]
96
- # A bytes value.
97
- #
98
- # Must not exceed 1 MiB - 89 bytes.
99
- # Only the first 1,500 bytes are considered by queries.
100
- # @!attribute [rw] reference_value
101
- # @return [String]
102
- # A reference to a document. For example:
103
- # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
104
- # @!attribute [rw] geo_point_value
105
- # @return [Google::Type::LatLng]
106
- # A geo point value representing a point on the surface of Earth.
107
- # @!attribute [rw] array_value
108
- # @return [Google::Firestore::V1beta1::ArrayValue]
109
- # An array value.
110
- #
111
- # Cannot directly contain another array value, though can contain an
112
- # map which contains another array.
113
- # @!attribute [rw] map_value
114
- # @return [Google::Firestore::V1beta1::MapValue]
115
- # A map value.
116
- class Value; end
117
-
118
- # An array value.
119
- # @!attribute [rw] values
120
- # @return [Array<Google::Firestore::V1beta1::Value>]
121
- # Values in the array.
122
- class ArrayValue; end
123
-
124
- # A map value.
125
- # @!attribute [rw] fields
126
- # @return [Hash{String => Google::Firestore::V1beta1::Value}]
127
- # The map's fields.
128
- #
129
- # The map keys represent field names. Field names matching the regular
130
- # expression `__.*__` are reserved. Reserved field names are forbidden except
131
- # in certain documented contexts. The map keys, represented as UTF-8, must
132
- # not exceed 1,500 bytes and cannot be empty.
133
- class MapValue; end
134
- end
135
- end
136
- end