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

Commit 13b7ac7

Browse files
docs: add generated snippets (#38)
* 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>
1 parent b3b1ee2 commit 13b7ac7

File tree

17 files changed

+1512
-0
lines changed

17 files changed

+1512
-0
lines changed

google/cloud/bigquery_migration_v2alpha/services/migration_service/async_client.py

+130
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,25 @@ async def create_migration_workflow(
227227
) -> migration_entities.MigrationWorkflow:
228228
r"""Creates a migration workflow.
229229
230+
.. code-block::
231+
232+
from google.cloud import bigquery_migration_v2alpha
233+
234+
def sample_create_migration_workflow():
235+
# Create a client
236+
client = bigquery_migration_v2alpha.MigrationServiceClient()
237+
238+
# Initialize request argument(s)
239+
request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest(
240+
parent="parent_value",
241+
)
242+
243+
# Make the request
244+
response = client.create_migration_workflow(request=request)
245+
246+
# Handle the response
247+
print(response)
248+
230249
Args:
231250
request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]):
232251
The request object. Request to create a migration
@@ -309,6 +328,25 @@ async def get_migration_workflow(
309328
) -> migration_entities.MigrationWorkflow:
310329
r"""Gets a previously created migration workflow.
311330
331+
.. code-block::
332+
333+
from google.cloud import bigquery_migration_v2alpha
334+
335+
def sample_get_migration_workflow():
336+
# Create a client
337+
client = bigquery_migration_v2alpha.MigrationServiceClient()
338+
339+
# Initialize request argument(s)
340+
request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest(
341+
name="name_value",
342+
)
343+
344+
# Make the request
345+
response = client.get_migration_workflow(request=request)
346+
347+
# Handle the response
348+
print(response)
349+
312350
Args:
313351
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]):
314352
The request object. A request to get a previously
@@ -391,6 +429,26 @@ async def list_migration_workflows(
391429
) -> pagers.ListMigrationWorkflowsAsyncPager:
392430
r"""Lists previously created migration workflow.
393431
432+
.. code-block::
433+
434+
from google.cloud import bigquery_migration_v2alpha
435+
436+
def sample_list_migration_workflows():
437+
# Create a client
438+
client = bigquery_migration_v2alpha.MigrationServiceClient()
439+
440+
# Initialize request argument(s)
441+
request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest(
442+
parent="parent_value",
443+
)
444+
445+
# Make the request
446+
page_result = client.list_migration_workflows(request=request)
447+
448+
# Handle the response
449+
for response in page_result:
450+
print(response)
451+
394452
Args:
395453
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]):
396454
The request object. A request to list previously created
@@ -480,6 +538,22 @@ async def delete_migration_workflow(
480538
) -> None:
481539
r"""Deletes a migration workflow by name.
482540
541+
.. code-block::
542+
543+
from google.cloud import bigquery_migration_v2alpha
544+
545+
def sample_delete_migration_workflow():
546+
# Create a client
547+
client = bigquery_migration_v2alpha.MigrationServiceClient()
548+
549+
# Initialize request argument(s)
550+
request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest(
551+
name="name_value",
552+
)
553+
554+
# Make the request
555+
client.delete_migration_workflow(request=request)
556+
483557
Args:
484558
request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]):
485559
The request object. A request to delete a previously
@@ -549,6 +623,23 @@ async def start_migration_workflow(
549623
signaled if the state is anything other than DRAFT or
550624
RUNNING.
551625
626+
627+
.. code-block::
628+
629+
from google.cloud import bigquery_migration_v2alpha
630+
631+
def sample_start_migration_workflow():
632+
# Create a client
633+
client = bigquery_migration_v2alpha.MigrationServiceClient()
634+
635+
# Initialize request argument(s)
636+
request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest(
637+
name="name_value",
638+
)
639+
640+
# Make the request
641+
client.start_migration_workflow(request=request)
642+
552643
Args:
553644
request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]):
554645
The request object. A request to start a previously
@@ -623,6 +714,25 @@ async def get_migration_subtask(
623714
) -> migration_entities.MigrationSubtask:
624715
r"""Gets a previously created migration subtask.
625716
717+
.. code-block::
718+
719+
from google.cloud import bigquery_migration_v2alpha
720+
721+
def sample_get_migration_subtask():
722+
# Create a client
723+
client = bigquery_migration_v2alpha.MigrationServiceClient()
724+
725+
# Initialize request argument(s)
726+
request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest(
727+
name="name_value",
728+
)
729+
730+
# Make the request
731+
response = client.get_migration_subtask(request=request)
732+
733+
# Handle the response
734+
print(response)
735+
626736
Args:
627737
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]):
628738
The request object. A request to get a previously
@@ -708,6 +818,26 @@ async def list_migration_subtasks(
708818
) -> pagers.ListMigrationSubtasksAsyncPager:
709819
r"""Lists previously created migration subtasks.
710820
821+
.. code-block::
822+
823+
from google.cloud import bigquery_migration_v2alpha
824+
825+
def sample_list_migration_subtasks():
826+
# Create a client
827+
client = bigquery_migration_v2alpha.MigrationServiceClient()
828+
829+
# Initialize request argument(s)
830+
request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest(
831+
parent="parent_value",
832+
)
833+
834+
# Make the request
835+
page_result = client.list_migration_subtasks(request=request)
836+
837+
# Handle the response
838+
for response in page_result:
839+
print(response)
840+
711841
Args:
712842
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]):
713843
The request object. A request to list previously created

google/cloud/bigquery_migration_v2alpha/services/migration_service/client.py

+137
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,26 @@ def create_migration_workflow(
434434
) -> migration_entities.MigrationWorkflow:
435435
r"""Creates a migration workflow.
436436
437+
438+
.. code-block::
439+
440+
from google.cloud import bigquery_migration_v2alpha
441+
442+
def sample_create_migration_workflow():
443+
# Create a client
444+
client = bigquery_migration_v2alpha.MigrationServiceClient()
445+
446+
# Initialize request argument(s)
447+
request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest(
448+
parent="parent_value",
449+
)
450+
451+
# Make the request
452+
response = client.create_migration_workflow(request=request)
453+
454+
# Handle the response
455+
print(response)
456+
437457
Args:
438458
request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]):
439459
The request object. Request to create a migration
@@ -518,6 +538,26 @@ def get_migration_workflow(
518538
) -> migration_entities.MigrationWorkflow:
519539
r"""Gets a previously created migration workflow.
520540
541+
542+
.. code-block::
543+
544+
from google.cloud import bigquery_migration_v2alpha
545+
546+
def sample_get_migration_workflow():
547+
# Create a client
548+
client = bigquery_migration_v2alpha.MigrationServiceClient()
549+
550+
# Initialize request argument(s)
551+
request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest(
552+
name="name_value",
553+
)
554+
555+
# Make the request
556+
response = client.get_migration_workflow(request=request)
557+
558+
# Handle the response
559+
print(response)
560+
521561
Args:
522562
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]):
523563
The request object. A request to get a previously
@@ -591,6 +631,27 @@ def list_migration_workflows(
591631
) -> pagers.ListMigrationWorkflowsPager:
592632
r"""Lists previously created migration workflow.
593633
634+
635+
.. code-block::
636+
637+
from google.cloud import bigquery_migration_v2alpha
638+
639+
def sample_list_migration_workflows():
640+
# Create a client
641+
client = bigquery_migration_v2alpha.MigrationServiceClient()
642+
643+
# Initialize request argument(s)
644+
request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest(
645+
parent="parent_value",
646+
)
647+
648+
# Make the request
649+
page_result = client.list_migration_workflows(request=request)
650+
651+
# Handle the response
652+
for response in page_result:
653+
print(response)
654+
594655
Args:
595656
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]):
596657
The request object. A request to list previously created
@@ -671,6 +732,23 @@ def delete_migration_workflow(
671732
) -> None:
672733
r"""Deletes a migration workflow by name.
673734
735+
736+
.. code-block::
737+
738+
from google.cloud import bigquery_migration_v2alpha
739+
740+
def sample_delete_migration_workflow():
741+
# Create a client
742+
client = bigquery_migration_v2alpha.MigrationServiceClient()
743+
744+
# Initialize request argument(s)
745+
request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest(
746+
name="name_value",
747+
)
748+
749+
# Make the request
750+
client.delete_migration_workflow(request=request)
751+
674752
Args:
675753
request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]):
676754
The request object. A request to delete a previously
@@ -742,6 +820,24 @@ def start_migration_workflow(
742820
signaled if the state is anything other than DRAFT or
743821
RUNNING.
744822
823+
824+
825+
.. code-block::
826+
827+
from google.cloud import bigquery_migration_v2alpha
828+
829+
def sample_start_migration_workflow():
830+
# Create a client
831+
client = bigquery_migration_v2alpha.MigrationServiceClient()
832+
833+
# Initialize request argument(s)
834+
request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest(
835+
name="name_value",
836+
)
837+
838+
# Make the request
839+
client.start_migration_workflow(request=request)
840+
745841
Args:
746842
request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]):
747843
The request object. A request to start a previously
@@ -807,6 +903,26 @@ def get_migration_subtask(
807903
) -> migration_entities.MigrationSubtask:
808904
r"""Gets a previously created migration subtask.
809905
906+
907+
.. code-block::
908+
909+
from google.cloud import bigquery_migration_v2alpha
910+
911+
def sample_get_migration_subtask():
912+
# Create a client
913+
client = bigquery_migration_v2alpha.MigrationServiceClient()
914+
915+
# Initialize request argument(s)
916+
request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest(
917+
name="name_value",
918+
)
919+
920+
# Make the request
921+
response = client.get_migration_subtask(request=request)
922+
923+
# Handle the response
924+
print(response)
925+
810926
Args:
811927
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]):
812928
The request object. A request to get a previously
@@ -883,6 +999,27 @@ def list_migration_subtasks(
883999
) -> pagers.ListMigrationSubtasksPager:
8841000
r"""Lists previously created migration subtasks.
8851001
1002+
1003+
.. code-block::
1004+
1005+
from google.cloud import bigquery_migration_v2alpha
1006+
1007+
def sample_list_migration_subtasks():
1008+
# Create a client
1009+
client = bigquery_migration_v2alpha.MigrationServiceClient()
1010+
1011+
# Initialize request argument(s)
1012+
request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest(
1013+
parent="parent_value",
1014+
)
1015+
1016+
# Make the request
1017+
page_result = client.list_migration_subtasks(request=request)
1018+
1019+
# Handle the response
1020+
for response in page_result:
1021+
print(response)
1022+
8861023
Args:
8871024
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]):
8881025
The request object. A request to list previously created

0 commit comments

Comments
 (0)