Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.56.2 (pylint-dev#491)
Browse files Browse the repository at this point in the history
* chore: update Java and Python dependencies

PiperOrigin-RevId: 408420890

Source-Link: googleapis/googleapis@2921f9f

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Nov 9, 2021
1 parent 6b5a779 commit 1d4b3a5
Show file tree
Hide file tree
Showing 19 changed files with 241 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
from typing import Dict, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]
try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation as gac_operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down
25 changes: 17 additions & 8 deletions google/cloud/firestore_admin_v1/services/firestore_admin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@
# limitations under the License.
#
from collections import OrderedDict
from distutils import util
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport import mtls # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]
try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.api_core import operation as gac_operation # type: ignore
from google.api_core import operation_async # type: ignore
Expand Down Expand Up @@ -338,8 +340,15 @@ def __init__(
client_options = client_options_lib.ClientOptions()

# Create SSL credentials for mutual TLS if needed.
use_client_cert = bool(
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
"true",
"false",
):
raise ValueError(
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
)
use_client_cert = (
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
)

client_cert_source_func = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import pkg_resources

import google.auth # type: ignore
import google.api_core # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.api_core import operations_v1 # type: ignore
import google.api_core
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core import operations_v1
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import warnings
from typing import Callable, Dict, Optional, Sequence, Tuple, Union

from google.api_core import grpc_helpers # type: ignore
from google.api_core import operations_v1 # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import grpc_helpers
from google.api_core import operations_v1
from google.api_core import gapic_v1
import google.auth # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import warnings
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union

from google.api_core import gapic_v1 # type: ignore
from google.api_core import grpc_helpers_async # type: ignore
from google.api_core import operations_v1 # type: ignore
from google.api_core import gapic_v1
from google.api_core import grpc_helpers_async
from google.api_core import operations_v1
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/cloud/firestore_admin_v1/types/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ class IndexField(proto.Message):
Indicates that this field supports ordering
by the specified order or comparing using =, <,
<=, >, >=.
This field is a member of `oneof`_ ``value_mode``.
array_config (google.cloud.firestore_admin_v1.types.Index.IndexField.ArrayConfig):
Indicates that this field supports operations on
``array_value``\ s.
This field is a member of `oneof`_ ``value_mode``.
"""

Expand Down
1 change: 1 addition & 0 deletions google/cloud/firestore_bundle/types/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class BundledQuery(proto.Message):
The parent resource name.
structured_query (google.firestore.v1.query_pb2.StructuredQuery):
A structured query.
This field is a member of `oneof`_ ``query_type``.
limit_type (google.cloud.bundle.types.BundledQuery.LimitType):
Expand Down
13 changes: 8 additions & 5 deletions google/cloud/firestore_v1/services/firestore/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@
)
import pkg_resources

from google.api_core.client_options import ClientOptions # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]
try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.cloud.firestore_v1.services.firestore import pagers
from google.cloud.firestore_v1.types import common
Expand Down
25 changes: 17 additions & 8 deletions google/cloud/firestore_v1/services/firestore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@
# limitations under the License.
#
from collections import OrderedDict
from distutils import util
import os
import re
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport import mtls # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore

OptionalRetry = Union[retries.Retry, object]
try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.cloud.firestore_v1.services.firestore import pagers
from google.cloud.firestore_v1.types import common
Expand Down Expand Up @@ -280,8 +282,15 @@ def __init__(
client_options = client_options_lib.ClientOptions()

# Create SSL credentials for mutual TLS if needed.
use_client_cert = bool(
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
"true",
"false",
):
raise ValueError(
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
)
use_client_cert = (
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
)

client_cert_source_func = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import pkg_resources

import google.auth # type: ignore
import google.api_core # type: ignore
from google.api_core import exceptions as core_exceptions # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import retry as retries # type: ignore
import google.api_core
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import warnings
from typing import Callable, Dict, Optional, Sequence, Tuple, Union

from google.api_core import grpc_helpers # type: ignore
from google.api_core import gapic_v1 # type: ignore
from google.api_core import grpc_helpers
from google.api_core import gapic_v1
import google.auth # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import warnings
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union

from google.api_core import gapic_v1 # type: ignore
from google.api_core import grpc_helpers_async # type: ignore
from google.api_core import gapic_v1
from google.api_core import grpc_helpers_async
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore

Expand Down
5 changes: 5 additions & 0 deletions google/cloud/firestore_v1/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ class Precondition(proto.Message):
exists (bool):
When set to ``true``, the target document must exist. When
set to ``false``, the target document must not exist.
This field is a member of `oneof`_ ``condition_type``.
update_time (google.protobuf.timestamp_pb2.Timestamp):
When set, the target document must exist and
have been last updated at that time.
This field is a member of `oneof`_ ``condition_type``.
"""

Expand All @@ -86,10 +88,12 @@ class TransactionOptions(proto.Message):
read_only (google.cloud.firestore_v1.types.TransactionOptions.ReadOnly):
The transaction can only be used for read
operations.
This field is a member of `oneof`_ ``mode``.
read_write (google.cloud.firestore_v1.types.TransactionOptions.ReadWrite):
The transaction can be used for both read and
write operations.
This field is a member of `oneof`_ ``mode``.
"""

Expand All @@ -115,6 +119,7 @@ class ReadOnly(proto.Message):
read_time (google.protobuf.timestamp_pb2.Timestamp):
Reads documents at the given time.
This may not be older than 60 seconds.
This field is a member of `oneof`_ ``consistency_selector``.
"""

Expand Down
11 changes: 11 additions & 0 deletions google/cloud/firestore_v1/types/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,50 +96,61 @@ class Value(proto.Message):
Attributes:
null_value (google.protobuf.struct_pb2.NullValue):
A null value.
This field is a member of `oneof`_ ``value_type``.
boolean_value (bool):
A boolean value.
This field is a member of `oneof`_ ``value_type``.
integer_value (int):
An integer value.
This field is a member of `oneof`_ ``value_type``.
double_value (float):
A double value.
This field is a member of `oneof`_ ``value_type``.
timestamp_value (google.protobuf.timestamp_pb2.Timestamp):
A timestamp value.
Precise only to microseconds. When stored, any
additional precision is rounded down.
This field is a member of `oneof`_ ``value_type``.
string_value (str):
A string value.
The string, represented as UTF-8, must not
exceed 1 MiB - 89 bytes. Only the first 1,500
bytes of the UTF-8 representation are considered
by queries.
This field is a member of `oneof`_ ``value_type``.
bytes_value (bytes):
A bytes value.
Must not exceed 1 MiB - 89 bytes.
Only the first 1,500 bytes are considered by
queries.
This field is a member of `oneof`_ ``value_type``.
reference_value (str):
A reference to a document. For example:
``projects/{project_id}/databases/{database_id}/documents/{document_path}``.
This field is a member of `oneof`_ ``value_type``.
geo_point_value (google.type.latlng_pb2.LatLng):
A geo point value representing a point on the
surface of Earth.
This field is a member of `oneof`_ ``value_type``.
array_value (google.cloud.firestore_v1.types.ArrayValue):
An array value.
Cannot directly contain another array value,
though can contain an map which contains another
array.
This field is a member of `oneof`_ ``value_type``.
map_value (google.cloud.firestore_v1.types.MapValue):
A map value.
This field is a member of `oneof`_ ``value_type``.
"""

Expand Down

0 comments on commit 1d4b3a5

Please sign in to comment.