Skip to content

Commit 6c36b18

Browse files
1 parent 72b3b06 commit 6c36b18

File tree

17 files changed

+1326
-18
lines changed

17 files changed

+1326
-18
lines changed

clients/google-api-services-firestore/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-firestore</artifactId>
25-
<version>v1-rev20250414-2.0.0</version>
25+
<version>v1-rev20250618-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-firestore:v1-rev20250414-2.0.0'
38+
implementation 'com.google.apis:google-api-services-firestore:v1-rev20250618-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-firestore/v1/2.0.0/com/google/api/services/firestore/v1/Firestore.java

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,150 @@ public BulkDeleteDocuments set(String parameterName, Object value) {
321321
return (BulkDeleteDocuments) super.set(parameterName, value);
322322
}
323323
}
324+
/**
325+
* Creates a new database by cloning an existing one. The new database must be in the same cloud
326+
* region or multi-region location as the existing database. This behaves similar to
327+
* FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is
328+
* created with the database type, index configuration, and documents from an existing database. The
329+
* long-running operation can be used to track the progress of the clone, with the Operation's
330+
* metadata field type being the CloneDatabaseMetadata. The response type is the Database if the
331+
* clone was successful. The new database is not readable or writeable until the LRO has completed.
332+
*
333+
* Create a request for the method "databases.clone".
334+
*
335+
* This request holds the parameters needed by the firestore server. After setting any optional
336+
* parameters, call the {@link Clone#execute()} method to invoke the remote operation.
337+
*
338+
* @param parent Required. The project to clone the database in. Format is `projects/{project_id}`.
339+
* @param content the {@link com.google.api.services.firestore.v1.model.GoogleFirestoreAdminV1CloneDatabaseRequest}
340+
* @return the request
341+
*/
342+
public Clone clone(java.lang.String parent, com.google.api.services.firestore.v1.model.GoogleFirestoreAdminV1CloneDatabaseRequest content) throws java.io.IOException {
343+
Clone result = new Clone(parent, content);
344+
initialize(result);
345+
return result;
346+
}
347+
348+
public class Clone extends FirestoreRequest<com.google.api.services.firestore.v1.model.GoogleLongrunningOperation> {
349+
350+
private static final String REST_PATH = "v1/{+parent}/databases:clone";
351+
352+
private final java.util.regex.Pattern PARENT_PATTERN =
353+
java.util.regex.Pattern.compile("^projects/[^/]+$");
354+
355+
/**
356+
* Creates a new database by cloning an existing one. The new database must be in the same cloud
357+
* region or multi-region location as the existing database. This behaves similar to
358+
* FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database
359+
* is created with the database type, index configuration, and documents from an existing
360+
* database. The long-running operation can be used to track the progress of the clone, with the
361+
* Operation's metadata field type being the CloneDatabaseMetadata. The response type is the
362+
* Database if the clone was successful. The new database is not readable or writeable until the
363+
* LRO has completed.
364+
*
365+
* Create a request for the method "databases.clone".
366+
*
367+
* This request holds the parameters needed by the the firestore server. After setting any
368+
* optional parameters, call the {@link Clone#execute()} method to invoke the remote operation.
369+
* <p> {@link
370+
* Clone#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
371+
* be called to initialize this instance immediately after invoking the constructor. </p>
372+
*
373+
* @param parent Required. The project to clone the database in. Format is `projects/{project_id}`.
374+
* @param content the {@link com.google.api.services.firestore.v1.model.GoogleFirestoreAdminV1CloneDatabaseRequest}
375+
* @since 1.13
376+
*/
377+
protected Clone(java.lang.String parent, com.google.api.services.firestore.v1.model.GoogleFirestoreAdminV1CloneDatabaseRequest content) {
378+
super(Firestore.this, "POST", REST_PATH, content, com.google.api.services.firestore.v1.model.GoogleLongrunningOperation.class);
379+
this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
380+
if (!getSuppressPatternChecks()) {
381+
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
382+
"Parameter parent must conform to the pattern " +
383+
"^projects/[^/]+$");
384+
}
385+
}
386+
387+
@Override
388+
public Clone set$Xgafv(java.lang.String $Xgafv) {
389+
return (Clone) super.set$Xgafv($Xgafv);
390+
}
391+
392+
@Override
393+
public Clone setAccessToken(java.lang.String accessToken) {
394+
return (Clone) super.setAccessToken(accessToken);
395+
}
396+
397+
@Override
398+
public Clone setAlt(java.lang.String alt) {
399+
return (Clone) super.setAlt(alt);
400+
}
401+
402+
@Override
403+
public Clone setCallback(java.lang.String callback) {
404+
return (Clone) super.setCallback(callback);
405+
}
406+
407+
@Override
408+
public Clone setFields(java.lang.String fields) {
409+
return (Clone) super.setFields(fields);
410+
}
411+
412+
@Override
413+
public Clone setKey(java.lang.String key) {
414+
return (Clone) super.setKey(key);
415+
}
416+
417+
@Override
418+
public Clone setOauthToken(java.lang.String oauthToken) {
419+
return (Clone) super.setOauthToken(oauthToken);
420+
}
421+
422+
@Override
423+
public Clone setPrettyPrint(java.lang.Boolean prettyPrint) {
424+
return (Clone) super.setPrettyPrint(prettyPrint);
425+
}
426+
427+
@Override
428+
public Clone setQuotaUser(java.lang.String quotaUser) {
429+
return (Clone) super.setQuotaUser(quotaUser);
430+
}
431+
432+
@Override
433+
public Clone setUploadType(java.lang.String uploadType) {
434+
return (Clone) super.setUploadType(uploadType);
435+
}
436+
437+
@Override
438+
public Clone setUploadProtocol(java.lang.String uploadProtocol) {
439+
return (Clone) super.setUploadProtocol(uploadProtocol);
440+
}
441+
442+
/** Required. The project to clone the database in. Format is `projects/{project_id}`. */
443+
@com.google.api.client.util.Key
444+
private java.lang.String parent;
445+
446+
/** Required. The project to clone the database in. Format is `projects/{project_id}`.
447+
*/
448+
public java.lang.String getParent() {
449+
return parent;
450+
}
451+
452+
/** Required. The project to clone the database in. Format is `projects/{project_id}`. */
453+
public Clone setParent(java.lang.String parent) {
454+
if (!getSuppressPatternChecks()) {
455+
com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
456+
"Parameter parent must conform to the pattern " +
457+
"^projects/[^/]+$");
458+
}
459+
this.parent = parent;
460+
return this;
461+
}
462+
463+
@Override
464+
public Clone set(String parameterName, Object value) {
465+
return (Clone) super.set(parameterName, value);
466+
}
467+
}
324468
/**
325469
* Create a database.
326470
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.firestore.v1.model;
18+
19+
/**
20+
* Metadata for the long-running operation from the CloneDatabase request.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Firestore API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class GoogleFirestoreAdminV1CloneDatabaseMetadata extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* The name of the database being cloned to.
34+
* The value may be {@code null}.
35+
*/
36+
@com.google.api.client.util.Key
37+
private java.lang.String database;
38+
39+
/**
40+
* The time the clone finished, unset for ongoing clones.
41+
* The value may be {@code null}.
42+
*/
43+
@com.google.api.client.util.Key
44+
private String endTime;
45+
46+
/**
47+
* The operation state of the clone.
48+
* The value may be {@code null}.
49+
*/
50+
@com.google.api.client.util.Key
51+
private java.lang.String operationState;
52+
53+
/**
54+
* The snapshot from which this database was cloned.
55+
* The value may be {@code null}.
56+
*/
57+
@com.google.api.client.util.Key
58+
private GoogleFirestoreAdminV1PitrSnapshot pitrSnapshot;
59+
60+
/**
61+
* How far along the clone is as an estimated percentage of remaining time.
62+
* The value may be {@code null}.
63+
*/
64+
@com.google.api.client.util.Key
65+
private GoogleFirestoreAdminV1Progress progressPercentage;
66+
67+
/**
68+
* The time the clone was started.
69+
* The value may be {@code null}.
70+
*/
71+
@com.google.api.client.util.Key
72+
private String startTime;
73+
74+
/**
75+
* The name of the database being cloned to.
76+
* @return value or {@code null} for none
77+
*/
78+
public java.lang.String getDatabase() {
79+
return database;
80+
}
81+
82+
/**
83+
* The name of the database being cloned to.
84+
* @param database database or {@code null} for none
85+
*/
86+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setDatabase(java.lang.String database) {
87+
this.database = database;
88+
return this;
89+
}
90+
91+
/**
92+
* The time the clone finished, unset for ongoing clones.
93+
* @return value or {@code null} for none
94+
*/
95+
public String getEndTime() {
96+
return endTime;
97+
}
98+
99+
/**
100+
* The time the clone finished, unset for ongoing clones.
101+
* @param endTime endTime or {@code null} for none
102+
*/
103+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setEndTime(String endTime) {
104+
this.endTime = endTime;
105+
return this;
106+
}
107+
108+
/**
109+
* The operation state of the clone.
110+
* @return value or {@code null} for none
111+
*/
112+
public java.lang.String getOperationState() {
113+
return operationState;
114+
}
115+
116+
/**
117+
* The operation state of the clone.
118+
* @param operationState operationState or {@code null} for none
119+
*/
120+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setOperationState(java.lang.String operationState) {
121+
this.operationState = operationState;
122+
return this;
123+
}
124+
125+
/**
126+
* The snapshot from which this database was cloned.
127+
* @return value or {@code null} for none
128+
*/
129+
public GoogleFirestoreAdminV1PitrSnapshot getPitrSnapshot() {
130+
return pitrSnapshot;
131+
}
132+
133+
/**
134+
* The snapshot from which this database was cloned.
135+
* @param pitrSnapshot pitrSnapshot or {@code null} for none
136+
*/
137+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setPitrSnapshot(GoogleFirestoreAdminV1PitrSnapshot pitrSnapshot) {
138+
this.pitrSnapshot = pitrSnapshot;
139+
return this;
140+
}
141+
142+
/**
143+
* How far along the clone is as an estimated percentage of remaining time.
144+
* @return value or {@code null} for none
145+
*/
146+
public GoogleFirestoreAdminV1Progress getProgressPercentage() {
147+
return progressPercentage;
148+
}
149+
150+
/**
151+
* How far along the clone is as an estimated percentage of remaining time.
152+
* @param progressPercentage progressPercentage or {@code null} for none
153+
*/
154+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setProgressPercentage(GoogleFirestoreAdminV1Progress progressPercentage) {
155+
this.progressPercentage = progressPercentage;
156+
return this;
157+
}
158+
159+
/**
160+
* The time the clone was started.
161+
* @return value or {@code null} for none
162+
*/
163+
public String getStartTime() {
164+
return startTime;
165+
}
166+
167+
/**
168+
* The time the clone was started.
169+
* @param startTime startTime or {@code null} for none
170+
*/
171+
public GoogleFirestoreAdminV1CloneDatabaseMetadata setStartTime(String startTime) {
172+
this.startTime = startTime;
173+
return this;
174+
}
175+
176+
@Override
177+
public GoogleFirestoreAdminV1CloneDatabaseMetadata set(String fieldName, Object value) {
178+
return (GoogleFirestoreAdminV1CloneDatabaseMetadata) super.set(fieldName, value);
179+
}
180+
181+
@Override
182+
public GoogleFirestoreAdminV1CloneDatabaseMetadata clone() {
183+
return (GoogleFirestoreAdminV1CloneDatabaseMetadata) super.clone();
184+
}
185+
186+
}

0 commit comments

Comments
 (0)