Skip to content

Commit 5a15d2a

Browse files
feat: Automated regeneration of firestore v1 client (googleapis#23567)
Auto-created at 2025-06-29 10:15:09 +0000 using the toys pull request generator.
1 parent e3c8016 commit 5a15d2a

File tree

6 files changed

+262
-3
lines changed

6 files changed

+262
-3
lines changed

api_names_out.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242587,6 +242587,19 @@
242587242587
"/firestore:v1/GoogleFirestoreAdminV1BulkDeleteDocumentsRequest/collectionIds/collection_id": collection_id
242588242588
"/firestore:v1/GoogleFirestoreAdminV1BulkDeleteDocumentsRequest/namespaceIds": namespace_ids
242589242589
"/firestore:v1/GoogleFirestoreAdminV1BulkDeleteDocumentsRequest/namespaceIds/namespace_id": namespace_id
242590+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata": google_firestore_admin_v1_clone_database_metadata
242591+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/database": database
242592+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/endTime": end_time
242593+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/operationState": operation_state
242594+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/pitrSnapshot": pitr_snapshot
242595+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/progressPercentage": progress_percentage
242596+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseMetadata/startTime": start_time
242597+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest": google_firestore_admin_v1_clone_database_request
242598+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest/databaseId": database_id
242599+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest/encryptionConfig": encryption_config
242600+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest/pitrSnapshot": pitr_snapshot
242601+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest/tags": tags
242602+
"/firestore:v1/GoogleFirestoreAdminV1CloneDatabaseRequest/tags/tag": tag
242590242603
"/firestore:v1/GoogleFirestoreAdminV1CmekConfig": google_firestore_admin_v1_cmek_config
242591242604
"/firestore:v1/GoogleFirestoreAdminV1CmekConfig/activeKeyVersion": active_key_version
242592242605
"/firestore:v1/GoogleFirestoreAdminV1CmekConfig/activeKeyVersion/active_key_version": active_key_version
@@ -242739,6 +242752,10 @@
242739242752
"/firestore:v1/GoogleFirestoreAdminV1ListUserCredsResponse/userCreds": user_creds
242740242753
"/firestore:v1/GoogleFirestoreAdminV1ListUserCredsResponse/userCreds/user_cred": user_cred
242741242754
"/firestore:v1/GoogleFirestoreAdminV1LocationMetadata": google_firestore_admin_v1_location_metadata
242755+
"/firestore:v1/GoogleFirestoreAdminV1PitrSnapshot": google_firestore_admin_v1_pitr_snapshot
242756+
"/firestore:v1/GoogleFirestoreAdminV1PitrSnapshot/database": database
242757+
"/firestore:v1/GoogleFirestoreAdminV1PitrSnapshot/databaseUid": database_uid
242758+
"/firestore:v1/GoogleFirestoreAdminV1PitrSnapshot/snapshotTime": snapshot_time
242742242759
"/firestore:v1/GoogleFirestoreAdminV1Progress": google_firestore_admin_v1_progress
242743242760
"/firestore:v1/GoogleFirestoreAdminV1Progress/completedWork": completed_work
242744242761
"/firestore:v1/GoogleFirestoreAdminV1Progress/estimatedWork": estimated_work
@@ -243010,6 +243027,8 @@
243010243027
"/firestore:v1/firestore.projects.databases.backupSchedules.patch/updateMask": update_mask
243011243028
"/firestore:v1/firestore.projects.databases.bulkDeleteDocuments": bulk_project_database_delete_documents
243012243029
"/firestore:v1/firestore.projects.databases.bulkDeleteDocuments/name": name
243030+
"/firestore:v1/firestore.projects.databases.clone": clone_project_database
243031+
"/firestore:v1/firestore.projects.databases.clone/parent": parent
243013243032
"/firestore:v1/firestore.projects.databases.collectionGroups.fields.get": get_project_database_collection_group_field
243014243033
"/firestore:v1/firestore.projects.databases.collectionGroups.fields.get/name": name
243015243034
"/firestore:v1/firestore.projects.databases.collectionGroups.fields.list": list_project_database_collection_group_fields

generated/google-apis-firestore_v1/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release history for google-apis-firestore_v1
22

3+
### v0.78.0 (2025-06-29)
4+
5+
* Regenerated from discovery document revision 20250618
6+
* Regenerated using generator version 0.18.0
7+
38
### v0.77.0 (2025-05-11)
49

510
* Regenerated using generator version 0.17.0

generated/google-apis-firestore_v1/lib/google/apis/firestore_v1/classes.rb

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,109 @@ def update!(**args)
13951395
end
13961396
end
13971397

1398+
# Metadata for the long-running operation from the CloneDatabase request.
1399+
class GoogleFirestoreAdminV1CloneDatabaseMetadata
1400+
include Google::Apis::Core::Hashable
1401+
1402+
# The name of the database being cloned to.
1403+
# Corresponds to the JSON property `database`
1404+
# @return [String]
1405+
attr_accessor :database
1406+
1407+
# The time the clone finished, unset for ongoing clones.
1408+
# Corresponds to the JSON property `endTime`
1409+
# @return [String]
1410+
attr_accessor :end_time
1411+
1412+
# The operation state of the clone.
1413+
# Corresponds to the JSON property `operationState`
1414+
# @return [String]
1415+
attr_accessor :operation_state
1416+
1417+
# A consistent snapshot of a database at a specific point in time. A PITR (Point-
1418+
# in-time recovery) snapshot with previous versions of a database's data is
1419+
# available for every minute up to the associated database's data retention
1420+
# period. If the PITR feature is enabled, the retention period is 7 days;
1421+
# otherwise, it is one hour.
1422+
# Corresponds to the JSON property `pitrSnapshot`
1423+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot]
1424+
attr_accessor :pitr_snapshot
1425+
1426+
# Describes the progress of the operation. Unit of work is generic and must be
1427+
# interpreted based on where Progress is used.
1428+
# Corresponds to the JSON property `progressPercentage`
1429+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress]
1430+
attr_accessor :progress_percentage
1431+
1432+
# The time the clone was started.
1433+
# Corresponds to the JSON property `startTime`
1434+
# @return [String]
1435+
attr_accessor :start_time
1436+
1437+
def initialize(**args)
1438+
update!(**args)
1439+
end
1440+
1441+
# Update properties of this object
1442+
def update!(**args)
1443+
@database = args[:database] if args.key?(:database)
1444+
@end_time = args[:end_time] if args.key?(:end_time)
1445+
@operation_state = args[:operation_state] if args.key?(:operation_state)
1446+
@pitr_snapshot = args[:pitr_snapshot] if args.key?(:pitr_snapshot)
1447+
@progress_percentage = args[:progress_percentage] if args.key?(:progress_percentage)
1448+
@start_time = args[:start_time] if args.key?(:start_time)
1449+
end
1450+
end
1451+
1452+
# The request message for FirestoreAdmin.CloneDatabase.
1453+
class GoogleFirestoreAdminV1CloneDatabaseRequest
1454+
include Google::Apis::Core::Hashable
1455+
1456+
# Required. The ID to use for the database, which will become the final
1457+
# component of the database's resource name. This database ID must not be
1458+
# associated with an existing database. This value should be 4-63 characters.
1459+
# Valid characters are /a-z-/ with first character a letter and the last a
1460+
# letter or a number. Must not be UUID-like /[0-9a-f]`8`(-[0-9a-f]`4`)`3`-[0-9a-
1461+
# f]`12`/. "(default)" database ID is also valid.
1462+
# Corresponds to the JSON property `databaseId`
1463+
# @return [String]
1464+
attr_accessor :database_id
1465+
1466+
# Encryption configuration for a new database being created from another source.
1467+
# The source could be a Backup .
1468+
# Corresponds to the JSON property `encryptionConfig`
1469+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1EncryptionConfig]
1470+
attr_accessor :encryption_config
1471+
1472+
# A consistent snapshot of a database at a specific point in time. A PITR (Point-
1473+
# in-time recovery) snapshot with previous versions of a database's data is
1474+
# available for every minute up to the associated database's data retention
1475+
# period. If the PITR feature is enabled, the retention period is 7 days;
1476+
# otherwise, it is one hour.
1477+
# Corresponds to the JSON property `pitrSnapshot`
1478+
# @return [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot]
1479+
attr_accessor :pitr_snapshot
1480+
1481+
# Optional. Immutable. Tags to be bound to the cloned database. The tags should
1482+
# be provided in the format of `tagKeys/`tag_key_id` -> tagValues/`tag_value_id``
1483+
# .
1484+
# Corresponds to the JSON property `tags`
1485+
# @return [Hash<String,String>]
1486+
attr_accessor :tags
1487+
1488+
def initialize(**args)
1489+
update!(**args)
1490+
end
1491+
1492+
# Update properties of this object
1493+
def update!(**args)
1494+
@database_id = args[:database_id] if args.key?(:database_id)
1495+
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
1496+
@pitr_snapshot = args[:pitr_snapshot] if args.key?(:pitr_snapshot)
1497+
@tags = args[:tags] if args.key?(:tags)
1498+
end
1499+
end
1500+
13981501
# The CMEK (Customer Managed Encryption Key) configuration for a Firestore
13991502
# database. If not present, the database is secured by the default Google
14001503
# encryption key.
@@ -2537,6 +2640,43 @@ def update!(**args)
25372640
end
25382641
end
25392642

2643+
# A consistent snapshot of a database at a specific point in time. A PITR (Point-
2644+
# in-time recovery) snapshot with previous versions of a database's data is
2645+
# available for every minute up to the associated database's data retention
2646+
# period. If the PITR feature is enabled, the retention period is 7 days;
2647+
# otherwise, it is one hour.
2648+
class GoogleFirestoreAdminV1PitrSnapshot
2649+
include Google::Apis::Core::Hashable
2650+
2651+
# Required. The name of the database that this was a snapshot of. Format: `
2652+
# projects/`project`/databases/`database``.
2653+
# Corresponds to the JSON property `database`
2654+
# @return [String]
2655+
attr_accessor :database
2656+
2657+
# Output only. Public UUID of the database the snapshot was associated with.
2658+
# Corresponds to the JSON property `databaseUid`
2659+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
2660+
# @return [String]
2661+
attr_accessor :database_uid
2662+
2663+
# Required. Snapshot time of the database.
2664+
# Corresponds to the JSON property `snapshotTime`
2665+
# @return [String]
2666+
attr_accessor :snapshot_time
2667+
2668+
def initialize(**args)
2669+
update!(**args)
2670+
end
2671+
2672+
# Update properties of this object
2673+
def update!(**args)
2674+
@database = args[:database] if args.key?(:database)
2675+
@database_uid = args[:database_uid] if args.key?(:database_uid)
2676+
@snapshot_time = args[:snapshot_time] if args.key?(:snapshot_time)
2677+
end
2678+
end
2679+
25402680
# Describes the progress of the operation. Unit of work is generic and must be
25412681
# interpreted based on where Progress is used.
25422682
class GoogleFirestoreAdminV1Progress

generated/google-apis-firestore_v1/lib/google/apis/firestore_v1/gem_version.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module FirestoreV1
1818
# Version of the google-apis-firestore_v1 gem
19-
GEM_VERSION = "0.77.0"
19+
GEM_VERSION = "0.78.0"
2020

2121
# Version of the code generator used to generate this client
22-
GENERATOR_VERSION = "0.17.0"
22+
GENERATOR_VERSION = "0.18.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250414"
25+
REVISION = "20250618"
2626
end
2727
end
2828
end

generated/google-apis-firestore_v1/lib/google/apis/firestore_v1/representations.rb

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
262262
include Google::Apis::Core::JsonObjectSupport
263263
end
264264

265+
class GoogleFirestoreAdminV1CloneDatabaseMetadata
266+
class Representation < Google::Apis::Core::JsonRepresentation; end
267+
268+
include Google::Apis::Core::JsonObjectSupport
269+
end
270+
271+
class GoogleFirestoreAdminV1CloneDatabaseRequest
272+
class Representation < Google::Apis::Core::JsonRepresentation; end
273+
274+
include Google::Apis::Core::JsonObjectSupport
275+
end
276+
265277
class GoogleFirestoreAdminV1CmekConfig
266278
class Representation < Google::Apis::Core::JsonRepresentation; end
267279

@@ -442,6 +454,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
442454
include Google::Apis::Core::JsonObjectSupport
443455
end
444456

457+
class GoogleFirestoreAdminV1PitrSnapshot
458+
class Representation < Google::Apis::Core::JsonRepresentation; end
459+
460+
include Google::Apis::Core::JsonObjectSupport
461+
end
462+
445463
class GoogleFirestoreAdminV1Progress
446464
class Representation < Google::Apis::Core::JsonRepresentation; end
447465

@@ -1149,6 +1167,32 @@ class Representation < Google::Apis::Core::JsonRepresentation
11491167
end
11501168
end
11511169

1170+
class GoogleFirestoreAdminV1CloneDatabaseMetadata
1171+
# @private
1172+
class Representation < Google::Apis::Core::JsonRepresentation
1173+
property :database, as: 'database'
1174+
property :end_time, as: 'endTime'
1175+
property :operation_state, as: 'operationState'
1176+
property :pitr_snapshot, as: 'pitrSnapshot', class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot, decorator: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot::Representation
1177+
1178+
property :progress_percentage, as: 'progressPercentage', class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress, decorator: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1Progress::Representation
1179+
1180+
property :start_time, as: 'startTime'
1181+
end
1182+
end
1183+
1184+
class GoogleFirestoreAdminV1CloneDatabaseRequest
1185+
# @private
1186+
class Representation < Google::Apis::Core::JsonRepresentation
1187+
property :database_id, as: 'databaseId'
1188+
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1EncryptionConfig, decorator: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1EncryptionConfig::Representation
1189+
1190+
property :pitr_snapshot, as: 'pitrSnapshot', class: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot, decorator: Google::Apis::FirestoreV1::GoogleFirestoreAdminV1PitrSnapshot::Representation
1191+
1192+
hash :tags, as: 'tags'
1193+
end
1194+
end
1195+
11521196
class GoogleFirestoreAdminV1CmekConfig
11531197
# @private
11541198
class Representation < Google::Apis::Core::JsonRepresentation
@@ -1453,6 +1497,15 @@ class Representation < Google::Apis::Core::JsonRepresentation
14531497
end
14541498
end
14551499

1500+
class GoogleFirestoreAdminV1PitrSnapshot
1501+
# @private
1502+
class Representation < Google::Apis::Core::JsonRepresentation
1503+
property :database, as: 'database'
1504+
property :database_uid, :base64 => true, as: 'databaseUid'
1505+
property :snapshot_time, as: 'snapshotTime'
1506+
end
1507+
end
1508+
14561509
class GoogleFirestoreAdminV1Progress
14571510
# @private
14581511
class Representation < Google::Apis::Core::JsonRepresentation

generated/google-apis-firestore_v1/lib/google/apis/firestore_v1/service.rb

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,48 @@ def bulk_project_database_delete_documents(name, google_firestore_admin_v1_bulk_
9191
execute_or_queue_command(command, &block)
9292
end
9393

94+
# Creates a new database by cloning an existing one. The new database must be in
95+
# the same cloud region or multi-region location as the existing database. This
96+
# behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a
97+
# new empty database, a new database is created with the database type, index
98+
# configuration, and documents from an existing database. The long-running
99+
# operation can be used to track the progress of the clone, with the Operation's
100+
# metadata field type being the CloneDatabaseMetadata. The response type is the
101+
# Database if the clone was successful. The new database is not readable or
102+
# writeable until the LRO has completed.
103+
# @param [String] parent
104+
# Required. The project to clone the database in. Format is `projects/`
105+
# project_id``.
106+
# @param [Google::Apis::FirestoreV1::GoogleFirestoreAdminV1CloneDatabaseRequest] google_firestore_admin_v1_clone_database_request_object
107+
# @param [String] fields
108+
# Selector specifying which fields to include in a partial response.
109+
# @param [String] quota_user
110+
# Available to use for quota purposes for server-side applications. Can be any
111+
# arbitrary string assigned to a user, but should not exceed 40 characters.
112+
# @param [Google::Apis::RequestOptions] options
113+
# Request-specific options
114+
#
115+
# @yield [result, err] Result & error if block supplied
116+
# @yieldparam result [Google::Apis::FirestoreV1::GoogleLongrunningOperation] parsed result object
117+
# @yieldparam err [StandardError] error object if request failed
118+
#
119+
# @return [Google::Apis::FirestoreV1::GoogleLongrunningOperation]
120+
#
121+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
122+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
123+
# @raise [Google::Apis::AuthorizationError] Authorization is required
124+
def clone_project_database(parent, google_firestore_admin_v1_clone_database_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
125+
command = make_simple_command(:post, 'v1/{+parent}/databases:clone', options)
126+
command.request_representation = Google::Apis::FirestoreV1::GoogleFirestoreAdminV1CloneDatabaseRequest::Representation
127+
command.request_object = google_firestore_admin_v1_clone_database_request_object
128+
command.response_representation = Google::Apis::FirestoreV1::GoogleLongrunningOperation::Representation
129+
command.response_class = Google::Apis::FirestoreV1::GoogleLongrunningOperation
130+
command.params['parent'] = parent unless parent.nil?
131+
command.query['fields'] = fields unless fields.nil?
132+
command.query['quotaUser'] = quota_user unless quota_user.nil?
133+
execute_or_queue_command(command, &block)
134+
end
135+
94136
# Create a database.
95137
# @param [String] parent
96138
# Required. A parent name of the form `projects/`project_id``

0 commit comments

Comments
 (0)