google-cloud-firestore-admin-v1 0.3.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,18 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/firestore/admin/v1/field.proto
3
3
 
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
4
7
  require 'google/api/resource_pb'
5
8
  require 'google/firestore/admin/v1/index_pb'
6
- require 'google/api/annotations_pb'
7
- require 'google/protobuf'
8
9
 
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/firestore/admin/v1/field.proto", :syntax => :proto3) do
11
12
  add_message "google.firestore.admin.v1.Field" do
12
13
  optional :name, :string, 1
13
14
  optional :index_config, :message, 2, "google.firestore.admin.v1.Field.IndexConfig"
15
+ optional :ttl_config, :message, 3, "google.firestore.admin.v1.Field.TtlConfig"
14
16
  end
15
17
  add_message "google.firestore.admin.v1.Field.IndexConfig" do
16
18
  repeated :indexes, :message, 1, "google.firestore.admin.v1.Index"
@@ -18,6 +20,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
18
20
  optional :ancestor_field, :string, 3
19
21
  optional :reverting, :bool, 4
20
22
  end
23
+ add_message "google.firestore.admin.v1.Field.TtlConfig" do
24
+ optional :state, :enum, 1, "google.firestore.admin.v1.Field.TtlConfig.State"
25
+ end
26
+ add_enum "google.firestore.admin.v1.Field.TtlConfig.State" do
27
+ value :STATE_UNSPECIFIED, 0
28
+ value :CREATING, 1
29
+ value :ACTIVE, 2
30
+ value :NEEDS_REPAIR, 3
31
+ end
21
32
  end
22
33
  end
23
34
 
@@ -28,6 +39,8 @@ module Google
28
39
  module V1
29
40
  Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field").msgclass
30
41
  Field::IndexConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.IndexConfig").msgclass
42
+ Field::TtlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig").msgclass
43
+ Field::TtlConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig.State").enummodule
31
44
  end
32
45
  end
33
46
  end
@@ -1,19 +1,36 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/firestore/admin/v1/firestore_admin.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
7
9
  require 'google/api/resource_pb'
10
+ require 'google/firestore/admin/v1/database_pb'
8
11
  require 'google/firestore/admin/v1/field_pb'
9
12
  require 'google/firestore/admin/v1/index_pb'
10
13
  require 'google/longrunning/operations_pb'
11
14
  require 'google/protobuf/empty_pb'
12
15
  require 'google/protobuf/field_mask_pb'
13
- require 'google/protobuf'
14
16
 
15
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
18
  add_file("google/firestore/admin/v1/firestore_admin.proto", :syntax => :proto3) do
19
+ add_message "google.firestore.admin.v1.ListDatabasesRequest" do
20
+ optional :parent, :string, 1
21
+ end
22
+ add_message "google.firestore.admin.v1.ListDatabasesResponse" do
23
+ repeated :databases, :message, 1, "google.firestore.admin.v1.Database"
24
+ end
25
+ add_message "google.firestore.admin.v1.GetDatabaseRequest" do
26
+ optional :name, :string, 1
27
+ end
28
+ add_message "google.firestore.admin.v1.UpdateDatabaseRequest" do
29
+ optional :database, :message, 1, "google.firestore.admin.v1.Database"
30
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
31
+ end
32
+ add_message "google.firestore.admin.v1.UpdateDatabaseMetadata" do
33
+ end
17
34
  add_message "google.firestore.admin.v1.CreateIndexRequest" do
18
35
  optional :parent, :string, 1
19
36
  optional :index, :message, 2, "google.firestore.admin.v1.Index"
@@ -69,6 +86,11 @@ module Google
69
86
  module Firestore
70
87
  module Admin
71
88
  module V1
89
+ ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesRequest").msgclass
90
+ ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesResponse").msgclass
91
+ GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass
92
+ UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass
93
+ UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseMetadata").msgclass
72
94
  CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass
73
95
  ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass
74
96
  ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesResponse").msgclass
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/firestore/admin/v1/firestore_admin.proto for package 'Google.Cloud.Firestore.Admin.V1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2021 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/firestore/admin/v1/firestore_admin_pb'
@@ -26,6 +25,32 @@ module Google
26
25
  module Admin
27
26
  module V1
28
27
  module FirestoreAdmin
28
+ # The Cloud Firestore Admin API.
29
+ #
30
+ # This API provides several administrative services for Cloud Firestore.
31
+ #
32
+ # Project, Database, Namespace, Collection, Collection Group, and Document are
33
+ # used as defined in the Google Cloud Firestore API.
34
+ #
35
+ # Operation: An Operation represents work being performed in the background.
36
+ #
37
+ # The index service manages Cloud Firestore indexes.
38
+ #
39
+ # Index creation is performed asynchronously.
40
+ # An Operation resource is created for each such asynchronous operation.
41
+ # The state of the operation (including any errors encountered)
42
+ # may be queried via the Operation resource.
43
+ #
44
+ # The Operations collection provides a record of actions performed for the
45
+ # specified Project (including any Operations in progress). Operations are not
46
+ # created directly but through calls on other collections or resources.
47
+ #
48
+ # An Operation that is done may be deleted so that it is no longer listed as
49
+ # part of the Operation collection. Operations are garbage collected after
50
+ # 30 days. By default, ListOperations will only return in progress and failed
51
+ # operations. To list completed operation, issue a ListOperations request with
52
+ # the filter `done: true`.
53
+ #
29
54
  # Operations are created by service `FirestoreAdmin`, but are accessed via
30
55
  # service `google.longrunning.Operations`.
31
56
  class Service
@@ -67,7 +92,7 @@ module Google
67
92
  # Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
68
93
  # that have been explicitly overridden. To issue this query, call
69
94
  # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
70
- # `indexConfig.usesAncestorConfig:false`.
95
+ # `indexConfig.usesAncestorConfig:false` .
71
96
  rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse
72
97
  # Exports a copy of all or a subset of documents from Google Cloud Firestore
73
98
  # to another storage system, such as Google Cloud Storage. Recent updates to
@@ -77,6 +102,9 @@ module Google
77
102
  # used once the associated operation is done. If an export operation is
78
103
  # cancelled before completion it may leave partial data behind in Google
79
104
  # Cloud Storage.
105
+ #
106
+ # For more details on export behavior and output format, refer to:
107
+ # https://cloud.google.com/firestore/docs/manage-data/export-import
80
108
  rpc :ExportDocuments, ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Google::Longrunning::Operation
81
109
  # Imports documents into Google Cloud Firestore. Existing documents with the
82
110
  # same name are overwritten. The import occurs in the background and its
@@ -84,6 +112,12 @@ module Google
84
112
  # created. If an ImportDocuments operation is cancelled, it is possible
85
113
  # that a subset of the data has already been imported to Cloud Firestore.
86
114
  rpc :ImportDocuments, ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Google::Longrunning::Operation
115
+ # Gets information about a database.
116
+ rpc :GetDatabase, ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Google::Cloud::Firestore::Admin::V1::Database
117
+ # List all the databases in the project.
118
+ rpc :ListDatabases, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
119
+ # Updates a database.
120
+ rpc :UpdateDatabase, ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation
87
121
  end
88
122
 
89
123
  Stub = Service.rpc_stub_class
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/firestore/admin/v1/index.proto
3
3
 
4
- require 'google/api/resource_pb'
5
- require 'google/api/annotations_pb'
6
4
  require 'google/protobuf'
7
5
 
6
+ require 'google/api/resource_pb'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/firestore/admin/v1/index.proto", :syntax => :proto3) do
10
10
  add_message "google.firestore.admin.v1.Index" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/firestore/admin/v1/location.proto
3
3
 
4
- require 'google/type/latlng_pb'
5
- require 'google/api/annotations_pb'
6
4
  require 'google/protobuf'
7
5
 
8
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/firestore/admin/v1/operation.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/firestore/admin/v1/index_pb'
5
7
  require 'google/protobuf/timestamp_pb'
6
- require 'google/api/annotations_pb'
7
- require 'google/protobuf'
8
8
 
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/firestore/admin/v1/operation.proto", :syntax => :proto3) do
@@ -24,6 +24,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
24
24
  optional :state, :enum, 5, "google.firestore.admin.v1.OperationState"
25
25
  optional :progress_documents, :message, 6, "google.firestore.admin.v1.Progress"
26
26
  optional :progress_bytes, :message, 7, "google.firestore.admin.v1.Progress"
27
+ optional :ttl_config_delta, :message, 8, "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta"
27
28
  end
28
29
  add_message "google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta" do
29
30
  optional :change_type, :enum, 1, "google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType"
@@ -34,6 +35,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
34
35
  value :ADD, 1
35
36
  value :REMOVE, 2
36
37
  end
38
+ add_message "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta" do
39
+ optional :change_type, :enum, 1, "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType"
40
+ end
41
+ add_enum "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType" do
42
+ value :CHANGE_TYPE_UNSPECIFIED, 0
43
+ value :ADD, 1
44
+ value :REMOVE, 2
45
+ end
37
46
  add_message "google.firestore.admin.v1.ExportDocumentsMetadata" do
38
47
  optional :start_time, :message, 1, "google.protobuf.Timestamp"
39
48
  optional :end_time, :message, 2, "google.protobuf.Timestamp"
@@ -81,6 +90,8 @@ module Google
81
90
  FieldOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata").msgclass
82
91
  FieldOperationMetadata::IndexConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta").msgclass
83
92
  FieldOperationMetadata::IndexConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType").enummodule
93
+ FieldOperationMetadata::TtlConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta").msgclass
94
+ FieldOperationMetadata::TtlConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType").enummodule
84
95
  ExportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsMetadata").msgclass
85
96
  ImportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsMetadata").msgclass
86
97
  ExportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsResponse").msgclass
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -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 the filter set to
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