google-cloud-firestore-admin-v1 0.3.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +6 -1
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +541 -30
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +115 -12
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb +14 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin.rb +26 -0
- data/lib/google/cloud/firestore/admin/v1/version.rb +1 -1
- data/lib/google/cloud/firestore/admin/v1.rb +2 -0
- data/lib/google/firestore/admin/v1/database_pb.rb +52 -0
- data/lib/google/firestore/admin/v1/field_pb.rb +14 -1
- data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +22 -0
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +38 -4
- data/lib/google/firestore/admin/v1/index_pb.rb +1 -1
- data/lib/google/firestore/admin/v1/location_pb.rb +0 -2
- data/lib/google/firestore/admin/v1/operation_pb.rb +12 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/firestore/admin/v1/database.rb +125 -0
- data/proto_docs/google/firestore/admin/v1/field.rb +41 -1
- data/proto_docs/google/firestore/admin/v1/firestore_admin.rb +49 -2
- data/proto_docs/google/firestore/admin/v1/index.rb +1 -1
- data/proto_docs/google/firestore/admin/v1/operation.rb +24 -0
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +5 -4
- data/proto_docs/google/type/latlng.rb +0 -38
@@ -0,0 +1,125 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Firestore
|
23
|
+
module Admin
|
24
|
+
module V1
|
25
|
+
# A Cloud Firestore Database.
|
26
|
+
# Currently only one database is allowed per cloud project; this database
|
27
|
+
# must have a `database_id` of '(default)'.
|
28
|
+
# @!attribute [rw] name
|
29
|
+
# @return [::String]
|
30
|
+
# The resource name of the Database.
|
31
|
+
# Format: `projects/{project}/databases/{database}`
|
32
|
+
# @!attribute [rw] location_id
|
33
|
+
# @return [::String]
|
34
|
+
# The location of the database. Available databases are listed at
|
35
|
+
# https://cloud.google.com/firestore/docs/locations.
|
36
|
+
# @!attribute [rw] type
|
37
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseType]
|
38
|
+
# The type of the database.
|
39
|
+
# See https://cloud.google.com/datastore/docs/firestore-or-datastore for
|
40
|
+
# information about how to choose.
|
41
|
+
# @!attribute [rw] concurrency_mode
|
42
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Database::ConcurrencyMode]
|
43
|
+
# The concurrency control mode to use for this database.
|
44
|
+
# @!attribute [rw] app_engine_integration_mode
|
45
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Database::AppEngineIntegrationMode]
|
46
|
+
# The App Engine integration mode to use for this database.
|
47
|
+
# @!attribute [r] key_prefix
|
48
|
+
# @return [::String]
|
49
|
+
# Output only. The key_prefix for this database. This key_prefix is used, in combination
|
50
|
+
# with the project id ("<key prefix>~<project id>") to construct the
|
51
|
+
# application id that is returned from the Cloud Datastore APIs in Google App
|
52
|
+
# Engine first generation runtimes.
|
53
|
+
#
|
54
|
+
# This value may be empty in which case the appid to use for URL-encoded keys
|
55
|
+
# is the project_id (eg: foo instead of v~foo).
|
56
|
+
# @!attribute [rw] etag
|
57
|
+
# @return [::String]
|
58
|
+
# This checksum is computed by the server based on the value of other
|
59
|
+
# fields, and may be sent on update and delete requests to ensure the
|
60
|
+
# client has an up-to-date value before proceeding.
|
61
|
+
class Database
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
|
65
|
+
# The type of the database.
|
66
|
+
# See https://cloud.google.com/datastore/docs/firestore-or-datastore for
|
67
|
+
# information about how to choose.
|
68
|
+
#
|
69
|
+
# Mode changes are only allowed if the database is empty.
|
70
|
+
module DatabaseType
|
71
|
+
# The default value. This value is used if the database type is omitted.
|
72
|
+
DATABASE_TYPE_UNSPECIFIED = 0
|
73
|
+
|
74
|
+
# Firestore Native Mode
|
75
|
+
FIRESTORE_NATIVE = 1
|
76
|
+
|
77
|
+
# Firestore in Datastore Mode.
|
78
|
+
DATASTORE_MODE = 2
|
79
|
+
end
|
80
|
+
|
81
|
+
# The type of concurrency control mode for transactions.
|
82
|
+
module ConcurrencyMode
|
83
|
+
# Not used.
|
84
|
+
CONCURRENCY_MODE_UNSPECIFIED = 0
|
85
|
+
|
86
|
+
# Use optimistic concurrency control by default. This mode is available
|
87
|
+
# for Cloud Firestore databases.
|
88
|
+
OPTIMISTIC = 1
|
89
|
+
|
90
|
+
# Use pessimistic concurrency control by default. This mode is available
|
91
|
+
# for Cloud Firestore databases.
|
92
|
+
#
|
93
|
+
# This is the default setting for Cloud Firestore.
|
94
|
+
PESSIMISTIC = 2
|
95
|
+
|
96
|
+
# Use optimistic concurrency control with entity groups by default.
|
97
|
+
#
|
98
|
+
# This is the only available mode for Cloud Datastore.
|
99
|
+
#
|
100
|
+
# This mode is also available for Cloud Firestore with Datastore Mode but
|
101
|
+
# is not recommended.
|
102
|
+
OPTIMISTIC_WITH_ENTITY_GROUPS = 3
|
103
|
+
end
|
104
|
+
|
105
|
+
# The type of App Engine integration mode.
|
106
|
+
module AppEngineIntegrationMode
|
107
|
+
# Not used.
|
108
|
+
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0
|
109
|
+
|
110
|
+
# If an App Engine application exists in the same region as this database,
|
111
|
+
# App Engine configuration will impact this database. This includes
|
112
|
+
# disabling of the application & database, as well as disabling writes to
|
113
|
+
# the database.
|
114
|
+
ENABLED = 1
|
115
|
+
|
116
|
+
# Appengine has no affect on the ability of this database to serve
|
117
|
+
# requests.
|
118
|
+
DISABLED = 2
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# collections in the database with the same id.
|
29
29
|
# @!attribute [rw] name
|
30
30
|
# @return [::String]
|
31
|
-
# A field name of the form
|
31
|
+
# Required. A field name of the form
|
32
32
|
# `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
|
33
33
|
#
|
34
34
|
# A field path may be a simple field name, e.g. `address` or a path to fields
|
@@ -60,6 +60,11 @@ module Google
|
|
60
60
|
# revert to the configuration defined by the `ancestor_field`. To
|
61
61
|
# explicitly remove all indexes for this field, specify an index config
|
62
62
|
# with an empty list of indexes.
|
63
|
+
# @!attribute [rw] ttl_config
|
64
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig]
|
65
|
+
# The TTL configuration for this `Field`.
|
66
|
+
# Setting or unsetting this will enable or disable the TTL for
|
67
|
+
# documents that have this `Field`.
|
63
68
|
class Field
|
64
69
|
include ::Google::Protobuf::MessageExts
|
65
70
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -90,6 +95,41 @@ module Google
|
|
90
95
|
include ::Google::Protobuf::MessageExts
|
91
96
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
92
97
|
end
|
98
|
+
|
99
|
+
# The TTL (time-to-live) configuration for documents that have this `Field`
|
100
|
+
# set.
|
101
|
+
# Storing a timestamp value into a TTL-enabled field will be treated as
|
102
|
+
# the document's absolute expiration time. Using any other data type or
|
103
|
+
# leaving the field absent will disable the TTL for the individual document.
|
104
|
+
# @!attribute [r] state
|
105
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig::State]
|
106
|
+
# Output only. The state of the TTL configuration.
|
107
|
+
class TtlConfig
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
|
111
|
+
# The state of applying the TTL configuration to all documents.
|
112
|
+
module State
|
113
|
+
# The state is unspecified or unknown.
|
114
|
+
STATE_UNSPECIFIED = 0
|
115
|
+
|
116
|
+
# The TTL is being applied. There is an active long-running operation to
|
117
|
+
# track the change. Newly written documents will have TTLs applied as
|
118
|
+
# requested. Requested TTLs on existing documents are still being
|
119
|
+
# processed. When TTLs on all existing documents have been processed, the
|
120
|
+
# state will move to 'ACTIVE'.
|
121
|
+
CREATING = 1
|
122
|
+
|
123
|
+
# The TTL is active for all documents.
|
124
|
+
ACTIVE = 2
|
125
|
+
|
126
|
+
# The TTL configuration could not be enabled for all existing documents.
|
127
|
+
# Newly written documents will continue to have their TTL applied.
|
128
|
+
# The LRO returned when last attempting to enable TTL for this `Field`
|
129
|
+
# has failed, and may have more details.
|
130
|
+
NEEDS_REPAIR = 3
|
131
|
+
end
|
132
|
+
end
|
93
133
|
end
|
94
134
|
end
|
95
135
|
end
|
@@ -22,6 +22,53 @@ module Google
|
|
22
22
|
module Firestore
|
23
23
|
module Admin
|
24
24
|
module V1
|
25
|
+
# A request to list the Firestore Databases in all locations for a project.
|
26
|
+
# @!attribute [rw] parent
|
27
|
+
# @return [::String]
|
28
|
+
# Required. A parent name of the form
|
29
|
+
# `projects/{project_id}`
|
30
|
+
class ListDatabasesRequest
|
31
|
+
include ::Google::Protobuf::MessageExts
|
32
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
33
|
+
end
|
34
|
+
|
35
|
+
# The list of databases for a project.
|
36
|
+
# @!attribute [rw] databases
|
37
|
+
# @return [::Array<::Google::Cloud::Firestore::Admin::V1::Database>]
|
38
|
+
# The databases in the project.
|
39
|
+
class ListDatabasesResponse
|
40
|
+
include ::Google::Protobuf::MessageExts
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
|
+
end
|
43
|
+
|
44
|
+
# The request for {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database FirestoreAdmin.GetDatabase}.
|
45
|
+
# @!attribute [rw] name
|
46
|
+
# @return [::String]
|
47
|
+
# Required. A name of the form
|
48
|
+
# `projects/{project_id}/databases/{database_id}`
|
49
|
+
class GetDatabaseRequest
|
50
|
+
include ::Google::Protobuf::MessageExts
|
51
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
52
|
+
end
|
53
|
+
|
54
|
+
# The request for {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database FirestoreAdmin.UpdateDatabase}.
|
55
|
+
# @!attribute [rw] database
|
56
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Database]
|
57
|
+
# Required. The database to update.
|
58
|
+
# @!attribute [rw] update_mask
|
59
|
+
# @return [::Google::Protobuf::FieldMask]
|
60
|
+
# The list of fields to be updated.
|
61
|
+
class UpdateDatabaseRequest
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
# Metadata related to the update database operation.
|
67
|
+
class UpdateDatabaseMetadata
|
68
|
+
include ::Google::Protobuf::MessageExts
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
70
|
+
end
|
71
|
+
|
25
72
|
# The request for {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}.
|
26
73
|
# @!attribute [rw] parent
|
27
74
|
# @return [::String]
|
@@ -122,8 +169,8 @@ module Google
|
|
122
169
|
# The filter to apply to list results. Currently,
|
123
170
|
# {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} only supports listing fields
|
124
171
|
# that have been explicitly overridden. To issue this query, call
|
125
|
-
# {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} with
|
126
|
-
# `indexConfig.usesAncestorConfig:false
|
172
|
+
# {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} with a filter that includes
|
173
|
+
# `indexConfig.usesAncestorConfig:false` .
|
127
174
|
# @!attribute [rw] page_size
|
128
175
|
# @return [::Integer]
|
129
176
|
# The number of results to return.
|
@@ -70,7 +70,7 @@ module Google
|
|
70
70
|
# @!attribute [rw] order
|
71
71
|
# @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::Order]
|
72
72
|
# Indicates that this field supports ordering by the specified order or
|
73
|
-
# comparing using =, <, <=, >, >=.
|
73
|
+
# comparing using =, !=, <, <=, >, >=.
|
74
74
|
# @!attribute [rw] array_config
|
75
75
|
# @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::ArrayConfig]
|
76
76
|
# Indicates that this field supports operations on `array_value`s.
|
@@ -75,6 +75,9 @@ module Google
|
|
75
75
|
# @!attribute [rw] progress_bytes
|
76
76
|
# @return [::Google::Cloud::Firestore::Admin::V1::Progress]
|
77
77
|
# The progress, in bytes, of this operation.
|
78
|
+
# @!attribute [rw] ttl_config_delta
|
79
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta]
|
80
|
+
# Describes the deltas of TTL configuration.
|
78
81
|
class FieldOperationMetadata
|
79
82
|
include ::Google::Protobuf::MessageExts
|
80
83
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -102,6 +105,27 @@ module Google
|
|
102
105
|
REMOVE = 2
|
103
106
|
end
|
104
107
|
end
|
108
|
+
|
109
|
+
# Information about an TTL configuration change.
|
110
|
+
# @!attribute [rw] change_type
|
111
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta::ChangeType]
|
112
|
+
# Specifies how the TTL configuration is changing.
|
113
|
+
class TtlConfigDelta
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
|
117
|
+
# Specifies how the TTL config is changing.
|
118
|
+
module ChangeType
|
119
|
+
# The type of change is not specified or known.
|
120
|
+
CHANGE_TYPE_UNSPECIFIED = 0
|
121
|
+
|
122
|
+
# The TTL config is being added.
|
123
|
+
ADD = 1
|
124
|
+
|
125
|
+
# The TTL config is being removed.
|
126
|
+
REMOVE = 2
|
127
|
+
end
|
128
|
+
end
|
105
129
|
end
|
106
130
|
|
107
131
|
# Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} results from
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
48
|
#
|
49
49
|
# foo = Foo(...)
|
50
50
|
# any = Any()
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
# any.Unpack(foo)
|
55
55
|
# ...
|
56
56
|
#
|
57
|
-
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
58
|
#
|
59
59
|
# foo := &pb.Foo{...}
|
60
60
|
# any, err := anypb.New(foo)
|
@@ -75,7 +75,7 @@ module Google
|
|
75
75
|
#
|
76
76
|
#
|
77
77
|
# JSON
|
78
|
-
#
|
78
|
+
#
|
79
79
|
# The JSON representation of an `Any` value uses the regular
|
80
80
|
# representation of the deserialized, embedded message, with an
|
81
81
|
# additional field `@type` which contains the type URL. Example:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore-admin-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb
|
178
178
|
- lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb
|
179
179
|
- lib/google/cloud/firestore/admin/v1/version.rb
|
180
|
+
- lib/google/firestore/admin/v1/database_pb.rb
|
180
181
|
- lib/google/firestore/admin/v1/field_pb.rb
|
181
182
|
- lib/google/firestore/admin/v1/firestore_admin_pb.rb
|
182
183
|
- lib/google/firestore/admin/v1/firestore_admin_services_pb.rb
|
@@ -186,6 +187,7 @@ files:
|
|
186
187
|
- proto_docs/README.md
|
187
188
|
- proto_docs/google/api/field_behavior.rb
|
188
189
|
- proto_docs/google/api/resource.rb
|
190
|
+
- proto_docs/google/firestore/admin/v1/database.rb
|
189
191
|
- proto_docs/google/firestore/admin/v1/field.rb
|
190
192
|
- proto_docs/google/firestore/admin/v1/firestore_admin.rb
|
191
193
|
- proto_docs/google/firestore/admin/v1/index.rb
|
@@ -198,7 +200,6 @@ files:
|
|
198
200
|
- proto_docs/google/protobuf/field_mask.rb
|
199
201
|
- proto_docs/google/protobuf/timestamp.rb
|
200
202
|
- proto_docs/google/rpc/status.rb
|
201
|
-
- proto_docs/google/type/latlng.rb
|
202
203
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
203
204
|
licenses:
|
204
205
|
- Apache-2.0
|
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
219
|
- !ruby/object:Gem::Version
|
219
220
|
version: '0'
|
220
221
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
222
|
+
rubygems_version: 3.3.14
|
222
223
|
signing_key:
|
223
224
|
specification_version: 4
|
224
225
|
summary: API Client library for the Cloud Firestore Admin V1 API
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright 2020 Google LLC
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
-
|
19
|
-
|
20
|
-
module Google
|
21
|
-
module Type
|
22
|
-
# An object that represents a latitude/longitude pair. This is expressed as a
|
23
|
-
# pair of doubles to represent degrees latitude and degrees longitude. Unless
|
24
|
-
# specified otherwise, this must conform to the
|
25
|
-
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
26
|
-
# standard</a>. Values must be within normalized ranges.
|
27
|
-
# @!attribute [rw] latitude
|
28
|
-
# @return [::Float]
|
29
|
-
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
30
|
-
# @!attribute [rw] longitude
|
31
|
-
# @return [::Float]
|
32
|
-
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
33
|
-
class LatLng
|
34
|
-
include ::Google::Protobuf::MessageExts
|
35
|
-
extend ::Google::Protobuf::MessageExts::ClassMethods
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|