|
37 | 37 | import com.google.firestore.admin.v1.CreateIndexRequest;
|
38 | 38 | import com.google.firestore.admin.v1.Database;
|
39 | 39 | import com.google.firestore.admin.v1.DatabaseName;
|
| 40 | +import com.google.firestore.admin.v1.DeleteDatabaseMetadata; |
| 41 | +import com.google.firestore.admin.v1.DeleteDatabaseRequest; |
40 | 42 | import com.google.firestore.admin.v1.DeleteIndexRequest;
|
41 | 43 | import com.google.firestore.admin.v1.ExportDocumentsMetadata;
|
42 | 44 | import com.google.firestore.admin.v1.ExportDocumentsRequest;
|
@@ -1106,7 +1108,7 @@ public final UnaryCallable<UpdateFieldRequest, Operation> updateFieldCallable()
|
1106 | 1108 | * <p>Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
|
1107 | 1109 | * only supports listing fields that have been explicitly overridden. To issue this query, call
|
1108 | 1110 | * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the
|
1109 |
| - * filter set to `indexConfig.usesAncestorConfig:false` . |
| 1111 | + * filter set to `indexConfig.usesAncestorConfig:false or `ttlConfig:*`. |
1110 | 1112 | *
|
1111 | 1113 | * <p>Sample code:
|
1112 | 1114 | *
|
@@ -1142,7 +1144,7 @@ public final ListFieldsPagedResponse listFields(CollectionGroupName parent) {
|
1142 | 1144 | * <p>Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
|
1143 | 1145 | * only supports listing fields that have been explicitly overridden. To issue this query, call
|
1144 | 1146 | * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the
|
1145 |
| - * filter set to `indexConfig.usesAncestorConfig:false` . |
| 1147 | + * filter set to `indexConfig.usesAncestorConfig:false or `ttlConfig:*`. |
1146 | 1148 | *
|
1147 | 1149 | * <p>Sample code:
|
1148 | 1150 | *
|
@@ -1176,7 +1178,7 @@ public final ListFieldsPagedResponse listFields(String parent) {
|
1176 | 1178 | * <p>Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
|
1177 | 1179 | * only supports listing fields that have been explicitly overridden. To issue this query, call
|
1178 | 1180 | * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the
|
1179 |
| - * filter set to `indexConfig.usesAncestorConfig:false` . |
| 1181 | + * filter set to `indexConfig.usesAncestorConfig:false or `ttlConfig:*`. |
1180 | 1182 | *
|
1181 | 1183 | * <p>Sample code:
|
1182 | 1184 | *
|
@@ -1215,7 +1217,7 @@ public final ListFieldsPagedResponse listFields(ListFieldsRequest request) {
|
1215 | 1217 | * <p>Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
|
1216 | 1218 | * only supports listing fields that have been explicitly overridden. To issue this query, call
|
1217 | 1219 | * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the
|
1218 |
| - * filter set to `indexConfig.usesAncestorConfig:false` . |
| 1220 | + * filter set to `indexConfig.usesAncestorConfig:false or `ttlConfig:*`. |
1219 | 1221 | *
|
1220 | 1222 | * <p>Sample code:
|
1221 | 1223 | *
|
@@ -1253,7 +1255,7 @@ public final UnaryCallable<ListFieldsRequest, ListFieldsPagedResponse> listField
|
1253 | 1255 | * <p>Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
|
1254 | 1256 | * only supports listing fields that have been explicitly overridden. To issue this query, call
|
1255 | 1257 | * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the
|
1256 |
| - * filter set to `indexConfig.usesAncestorConfig:false` . |
| 1258 | + * filter set to `indexConfig.usesAncestorConfig:false or `ttlConfig:*`. |
1257 | 1259 | *
|
1258 | 1260 | * <p>Sample code:
|
1259 | 1261 | *
|
@@ -1678,7 +1680,10 @@ public final UnaryCallable<ImportDocumentsRequest, Operation> importDocumentsCal
|
1678 | 1680 | * @param database Required. The Database to create.
|
1679 | 1681 | * @param databaseId Required. The ID to use for the database, which will become the final
|
1680 | 1682 | * component of the database's resource name.
|
1681 |
| - * <p>The value must be set to "(default)". |
| 1683 | + * <p>This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first |
| 1684 | + * character a letter and the last a letter or a number. Must not be UUID-like |
| 1685 | + * /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. |
| 1686 | + * <p>"(default)" database id is also valid. |
1682 | 1687 | * @throws com.google.api.gax.rpc.ApiException if the remote call fails
|
1683 | 1688 | */
|
1684 | 1689 | public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsync(
|
@@ -1717,7 +1722,10 @@ public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsy
|
1717 | 1722 | * @param database Required. The Database to create.
|
1718 | 1723 | * @param databaseId Required. The ID to use for the database, which will become the final
|
1719 | 1724 | * component of the database's resource name.
|
1720 |
| - * <p>The value must be set to "(default)". |
| 1725 | + * <p>This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first |
| 1726 | + * character a letter and the last a letter or a number. Must not be UUID-like |
| 1727 | + * /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. |
| 1728 | + * <p>"(default)" database id is also valid. |
1721 | 1729 | * @throws com.google.api.gax.rpc.ApiException if the remote call fails
|
1722 | 1730 | */
|
1723 | 1731 | public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsync(
|
@@ -2161,6 +2169,149 @@ public final UnaryCallable<UpdateDatabaseRequest, Operation> updateDatabaseCalla
|
2161 | 2169 | return stub.updateDatabaseCallable();
|
2162 | 2170 | }
|
2163 | 2171 |
|
| 2172 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 2173 | + /** |
| 2174 | + * Deletes a database. |
| 2175 | + * |
| 2176 | + * <p>Sample code: |
| 2177 | + * |
| 2178 | + * <pre>{@code |
| 2179 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 2180 | + * // It will require modifications to work: |
| 2181 | + * // - It may require correct/in-range values for request initialization. |
| 2182 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 2183 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 2184 | + * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) { |
| 2185 | + * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]"); |
| 2186 | + * Database response = firestoreAdminClient.deleteDatabaseAsync(name).get(); |
| 2187 | + * } |
| 2188 | + * }</pre> |
| 2189 | + * |
| 2190 | + * @param name Required. A name of the form `projects/{project_id}/databases/{database_id}` |
| 2191 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 2192 | + */ |
| 2193 | + public final OperationFuture<Database, DeleteDatabaseMetadata> deleteDatabaseAsync( |
| 2194 | + DatabaseName name) { |
| 2195 | + DeleteDatabaseRequest request = |
| 2196 | + DeleteDatabaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
| 2197 | + return deleteDatabaseAsync(request); |
| 2198 | + } |
| 2199 | + |
| 2200 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 2201 | + /** |
| 2202 | + * Deletes a database. |
| 2203 | + * |
| 2204 | + * <p>Sample code: |
| 2205 | + * |
| 2206 | + * <pre>{@code |
| 2207 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 2208 | + * // It will require modifications to work: |
| 2209 | + * // - It may require correct/in-range values for request initialization. |
| 2210 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 2211 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 2212 | + * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) { |
| 2213 | + * String name = DatabaseName.of("[PROJECT]", "[DATABASE]").toString(); |
| 2214 | + * Database response = firestoreAdminClient.deleteDatabaseAsync(name).get(); |
| 2215 | + * } |
| 2216 | + * }</pre> |
| 2217 | + * |
| 2218 | + * @param name Required. A name of the form `projects/{project_id}/databases/{database_id}` |
| 2219 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 2220 | + */ |
| 2221 | + public final OperationFuture<Database, DeleteDatabaseMetadata> deleteDatabaseAsync(String name) { |
| 2222 | + DeleteDatabaseRequest request = DeleteDatabaseRequest.newBuilder().setName(name).build(); |
| 2223 | + return deleteDatabaseAsync(request); |
| 2224 | + } |
| 2225 | + |
| 2226 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 2227 | + /** |
| 2228 | + * Deletes a database. |
| 2229 | + * |
| 2230 | + * <p>Sample code: |
| 2231 | + * |
| 2232 | + * <pre>{@code |
| 2233 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 2234 | + * // It will require modifications to work: |
| 2235 | + * // - It may require correct/in-range values for request initialization. |
| 2236 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 2237 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 2238 | + * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) { |
| 2239 | + * DeleteDatabaseRequest request = |
| 2240 | + * DeleteDatabaseRequest.newBuilder() |
| 2241 | + * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString()) |
| 2242 | + * .setEtag("etag3123477") |
| 2243 | + * .build(); |
| 2244 | + * Database response = firestoreAdminClient.deleteDatabaseAsync(request).get(); |
| 2245 | + * } |
| 2246 | + * }</pre> |
| 2247 | + * |
| 2248 | + * @param request The request object containing all of the parameters for the API call. |
| 2249 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 2250 | + */ |
| 2251 | + public final OperationFuture<Database, DeleteDatabaseMetadata> deleteDatabaseAsync( |
| 2252 | + DeleteDatabaseRequest request) { |
| 2253 | + return deleteDatabaseOperationCallable().futureCall(request); |
| 2254 | + } |
| 2255 | + |
| 2256 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 2257 | + /** |
| 2258 | + * Deletes a database. |
| 2259 | + * |
| 2260 | + * <p>Sample code: |
| 2261 | + * |
| 2262 | + * <pre>{@code |
| 2263 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 2264 | + * // It will require modifications to work: |
| 2265 | + * // - It may require correct/in-range values for request initialization. |
| 2266 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 2267 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 2268 | + * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) { |
| 2269 | + * DeleteDatabaseRequest request = |
| 2270 | + * DeleteDatabaseRequest.newBuilder() |
| 2271 | + * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString()) |
| 2272 | + * .setEtag("etag3123477") |
| 2273 | + * .build(); |
| 2274 | + * OperationFuture<Database, DeleteDatabaseMetadata> future = |
| 2275 | + * firestoreAdminClient.deleteDatabaseOperationCallable().futureCall(request); |
| 2276 | + * // Do something. |
| 2277 | + * Database response = future.get(); |
| 2278 | + * } |
| 2279 | + * }</pre> |
| 2280 | + */ |
| 2281 | + public final OperationCallable<DeleteDatabaseRequest, Database, DeleteDatabaseMetadata> |
| 2282 | + deleteDatabaseOperationCallable() { |
| 2283 | + return stub.deleteDatabaseOperationCallable(); |
| 2284 | + } |
| 2285 | + |
| 2286 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 2287 | + /** |
| 2288 | + * Deletes a database. |
| 2289 | + * |
| 2290 | + * <p>Sample code: |
| 2291 | + * |
| 2292 | + * <pre>{@code |
| 2293 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 2294 | + * // It will require modifications to work: |
| 2295 | + * // - It may require correct/in-range values for request initialization. |
| 2296 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 2297 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 2298 | + * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) { |
| 2299 | + * DeleteDatabaseRequest request = |
| 2300 | + * DeleteDatabaseRequest.newBuilder() |
| 2301 | + * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString()) |
| 2302 | + * .setEtag("etag3123477") |
| 2303 | + * .build(); |
| 2304 | + * ApiFuture<Operation> future = |
| 2305 | + * firestoreAdminClient.deleteDatabaseCallable().futureCall(request); |
| 2306 | + * // Do something. |
| 2307 | + * Operation response = future.get(); |
| 2308 | + * } |
| 2309 | + * }</pre> |
| 2310 | + */ |
| 2311 | + public final UnaryCallable<DeleteDatabaseRequest, Operation> deleteDatabaseCallable() { |
| 2312 | + return stub.deleteDatabaseCallable(); |
| 2313 | + } |
| 2314 | + |
2164 | 2315 | @Override
|
2165 | 2316 | public final void close() {
|
2166 | 2317 | stub.close();
|
|
0 commit comments