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

docs: add generated snippets #38

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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