Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
chore: Use gapic-generator-python 0.65.0 (#61)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440970084

Source-Link: googleapis/googleapis@5e0a3d5

Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0c628a3fade768f225d76992791ea1ba2a881be
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9

docs: fix type in docstring for map fields
  • Loading branch information
gcf-owl-bot[bot] authored Apr 12, 2022
1 parent 96333ee commit 6c5982b
Show file tree
Hide file tree
Showing 28 changed files with 1,427 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -403,7 +403,7 @@ def sample_get_migration_workflow():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -511,7 +511,7 @@ def sample_list_migration_workflows():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -644,7 +644,6 @@ async def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block:: python
from google.cloud import bigquery_migration_v2
Expand Down Expand Up @@ -705,7 +704,7 @@ def sample_start_migration_workflow():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -870,7 +870,6 @@ def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block:: python
from google.cloud import bigquery_migration_v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -134,7 +135,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand All @@ -148,7 +149,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand All @@ -167,7 +168,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=60.0,
),
Expand Down Expand Up @@ -273,5 +274,9 @@ def list_migration_subtasks(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("MigrationServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -433,5 +433,9 @@ def list_migration_subtasks(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("MigrationServiceGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MigrationWorkflow(proto.Message):
The display name of the workflow. This can be
set to give a workflow a descriptive name. There
is no guarantee or enforcement of uniqueness.
tasks (Sequence[google.cloud.bigquery_migration_v2.types.MigrationWorkflow.TasksEntry]):
tasks (Mapping[str, google.cloud.bigquery_migration_v2.types.MigrationTask]):
The tasks in a workflow in a named map. The
name (i.e. key) has no meaning and is merely a
convenient way to address a specific task in a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -403,7 +403,7 @@ def sample_get_migration_workflow():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down Expand Up @@ -511,7 +511,7 @@ def sample_list_migration_workflows():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down Expand Up @@ -644,7 +644,6 @@ async def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block:: python
from google.cloud import bigquery_migration_v2alpha
Expand Down Expand Up @@ -705,7 +704,7 @@ def sample_start_migration_workflow():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down Expand Up @@ -811,7 +810,7 @@ def sample_get_migration_subtask():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down Expand Up @@ -918,7 +917,7 @@ def sample_list_migration_subtasks():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -870,7 +870,6 @@ def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block:: python
from google.cloud import bigquery_migration_v2alpha
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -134,7 +135,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand All @@ -148,7 +149,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand All @@ -167,7 +168,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand All @@ -181,7 +182,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand All @@ -195,7 +196,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=120.0,
),
Expand Down Expand Up @@ -291,5 +292,9 @@ def list_migration_subtasks(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("MigrationServiceTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -433,5 +433,9 @@ def list_migration_subtasks(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("MigrationServiceGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MigrationWorkflow(proto.Message):
The display name of the workflow. This can be
set to give a workflow a descriptive name. There
is no guarantee or enforcement of uniqueness.
tasks (Sequence[google.cloud.bigquery_migration_v2alpha.types.MigrationWorkflow.TasksEntry]):
tasks (Mapping[str, google.cloud.bigquery_migration_v2alpha.types.MigrationTask]):
The tasks in a workflow in a named map. The
name (i.e. key) has no meaning and is merely a
convenient way to address a specific task in a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TranslationTaskDetails(proto.Message):
The file encoding type.
identifier_settings (google.cloud.bigquery_migration_v2alpha.types.IdentifierSettings):
The settings for SQL identifiers.
special_token_map (Sequence[google.cloud.bigquery_migration_v2alpha.types.TranslationTaskDetails.SpecialTokenMapEntry]):
special_token_map (Mapping[str, google.cloud.bigquery_migration_v2alpha.types.TranslationTaskDetails.TokenType]):
The map capturing special tokens to be
replaced during translation. The key is special
token in string. The value is the token data
Expand Down Expand Up @@ -259,7 +259,7 @@ class BteqOptions(proto.Message):
The Cloud Storage location to be used as the
default path for files that are not otherwise
specified in the file replacement map.
file_replacement_map (Sequence[google.cloud.bigquery_migration_v2alpha.types.BteqOptions.FileReplacementMapEntry]):
file_replacement_map (Mapping[str, str]):
Maps the local paths that are used in BTEQ
scripts (the keys) to the paths in Cloud Storage
that should be used in their stead in the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateMigrationWorkflow
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-migration


# [START bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async]
from google.cloud import bigquery_migration_v2alpha


async def sample_create_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceAsyncClient()

# Initialize request argument(s)
request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest(
parent="parent_value",
)

# Make the request
response = await client.create_migration_workflow(request=request)

# Handle the response
print(response)

# [END bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateMigrationWorkflow
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-bigquery-migration


# [START bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_sync]
from google.cloud import bigquery_migration_v2alpha


def sample_create_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()

# Initialize request argument(s)
request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest(
parent="parent_value",
)

# Make the request
response = client.create_migration_workflow(request=request)

# Handle the response
print(response)

# [END bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_sync]
Loading

0 comments on commit 6c5982b

Please sign in to comment.