Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.56.2 (#19)
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: googleapis/googleapis-gen@6598ca8
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] authored Nov 10, 2021
1 parent 6850bb7 commit 8a4d17b
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 41 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.cloud.bigquery_migration_v2alpha.services.migration_service import pagers
from google.cloud.bigquery_migration_v2alpha.types import migration_entities
Expand Down
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.cloud.bigquery_migration_v2alpha.services.migration_service import pagers
from google.cloud.bigquery_migration_v2alpha.types import migration_entities
Expand Down Expand Up @@ -306,8 +308,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
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,27 @@ class TypedValue(proto.Message):
Attributes:
bool_value (bool):
A Boolean value: ``true`` or ``false``.
This field is a member of `oneof`_ ``value``.
int64_value (int):
A 64-bit integer. Its range is approximately
+/-9.2x10^18.
This field is a member of `oneof`_ ``value``.
double_value (float):
A 64-bit double-precision floating-point
number. Its magnitude is approximately
+/-10^(+/-300) and it has 16 significant digits
of precision.
This field is a member of `oneof`_ ``value``.
string_value (str):
A variable-length string value.
This field is a member of `oneof`_ ``value``.
distribution_value (google.api.distribution_pb2.Distribution):
A distribution value.
This field is a member of `oneof`_ ``value``.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,12 @@ def test_create_migration_workflow_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
assert args[0].migration_workflow == migration_entities.MigrationWorkflow(
name="name_value"
)
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val
arg = args[0].migration_workflow
mock_val = migration_entities.MigrationWorkflow(name="name_value")
assert arg == mock_val


def test_create_migration_workflow_flattened_error():
Expand Down Expand Up @@ -725,10 +727,12 @@ async def test_create_migration_workflow_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
assert args[0].migration_workflow == migration_entities.MigrationWorkflow(
name="name_value"
)
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val
arg = args[0].migration_workflow
mock_val = migration_entities.MigrationWorkflow(name="name_value")
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -921,7 +925,9 @@ def test_get_migration_workflow_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


def test_get_migration_workflow_flattened_error():
Expand Down Expand Up @@ -959,7 +965,9 @@ async def test_get_migration_workflow_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -1143,7 +1151,9 @@ def test_list_migration_workflows_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val


def test_list_migration_workflows_flattened_error():
Expand Down Expand Up @@ -1181,7 +1191,9 @@ async def test_list_migration_workflows_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -1531,7 +1543,9 @@ def test_delete_migration_workflow_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


def test_delete_migration_workflow_flattened_error():
Expand Down Expand Up @@ -1567,7 +1581,9 @@ async def test_delete_migration_workflow_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -1741,7 +1757,9 @@ def test_start_migration_workflow_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


def test_start_migration_workflow_flattened_error():
Expand Down Expand Up @@ -1777,7 +1795,9 @@ async def test_start_migration_workflow_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -1976,7 +1996,9 @@ def test_get_migration_subtask_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


def test_get_migration_subtask_flattened_error():
Expand Down Expand Up @@ -2014,7 +2036,9 @@ async def test_get_migration_subtask_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].name == "name_value"
arg = args[0].name
mock_val = "name_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down Expand Up @@ -2197,7 +2221,9 @@ def test_list_migration_subtasks_flattened():
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val


def test_list_migration_subtasks_flattened_error():
Expand Down Expand Up @@ -2235,7 +2261,9 @@ async def test_list_migration_subtasks_flattened_async():
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
assert args[0].parent == "parent_value"
arg = args[0].parent
mock_val = "parent_value"
assert arg == mock_val


@pytest.mark.asyncio
Expand Down

0 comments on commit 8a4d17b

Please sign in to comment.