Skip to content

Commit 8e01860

Browse files
authored
chore: Revert autogenerated changes which have not been released (#838)
1 parent 6e9103f commit 8e01860

File tree

19 files changed

+60
-1291
lines changed

19 files changed

+60
-1291
lines changed

google/cloud/firestore_admin_v1/gapic_metadata.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
"create_index"
2121
]
2222
},
23-
"DeleteDatabase": {
24-
"methods": [
25-
"delete_database"
26-
]
27-
},
2823
"DeleteIndex": {
2924
"methods": [
3025
"delete_index"
@@ -95,11 +90,6 @@
9590
"create_index"
9691
]
9792
},
98-
"DeleteDatabase": {
99-
"methods": [
100-
"delete_database"
101-
]
102-
},
10393
"DeleteIndex": {
10494
"methods": [
10595
"delete_index"
@@ -170,11 +160,6 @@
170160
"create_index"
171161
]
172162
},
173-
"DeleteDatabase": {
174-
"methods": [
175-
"delete_database"
176-
]
177-
},
178163
"DeleteIndex": {
179164
"methods": [
180165
"delete_index"

google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py

Lines changed: 17 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ async def list_fields(
10101010
overridden. To issue this query, call
10111011
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
10121012
with the filter set to ``indexConfig.usesAncestorConfig:false``
1013-
or ``ttlConfig:*``.
1013+
.
10141014
10151015
.. code-block:: python
10161016
@@ -1448,16 +1448,12 @@ async def sample_create_database():
14481448
on the ``request`` instance; if ``request`` is provided, this
14491449
should not be set.
14501450
database_id (:class:`str`):
1451-
Required. The ID to use for the database, which will
1452-
become the final component of the database's resource
1451+
Required. The ID to use for the
1452+
database, which will become the final
1453+
component of the database's resource
14531454
name.
14541455
1455-
This value should be 4-63 characters. Valid characters
1456-
are /[a-z][0-9]-/ with first character a letter and the
1457-
last a letter or a number. Must not be UUID-like
1458-
/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
1459-
1460-
"(default)" database id is also valid.
1456+
The value must be set to "(default)".
14611457
14621458
This corresponds to the ``database_id`` field
14631459
on the ``request`` instance; if ``request`` is provided, this
@@ -1472,9 +1468,10 @@ async def sample_create_database():
14721468
google.api_core.operation_async.AsyncOperation:
14731469
An object representing a long-running operation.
14741470
1475-
The result type for the operation will be
1476-
:class:`google.cloud.firestore_admin_v1.types.Database`
1477-
A Cloud Firestore Database.
1471+
The result type for the operation will be :class:`google.cloud.firestore_admin_v1.types.Database` A Cloud Firestore Database.
1472+
Currently only one database is allowed per cloud
1473+
project; this database must have a database_id of
1474+
'(default)'.
14781475
14791476
"""
14801477
# Create or coerce a protobuf request object.
@@ -1588,6 +1585,10 @@ async def sample_get_database():
15881585
Returns:
15891586
google.cloud.firestore_admin_v1.types.Database:
15901587
A Cloud Firestore Database.
1588+
Currently only one database is allowed per cloud
1589+
project; this database must have a database_id of
1590+
'(default)'.
1591+
15911592
"""
15921593
# Create or coerce a protobuf request object.
15931594
# Quick check: If we got a request object, we should *not* have
@@ -1797,9 +1798,10 @@ async def sample_update_database():
17971798
google.api_core.operation_async.AsyncOperation:
17981799
An object representing a long-running operation.
17991800
1800-
The result type for the operation will be
1801-
:class:`google.cloud.firestore_admin_v1.types.Database`
1802-
A Cloud Firestore Database.
1801+
The result type for the operation will be :class:`google.cloud.firestore_admin_v1.types.Database` A Cloud Firestore Database.
1802+
Currently only one database is allowed per cloud
1803+
project; this database must have a database_id of
1804+
'(default)'.
18031805
18041806
"""
18051807
# Create or coerce a protobuf request object.
@@ -1856,123 +1858,6 @@ async def sample_update_database():
18561858
# Done; return the response.
18571859
return response
18581860

1859-
async def delete_database(
1860-
self,
1861-
request: Optional[Union[firestore_admin.DeleteDatabaseRequest, dict]] = None,
1862-
*,
1863-
name: Optional[str] = None,
1864-
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1865-
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1866-
metadata: Sequence[Tuple[str, str]] = (),
1867-
) -> operation_async.AsyncOperation:
1868-
r"""Deletes a database.
1869-
1870-
.. code-block:: python
1871-
1872-
# This snippet has been automatically generated and should be regarded as a
1873-
# code template only.
1874-
# It will require modifications to work:
1875-
# - It may require correct/in-range values for request initialization.
1876-
# - It may require specifying regional endpoints when creating the service
1877-
# client as shown in:
1878-
# https://googleapis.dev/python/google-api-core/latest/client_options.html
1879-
from google.cloud import firestore_admin_v1
1880-
1881-
async def sample_delete_database():
1882-
# Create a client
1883-
client = firestore_admin_v1.FirestoreAdminAsyncClient()
1884-
1885-
# Initialize request argument(s)
1886-
request = firestore_admin_v1.DeleteDatabaseRequest(
1887-
name="name_value",
1888-
)
1889-
1890-
# Make the request
1891-
operation = client.delete_database(request=request)
1892-
1893-
print("Waiting for operation to complete...")
1894-
1895-
response = (await operation).result()
1896-
1897-
# Handle the response
1898-
print(response)
1899-
1900-
Args:
1901-
request (Optional[Union[google.cloud.firestore_admin_v1.types.DeleteDatabaseRequest, dict]]):
1902-
The request object. The request for
1903-
[FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase].
1904-
name (:class:`str`):
1905-
Required. A name of the form
1906-
``projects/{project_id}/databases/{database_id}``
1907-
1908-
This corresponds to the ``name`` field
1909-
on the ``request`` instance; if ``request`` is provided, this
1910-
should not be set.
1911-
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1912-
should be retried.
1913-
timeout (float): The timeout for this request.
1914-
metadata (Sequence[Tuple[str, str]]): Strings which should be
1915-
sent along with the request as metadata.
1916-
1917-
Returns:
1918-
google.api_core.operation_async.AsyncOperation:
1919-
An object representing a long-running operation.
1920-
1921-
The result type for the operation will be
1922-
:class:`google.cloud.firestore_admin_v1.types.Database`
1923-
A Cloud Firestore Database.
1924-
1925-
"""
1926-
# Create or coerce a protobuf request object.
1927-
# Quick check: If we got a request object, we should *not* have
1928-
# gotten any keyword arguments that map to the request.
1929-
has_flattened_params = any([name])
1930-
if request is not None and has_flattened_params:
1931-
raise ValueError(
1932-
"If the `request` argument is set, then none of "
1933-
"the individual field arguments should be set."
1934-
)
1935-
1936-
request = firestore_admin.DeleteDatabaseRequest(request)
1937-
1938-
# If we have keyword arguments corresponding to fields on the
1939-
# request, apply these.
1940-
if name is not None:
1941-
request.name = name
1942-
1943-
# Wrap the RPC method; this adds retry and timeout information,
1944-
# and friendly error handling.
1945-
rpc = gapic_v1.method_async.wrap_method(
1946-
self._client._transport.delete_database,
1947-
default_timeout=None,
1948-
client_info=DEFAULT_CLIENT_INFO,
1949-
)
1950-
1951-
# Certain fields should be provided within the metadata header;
1952-
# add these here.
1953-
metadata = tuple(metadata) + (
1954-
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1955-
)
1956-
1957-
# Send the request.
1958-
response = await rpc(
1959-
request,
1960-
retry=retry,
1961-
timeout=timeout,
1962-
metadata=metadata,
1963-
)
1964-
1965-
# Wrap the response in an operation future.
1966-
response = operation_async.from_gapic(
1967-
response,
1968-
self._client._transport.operations_client,
1969-
database.Database,
1970-
metadata_type=firestore_admin.DeleteDatabaseMetadata,
1971-
)
1972-
1973-
# Done; return the response.
1974-
return response
1975-
19761861
async def list_operations(
19771862
self,
19781863
request: Optional[operations_pb2.ListOperationsRequest] = None,

0 commit comments

Comments
 (0)