
    )W                     V    d Z ddlmZ ddlmZ ddlmZ  G d dej                        Z	y)z:Generated client library for bigquerymigration version v2.    )absolute_import)base_api)bigquerymigration_v2_messagesc                   \    e Zd ZdZeZdZdZdZdgZ	dZ
dZdZd	Zd ZdZd
Z	 	 	 	 	 d fd	Z G d dej&                        Z G d dej&                        Z G d dej&                        Z G d dej&                        Z G d dej&                        Z G d dej&                        Z xZS )BigquerymigrationV2zBGenerated client library for service bigquerymigration version v2.z)https://bigquerymigration.googleapis.com/z.https://bigquerymigration.mtls.googleapis.com/bigquerymigrationz.https://www.googleapis.com/auth/cloud-platformv2	CLIENT_IDCLIENT_SECRETzgoogle-cloud-sdkNc                 j   |xs | j                   }t        t        |   |||||||||	|
|       | j	                  |       | _        | j                  |       | _        | j                  |       | _	        | j                  |       | _        | j                  |       | _        | j                  |       | _        y)z&Create a new bigquerymigration handle.)
credentialsget_credentialshttpmodellog_requestlog_responsecredentials_argsdefault_global_paramsadditional_http_headersresponse_encodingN)BASE_URLsuperr   __init__$ProjectsLocationsSubtaskTypesServiceprojects_locations_subtaskTypes!ProjectsLocationsTaskTypesServiceprojects_locations_taskTypes)ProjectsLocationsWorkflowsSubtasksService%projects_locations_workflows_subtasks!ProjectsLocationsWorkflowsServiceprojects_locations_workflowsProjectsLocationsServiceprojects_locationsProjectsServiceprojects)selfurlr   r   r   r   r   r   r   r   r   r   	__class__s               ]lib/googlecloudsdk/generated_clients/apis/bigquerymigration/v2/bigquerymigration_v2_client.pyr   zBigquerymigrationV2.__init__   s     
C	
t-'d%l)3 7+ . - ,0+T+TUY+ZD((,(N(Nt(TD%151_1_`d1eD.(,(N(Nt(TD%";;DAD((.DM    c                   n     e Zd ZdZdZ fdZd
dZd e_        d
dZd e_        d
dZ	d	 e	_         xZ
S )8BigquerymigrationV2.ProjectsLocationsSubtaskTypesServicez?Service class for the projects_locations_subtaskTypes resource.r   c                 N    t         t        j                  |   |       i | _        y N)r   r   r   r   _upload_configsr&   clientr(   s     r)   r   zABigquerymigrationV2.ProjectsLocationsSubtaskTypesService.__init__6   s$    DDdTU[\dr*   c                 L    | j                  d      }| j                  |||      S )a>  Finishes a migration subtask via the subtask type.

      Args:
        request: (BigquerymigrationProjectsLocationsSubtaskTypesFinishSubtaskRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      FinishSubtaskglobal_paramsGetMethodConfig
_RunMethodr&   requestr5   configs       r)   r3   zFBigquerymigrationV2.ProjectsLocationsSubtaskTypesService.FinishSubtask;   s1     ##O4f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz\v2/projects/{projectsId}/locations/{locationsId}/subtaskTypes/{subtaskTypesId}:finishSubtaskPOSTz?bigquerymigration.projects.locations.subtaskTypes.finishSubtasksubtaskTypezv2/{+subtaskType}:finishSubtask2googleCloudBigqueryMigrationV2FinishSubtaskRequestBBigquerymigrationProjectsLocationsSubtaskTypesFinishSubtaskRequestGoogleProtobufEmptyF	flat_pathhttp_method	method_idordered_paramspath_paramsquery_paramsrelative_pathrequest_fieldrequest_type_nameresponse_type_namesupports_downloadr   ApiMethodInfo r*   r)   <lambda>zABigquerymigrationV2.ProjectsLocationsSubtaskTypesService.<lambda>H   s4    (*@*@pS%"O7J^0+r*   c                 L    | j                  d      }| j                  |||      S )a  Assigns a migration subtask to the caller, if available. Example: `/v2/projects/123/locations/us/subtaskTypes:receiveMigrationSubtask`.

      Args:
        request: (BigquerymigrationProjectsLocationsSubtaskTypesReceiveMigrationSubtaskRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2ReceiveMigrationSubtaskResponse) The response message.
      ReceiveMigrationSubtaskr4   r6   r9   s       r)   rS   zPBigquerymigrationV2.ProjectsLocationsSubtaskTypesService.ReceiveMigrationSubtaskV   s2     ##$=>f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )NzUv2/projects/{projectsId}/locations/{locationsId}/subtaskTypes:receiveMigrationSubtaskr=   zIbigquerymigration.projects.locations.subtaskTypes.receiveMigrationSubtaskprojectLocationz-v2/{+projectLocation}:receiveMigrationSubtask<googleCloudBigqueryMigrationV2ReceiveMigrationSubtaskRequestLBigquerymigrationProjectsLocationsSubtaskTypesReceiveMigrationSubtaskRequest=GoogleCloudBigqueryMigrationV2ReceiveMigrationSubtaskResponseFrB   rN   rP   r*   r)   rQ   zABigquerymigrationV2.ProjectsLocationsSubtaskTypesService.<lambda>c   s6    H4J4Ji])*&'EThZ5r*   c                 L    | j                  d      }| j                  |||      S )aj  Renew a lease for a migration subtask by subtask type.

      Args:
        request: (BigquerymigrationProjectsLocationsSubtaskTypesRenewSubtaskLeaseRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2RenewSubtaskLeaseResponse) The response message.
      RenewSubtaskLeaser4   r6   r9   s       r)   rZ   zJBigquerymigrationV2.ProjectsLocationsSubtaskTypesService.RenewSubtaskLeaseq   s2     ##$78f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz`v2/projects/{projectsId}/locations/{locationsId}/subtaskTypes/{subtaskTypesId}:renewSubtaskLeaser=   zCbigquerymigration.projects.locations.subtaskTypes.renewSubtaskLeaser>   z#v2/{+subtaskType}:renewSubtaskLease6googleCloudBigqueryMigrationV2RenewSubtaskLeaseRequestFBigquerymigrationProjectsLocationsSubtaskTypesRenewSubtaskLeaseRequest7GoogleCloudBigqueryMigrationV2RenewSubtaskLeaseResponseFrB   rN   rP   r*   r)   rQ   zABigquerymigrationV2.ProjectsLocationsSubtaskTypesService.<lambda>~   s4    h.D.DtW%"O;NbT/r*   r.   )__name__
__module____qualname____doc___NAMEr   r3   method_configrS   rZ   __classcell__r(   s   @r)   r   r,   1   sB    I-E
8#M8-)8'##r*   r   c                   n     e Zd ZdZdZ fdZd
dZd e_        d
dZd e_        d
dZ	d	 e	_         xZ
S )5BigquerymigrationV2.ProjectsLocationsTaskTypesServicez<Service class for the projects_locations_taskTypes resource.r   c                 N    t         t        j                  |   |       i | _        y r.   )r   r   r   r   r/   r0   s     r)   r   z>BigquerymigrationV2.ProjectsLocationsTaskTypesService.__init__   $    AA4QRXYdr*   c                 L    | j                  d      }| j                  |||      S )a  Updates a migration task's state via the task type. Transition from ORCHESTRATING to either RUNNING or FAILED, depending on the provided state, i.e. whether orchrestration was successful or not.

      Args:
        request: (BigquerymigrationProjectsLocationsTaskTypesFinishMigrationTaskOrchestrationRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
       FinishMigrationTaskOrchestrationr4   r6   r9   s       r)   rl   zVBigquerymigrationV2.ProjectsLocationsTaskTypesService.FinishMigrationTaskOrchestration   s2     ##$FGf__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )Nziv2/projects/{projectsId}/locations/{locationsId}/taskTypes/{taskTypesId}:finishMigrationTaskOrchestrationr=   zObigquerymigration.projects.locations.taskTypes.finishMigrationTaskOrchestrationtaskTypez/v2/{+taskType}:finishMigrationTaskOrchestrationEgoogleCloudBigqueryMigrationV2FinishMigrationTaskOrchestrationRequestRBigquerymigrationProjectsLocationsTaskTypesFinishMigrationTaskOrchestrationRequestrA   FrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsTaskTypesService.<lambda>   s4    X=S=S}c"|LG]n0>r*   c                 L    | j                  d      }| j                  |||      S )ac  Assigns a migration task to the caller (usually an Orchestrator), if available. Example: `/v2/projects/123/locations/us/taskTypes:receiveMigrationTask`. The caller must define at least one type in the request parameters. The service creates a lease and marks the newly assigned task as ORCHESTRATING.

      Args:
        request: (BigquerymigrationProjectsLocationsTaskTypesReceiveMigrationTaskRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2ReceiveMigrationTaskResponse) The response message.
      ReceiveMigrationTaskr4   r6   r9   s       r)   rr   zJBigquerymigrationV2.ProjectsLocationsTaskTypesService.ReceiveMigrationTask   s2     ##$:;f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )NzOv2/projects/{projectsId}/locations/{locationsId}/taskTypes:receiveMigrationTaskr=   zCbigquerymigration.projects.locations.taskTypes.receiveMigrationTaskrU   z4v2/{+projectLocation}/taskTypes:receiveMigrationTask9googleCloudBigqueryMigrationV2ReceiveMigrationTaskRequestFBigquerymigrationProjectsLocationsTaskTypesReceiveMigrationTaskRequest:GoogleCloudBigqueryMigrationV2ReceiveMigrationTaskResponseFrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsTaskTypesService.<lambda>   s6    1G1GcW)*&'LQbW2r*   c                 L    | j                  d      }| j                  |||      S )a[  Renew a lease for a migration task by task type.

      Args:
        request: (BigquerymigrationProjectsLocationsTaskTypesRenewTaskLeaseRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2RenewTaskLeaseResponse) The response message.
      RenewTaskLeaser4   r6   r9   s       r)   rx   zDBigquerymigrationV2.ProjectsLocationsTaskTypesService.RenewTaskLease   2     ##$45f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )NzWv2/projects/{projectsId}/locations/{locationsId}/taskTypes/{taskTypesId}:renewTaskLeaser=   z=bigquerymigration.projects.locations.taskTypes.renewTaskLeasern   zv2/{+taskType}:renewTaskLease3googleCloudBigqueryMigrationV2RenewTaskLeaseRequest@BigquerymigrationProjectsLocationsTaskTypesRenewTaskLeaseRequest4GoogleCloudBigqueryMigrationV2RenewTaskLeaseResponseFrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsTaskTypesService.<lambda>   s4    8+A+AkQ"|L5K\Q,r*   r.   )r_   r`   ra   rb   rc   r   rl   rd   rr   rx   re   rf   s   @r)   r   rh      sB    F*E
86$28*&8$N  r*   r   c                   V     e Zd ZdZdZ fdZddZd e_        ddZd e_         xZ	S )	=BigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksServicezEService class for the projects_locations_workflows_subtasks resource.r   c                 N    t         t        j                  |   |       i | _        y r.   )r   r   r   r   r/   r0   s     r)   r   zFBigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksService.__init__   s$    II4YZ`adr*   c                 L    | j                  d      }| j                  |||      S )aN  Gets a previously created migration subtask.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsSubtasksGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2MigrationSubtask) The response message.
      Getr4   r6   r9   s       r)   r   zABigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksService.Get   1     ##E*f__
'  8 8r*   c                  H    t        j                  ddddgdgdgdddd	d
      S )Nz^v2/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/subtasks/{subtasksId}GETz;bigquerymigration.projects.locations.workflows.subtasks.getnamereadMask
v2/{+name} =BigquerymigrationProjectsLocationsWorkflowsSubtasksGetRequest.GoogleCloudBigqueryMigrationV2MigrationSubtaskFrB   rN   rP   r*   r)   rQ   zFBigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksService.<lambda>   s6     6 6rOxH \"YK!r*   c                 L    | j                  d      }| j                  |||      S )a\  Lists previously created migration subtasks.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsSubtasksListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2ListMigrationSubtasksResponse) The response message.
      Listr4   r6   r9   s       r)   r   zBBigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksService.List  1     ##F+f__
'  8 8r*   c                  J    t        j                  ddddgdgg ddddd	d
      S )NzQv2/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/subtasksr   z<bigquerymigration.projects.locations.workflows.subtasks.listparent)filterpageSize	pageTokenr   zv2/{+parent}/subtasksr   >BigquerymigrationProjectsLocationsWorkflowsSubtasksListRequest;GoogleCloudBigqueryMigrationV2ListMigrationSubtasksResponseFrB   rN   rP   r*   r)   rQ   zFBigquerymigrationV2.ProjectsLocationsWorkflowsSubtasksService.<lambda>  s4    !7!7eP zJD-ZX"r*   r.   )
r_   r`   ra   rb   rc   r   r   rd   r   re   rf   s   @r)   r   r      s1    O3E
8C8Dr*   r   c                        e Zd ZdZdZ fdZddZd e_        ddZd e_        ddZ	d	 e	_        dd
Z
d e
_        ddZd e_         xZS )5BigquerymigrationV2.ProjectsLocationsWorkflowsServicez<Service class for the projects_locations_workflows resource.r!   c                 N    t         t        j                  |   |       i | _        y r.   )r   r   r    r   r/   r0   s     r)   r   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.__init__,  rj   r*   c                 L    | j                  d      }| j                  |||      S )a;  Creates a migration workflow.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2MigrationWorkflow) The response message.
      Creater4   r6   r9   s       r)   r   z<BigquerymigrationV2.ProjectsLocationsWorkflowsService.Create1  1     ##H-f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )N:v2/projects/{projectsId}/locations/{locationsId}/workflowsr=   z5bigquerymigration.projects.locations.workflows.creater   v2/{+parent}/workflows/googleCloudBigqueryMigrationV2MigrationWorkflow8BigquerymigrationProjectsLocationsWorkflowsCreateRequest/GoogleCloudBigqueryMigrationV2MigrationWorkflowFrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.<lambda>>  s4    8#9#9NI zJ.GTL$r*   c                 L    | j                  d      }| j                  |||      S )a'  Deletes a migration workflow by name.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      Deleter4   r6   r9   s       r)   r   z<BigquerymigrationV2.ProjectsLocationsWorkflowsService.DeleteL  r   r*   c                  F    t        j                  ddddgdgg ddddd	
      S )NHv2/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}DELETEz5bigquerymigration.projects.locations.workflows.deleter   r   r   8BigquerymigrationProjectsLocationsWorkflowsDeleteRequestrA   FrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.<lambda>Y  s4    8#9#9\IxH"T0$r*   c                 L    | j                  d      }| j                  |||      S )aH  Gets a previously created migration workflow.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2MigrationWorkflow) The response message.
      r   r4   r6   r9   s       r)   r   z9BigquerymigrationV2.ProjectsLocationsWorkflowsService.Getg  r   r*   c                  H    t        j                  ddddgdgdgdddd	d
      S )Nr   r   z2bigquerymigration.projects.locations.workflows.getr   r   r   r   5BigquerymigrationProjectsLocationsWorkflowsGetRequestr   FrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.<lambda>t  s6     6 6\FxH \"QL!r*   c                 L    | j                  d      }| j                  |||      S )aU  Lists previously created migration workflow.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2ListMigrationWorkflowsResponse) The response message.
      r   r4   r6   r9   s       r)   r   z:BigquerymigrationV2.ProjectsLocationsWorkflowsService.List  r   r*   c                  J    t        j                  ddddgdgg ddddd	d
      S )Nr   r   z3bigquerymigration.projects.locations.workflows.listr   )r   r   r   r   r   6BigquerymigrationProjectsLocationsWorkflowsListRequest<GoogleCloudBigqueryMigrationV2ListMigrationWorkflowsResponseFrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.<lambda>  s4    !7!7NG zJ:.RY"r*   c                 L    | j                  d      }| j                  |||      S )a  Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.

      Args:
        request: (BigquerymigrationProjectsLocationsWorkflowsStartRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      Startr4   r6   r9   s       r)   r   z;BigquerymigrationV2.ProjectsLocationsWorkflowsService.Start  s1     ##G,f__
'  8 8r*   c                  F    t        j                  ddddgdgg ddddd	
      S )NzNv2/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:startr=   z4bigquerymigration.projects.locations.workflows.startr   zv2/{+name}:start;googleCloudBigqueryMigrationV2StartMigrationWorkflowRequest7BigquerymigrationProjectsLocationsWorkflowsStartRequestrA   FrB   rN   rP   r*   r)   rQ   z>BigquerymigrationV2.ProjectsLocationsWorkflowsService.<lambda>  s4    ("8"8bHxH(SS0#r*   r.   )r_   r`   ra   rb   rc   r   r   rd   r   r   r   r   re   rf   s   @r)   r    r   '  s^    F*E
8F8F8C8D8Er*   r    c                   >     e Zd ZdZdZ fdZddZd e_         xZS ),BigquerymigrationV2.ProjectsLocationsServicez2Service class for the projects_locations resource.r#   c                 N    t         t        j                  |   |       i | _        y r.   )r   r   r"   r   r/   r0   s     r)   r   z5BigquerymigrationV2.ProjectsLocationsService.__init__  s#    88$HPdr*   c                 L    | j                  d      }| j                  |||      S )a]  Translates input queries from source dialects to GoogleSQL.

      Args:
        request: (BigquerymigrationProjectsLocationsTranslateQueryRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudBigqueryMigrationV2TranslateQueryResponse) The response message.
      TranslateQueryr4   r6   r9   s       r)   r   z;BigquerymigrationV2.ProjectsLocationsService.TranslateQuery  ry   r*   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz?v2/projects/{projectsId}/locations/{locationsId}:translateQueryr=   z3bigquerymigration.projects.locations.translateQueryr   zv2/{+parent}:translateQuery3googleCloudBigqueryMigrationV2TranslateQueryRequest7BigquerymigrationProjectsLocationsTranslateQueryRequest4GoogleCloudBigqueryMigrationV2TranslateQueryResponseFrB   rN   rP   r*   r)   rQ   z5BigquerymigrationV2.ProjectsLocationsService.<lambda>  s4    8+A+ASG zJ3KSQ,r*   r.   )	r_   r`   ra   rb   rc   r   r   rd   re   rf   s   @r)   r"   r     s"    < E
8$N  r*   r"   c                   &     e Zd ZdZdZ fdZ xZS )#BigquerymigrationV2.ProjectsServicez(Service class for the projects resource.r%   c                 N    t         t        j                  |   |       i | _        y r.   )r   r   r$   r   r/   r0   s     r)   r   z,BigquerymigrationV2.ProjectsService.__init__  s#    //?Gdr*   )r_   r`   ra   rb   rc   r   re   rf   s   @r)   r$   r     s    2E r*   r$   )r   NTNNFFNNNN)r_   r`   ra   rb   messagesMESSAGES_MODULEr   MTLS_BASE_URL_PACKAGE_SCOPES_VERSION
_CLIENT_ID_CLIENT_SECRET_USER_AGENT_CLIENT_CLASS_NAME_URL_VERSION_API_KEYr   r   BaseApiServicer   r   r   r    r"   r$   re   rf   s   @r)   r   r   
   s    J/8(B- (=>'(*"."+,,()-6:/4<@?C	/,YX-D-D YvY(*A*A Yv>(2I2I >@O(*A*A Ob#!8!8 #J//  r*   r   N)
rb   
__future__r   apitools.base.pyr   :googlecloudsdk.generated_clients.apis.bigquerymigration.v2r   r   BaseApiClientr   rP   r*   r)   <module>r      s'    @ ' % p[(00 [r*   