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

Commit

Permalink
docs: add generated snippets (#38)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 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 Feb 11, 2022
1 parent b3b1ee2 commit 13b7ac7
Show file tree
Hide file tree
Showing 17 changed files with 1,512 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,25 @@ async def create_migration_workflow(
) -> migration_entities.MigrationWorkflow:
r"""Creates a migration workflow.
.. code-block::
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)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]):
The request object. Request to create a migration
Expand Down Expand Up @@ -309,6 +328,25 @@ async def get_migration_workflow(
) -> migration_entities.MigrationWorkflow:
r"""Gets a previously created migration workflow.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_get_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest(
name="name_value",
)
# Make the request
response = client.get_migration_workflow(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]):
The request object. A request to get a previously
Expand Down Expand Up @@ -391,6 +429,26 @@ async def list_migration_workflows(
) -> pagers.ListMigrationWorkflowsAsyncPager:
r"""Lists previously created migration workflow.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_list_migration_workflows():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_migration_workflows(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]):
The request object. A request to list previously created
Expand Down Expand Up @@ -480,6 +538,22 @@ async def delete_migration_workflow(
) -> None:
r"""Deletes a migration workflow by name.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_delete_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest(
name="name_value",
)
# Make the request
client.delete_migration_workflow(request=request)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]):
The request object. A request to delete a previously
Expand Down Expand Up @@ -549,6 +623,23 @@ async def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_start_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest(
name="name_value",
)
# Make the request
client.start_migration_workflow(request=request)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]):
The request object. A request to start a previously
Expand Down Expand Up @@ -623,6 +714,25 @@ async def get_migration_subtask(
) -> migration_entities.MigrationSubtask:
r"""Gets a previously created migration subtask.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_get_migration_subtask():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest(
name="name_value",
)
# Make the request
response = client.get_migration_subtask(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]):
The request object. A request to get a previously
Expand Down Expand Up @@ -708,6 +818,26 @@ async def list_migration_subtasks(
) -> pagers.ListMigrationSubtasksAsyncPager:
r"""Lists previously created migration subtasks.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_list_migration_subtasks():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_migration_subtasks(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]):
The request object. A request to list previously created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,26 @@ def create_migration_workflow(
) -> migration_entities.MigrationWorkflow:
r"""Creates a migration workflow.
.. code-block::
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)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]):
The request object. Request to create a migration
Expand Down Expand Up @@ -518,6 +538,26 @@ def get_migration_workflow(
) -> migration_entities.MigrationWorkflow:
r"""Gets a previously created migration workflow.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_get_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest(
name="name_value",
)
# Make the request
response = client.get_migration_workflow(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]):
The request object. A request to get a previously
Expand Down Expand Up @@ -591,6 +631,27 @@ def list_migration_workflows(
) -> pagers.ListMigrationWorkflowsPager:
r"""Lists previously created migration workflow.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_list_migration_workflows():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_migration_workflows(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]):
The request object. A request to list previously created
Expand Down Expand Up @@ -671,6 +732,23 @@ def delete_migration_workflow(
) -> None:
r"""Deletes a migration workflow by name.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_delete_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest(
name="name_value",
)
# Make the request
client.delete_migration_workflow(request=request)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]):
The request object. A request to delete a previously
Expand Down Expand Up @@ -742,6 +820,24 @@ def start_migration_workflow(
signaled if the state is anything other than DRAFT or
RUNNING.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_start_migration_workflow():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest(
name="name_value",
)
# Make the request
client.start_migration_workflow(request=request)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]):
The request object. A request to start a previously
Expand Down Expand Up @@ -807,6 +903,26 @@ def get_migration_subtask(
) -> migration_entities.MigrationSubtask:
r"""Gets a previously created migration subtask.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_get_migration_subtask():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest(
name="name_value",
)
# Make the request
response = client.get_migration_subtask(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]):
The request object. A request to get a previously
Expand Down Expand Up @@ -883,6 +999,27 @@ def list_migration_subtasks(
) -> pagers.ListMigrationSubtasksPager:
r"""Lists previously created migration subtasks.
.. code-block::
from google.cloud import bigquery_migration_v2alpha
def sample_list_migration_subtasks():
# Create a client
client = bigquery_migration_v2alpha.MigrationServiceClient()
# Initialize request argument(s)
request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_migration_subtasks(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]):
The request object. A request to list previously created
Expand Down
Loading

0 comments on commit 13b7ac7

Please sign in to comment.