
                         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)z3Generated client library for documentai version v1.    )absolute_import)base_api)documentai_v1_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 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 )!DocumentaiV1z;Generated client library for service documentai version v1.z"https://documentai.googleapis.com/z'https://documentai.mtls.googleapis.com/
documentaiz.https://www.googleapis.com/auth/cloud-platformv1	CLIENT_IDCLIENT_SECRETzgoogle-cloud-sdkNc                    |xs | j                   }t        t        |   |||||||||	|
|       | j	                  |       | _        | j                  |       | _        | j                  |       | _	        | j                  |       | _        | j                  |       | _        | j                  |       | _        | j!                  |       | _        | j%                  |       | _        | j)                  |       | _        | j-                  |       | _        y)zCreate a new documentai handle.)
credentialsget_credentialshttpmodellog_requestlog_responsecredentials_argsdefault_global_paramsadditional_http_headersresponse_encodingN)BASE_URLsuperr   __init__OperationsService
operations"ProjectsLocationsOperationsServiceprojects_locations_operations&ProjectsLocationsProcessorTypesService!projects_locations_processorTypes3ProjectsLocationsProcessorsHumanReviewConfigService/projects_locations_processors_humanReviewConfig>ProjectsLocationsProcessorsProcessorVersionsEvaluationsService;projects_locations_processors_processorVersions_evaluations3ProjectsLocationsProcessorsProcessorVersionsService/projects_locations_processors_processorVersions"ProjectsLocationsProcessorsServiceprojects_locations_processorsProjectsLocationsServiceprojects_locationsProjectsOperationsServiceprojects_operationsProjectsServiceprojects)selfurlr   r   r   r   r   r   r   r   r   r   	__class__s               Olib/googlecloudsdk/generated_clients/apis/documentai/v1/documentai_v1_client.pyr   zDocumentaiV1.__init__   s    
C	,&'d%l)3 7+ ' - ,,T2DO)-)P)PQU)VD&-1-X-XY]-^D*;?;s;stx;yD8GK  HK  HK  LP  HQDD;?;s;stx;yD8)-)P)PQU)VD&";;DAD#==dCD((.DM    c                   >     e Zd ZdZdZ fdZddZd e_         xZS )DocumentaiV1.OperationsServicez*Service class for the operations resource.r   c                 N    t         t        j                  |   |       i | _        y N)r   r   r   r   _upload_configsr.   clientr0   s     r1   r   z'DocumentaiV1.OperationsService.__init__:   s"    L**D:6Bdr2   c                 L    | j                  d      }| j                  |||      S )a  Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

      Args:
        request: (DocumentaiOperationsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      Deleteglobal_paramsGetMethodConfig
_RunMethodr.   requestr=   configs       r1   r;   z%DocumentaiV1.OperationsService.Delete?   1     ##H-f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzv1/operations/{operationsId}DELETEzdocumentai.operations.deletename
v1/{+name} !DocumentaiOperationsDeleteRequest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 r2   r1   <lambda>z'DocumentaiV1.OperationsService.<lambda>L   s4    8#9#900xH"=0$r2   r6   )	__name__
__module____qualname____doc___NAMEr   r;   method_config__classcell__r0   s   @r1   r   r4   5   s"    4E
8Fr2   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 )/DocumentaiV1.ProjectsLocationsOperationsServicez=Service class for the projects_locations_operations resource.r   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r   r   r7   r8   s     r1   r   z8DocumentaiV1.ProjectsLocationsOperationsService.__init___   "    L;;TKFSdr2   c                 L    | j                  d      }| j                  |||      S )aG  Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.

      Args:
        request: (DocumentaiProjectsLocationsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleProtobufEmpty) The response message.
      Cancelr<   r>   rA   s       r1   ri   z6DocumentaiV1.ProjectsLocationsOperationsService.Canceld   rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzQv1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancelPOSTz/documentai.projects.locations.operations.cancelrG   zv1/{+name}:cancelrI   2DocumentaiProjectsLocationsOperationsCancelRequestrK   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsOperationsService.<lambda>q   s4    8#9#9eCxH)N0$r2   c                 L    | j                  d      }| j                  |||      S )a  Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

      Args:
        request: (DocumentaiProjectsLocationsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Getr<   r>   rA   s       r1   rn   z3DocumentaiV1.ProjectsLocationsOperationsService.Get   1     ##E*f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzJv1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}GETz,documentai.projects.locations.operations.getrG   rH   rI   /DocumentaiProjectsLocationsOperationsGetRequestGoogleLongrunningOperationFrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsOperationsService.<lambda>   s4     6 6^@xH"K7!r2   c                 L    | j                  d      }| j                  |||      S )a  Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

      Args:
        request: (DocumentaiProjectsLocationsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningListOperationsResponse) The response message.
      Listr<   r>   rA   s       r1   ru   z4DocumentaiV1.ProjectsLocationsOperationsService.List   1     ##F+f__
'  8 8r2   c                  J    t        j                  ddddgdgg ddddd	d
      S )Nz;v1/projects/{projectsId}/locations/{locationsId}/operationsrq   z-documentai.projects.locations.operations.listrG   )filterpageSize	pageTokenrH   rI   0DocumentaiProjectsLocationsOperationsListRequest'GoogleLongrunningListOperationsResponseFrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsOperationsService.<lambda>   s4    !7!7OAxH8"LD"r2   r6   )r\   r]   r^   r_   r`   r   ri   ra   rn   ru   rb   rc   s   @r1   r   re   Z   s@    G+E
8F8C8Dr2   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 )	3DocumentaiV1.ProjectsLocationsProcessorTypesServicezAService class for the projects_locations_processorTypes resource.r   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r   r   r7   r8   s     r1   r   z<DocumentaiV1.ProjectsLocationsProcessorTypesService.__init__   s#    L??OPVWdr2   c                 L    | j                  d      }| j                  |||      S )a+  Gets a processor type detail.

      Args:
        request: (DocumentaiProjectsLocationsProcessorTypesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ProcessorType) The response message.
      rn   r<   r>   rA   s       r1   rn   z7DocumentaiV1.ProjectsLocationsProcessorTypesService.Get   ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzRv1/projects/{projectsId}/locations/{locationsId}/processorTypes/{processorTypesId}rq   z0documentai.projects.locations.processorTypes.getrG   rH   rI   3DocumentaiProjectsLocationsProcessorTypesGetRequest$GoogleCloudDocumentaiV1ProcessorTypeFrL   rX   rZ   r2   r1   r[   z<DocumentaiV1.ProjectsLocationsProcessorTypesService.<lambda>   s4     6 6fDxH"OA!r2   c                 L    | j                  d      }| j                  |||      S )aA  Lists the processor types that exist.

      Args:
        request: (DocumentaiProjectsLocationsProcessorTypesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ListProcessorTypesResponse) The response message.
      ru   r<   r>   rA   s       r1   ru   z8DocumentaiV1.ProjectsLocationsProcessorTypesService.List   rv   r2   c                  J    t        j                  ddddgdgddgddd	d
d      S )Nz?v1/projects/{projectsId}/locations/{locationsId}/processorTypesrq   z1documentai.projects.locations.processorTypes.listparentry   rz   zv1/{+parent}/processorTypesrI   4DocumentaiProjectsLocationsProcessorTypesListRequest1GoogleCloudDocumentaiV1ListProcessorTypesResponseFrL   rX   rZ   r2   r1   r[   z<DocumentaiV1.ProjectsLocationsProcessorTypesService.<lambda>   s9    !7!7SE zJ +.3PN"r2   r6   
r\   r]   r^   r_   r`   r   rn   ra   ru   rb   rc   s   @r1   r   r~      s1    K/E
8C8Dr2   r   c                   >     e Zd ZdZdZ fdZddZd e_         xZS )@DocumentaiV1.ProjectsLocationsProcessorsHumanReviewConfigServicezOService class for the projects_locations_processors_humanReviewConfig resource.r!   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r    r   r7   r8   s     r1   r   zIDocumentaiV1.ProjectsLocationsProcessorsHumanReviewConfigService.__init__   #    LLLd\]cddr2   c                 L    | j                  d      }| j                  |||      S )a  Send a document for Human Review. The input document should be processed by the specified processor.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsHumanReviewConfigReviewDocumentRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      ReviewDocumentr<   r>   rA   s       r1   r   zODocumentaiV1.ProjectsLocationsProcessorsHumanReviewConfigService.ReviewDocument   s2     ##$45f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzkv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/humanReviewConfig:reviewDocumentrk   zIdocumentai.projects.locations.processors.humanReviewConfig.reviewDocumenthumanReviewConfigz&v1/{+humanReviewConfig}:reviewDocument,googleCloudDocumentaiV1ReviewDocumentRequestKDocumentaiProjectsLocationsProcessorsHumanReviewConfigReviewDocumentRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsHumanReviewConfigService.<lambda>  s6    8+A+A]+,()>Dg7,r2   r6   )	r\   r]   r^   r_   r`   r   r   ra   rb   rc   s   @r1   r    r      s"    Y=E
8$N  r2   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 )	KDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsServicez[Service class for the projects_locations_processors_processorVersions_evaluations resource.r#   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r"   r   r7   r8   s     r1   r   zTDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsService.__init__  s$    LWWY]ghnodr2   c                 L    | j                  d      }| j                  |||      S )aC  Retrieves a specific evaluation.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1Evaluation) The response message.
      rn   r<   r>   rA   s       r1   rn   zODocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsService.Get$  ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}/evaluations/{evaluationsId}rq   zJdocumentai.projects.locations.processors.processorVersions.evaluations.getrG   rH   rI   KDocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluationsGetRequest!GoogleCloudDocumentaiV1EvaluationFrL   rX   rZ   r2   r1   r[   zTDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsService.<lambda>1  s7     6 6 c^xH"g>!r2   c                 L    | j                  d      }| j                  |||      S )an  Retrieves a set of evaluations for a given processor version.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ListEvaluationsResponse) The response message.
      ru   r<   r>   rA   s       r1   ru   zPDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsService.List?  rv   r2   c                  J    t        j                  ddddgdgddgddd	d
d      S )Nz~v1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}/evaluationsrq   zKdocumentai.projects.locations.processors.processorVersions.evaluations.listr   ry   rz   zv1/{+parent}/evaluationsrI   LDocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluationsListRequest.GoogleCloudDocumentaiV1ListEvaluationsResponseFrL   rX   rZ   r2   r1   r[   zTDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsEvaluationsService.<lambda>L  s<    !7!7 S_ zJ +.0hK"r2   r6   r   rc   s   @r1   r"   r     s1    eIE
8C8Dr2   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_        ddZd e_        ddZd e_        ddZd e_        ddZd e_         xZS )@DocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsServicezOService class for the projects_locations_processors_processorVersions resource.r%   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r$   r   r7   r8   s     r1   r   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.__init___  r   r2   c                 L    | j                  d      }| j                  |||      S )a  LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsBatchProcessRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      BatchProcessr<   r>   rA   s       r1   r   zMDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.BatchProcessd  1     ##N3f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}:batchProcessrk   zGdocumentai.projects.locations.processors.processorVersions.batchProcessrG   v1/{+name}:batchProcess*googleCloudDocumentaiV1BatchProcessRequestIDocumentaiProjectsLocationsProcessorsProcessorVersionsBatchProcessRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>q  s7    )?)? T[xH/Be7*r2   c                 L    | j                  d      }| j                  |||      S )am  Deletes the processor version, all artifacts under the processor version will be deleted.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      r;   r<   r>   rA   s       r1   r;   zGDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Delete  rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nrv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}rF   zAdocumentai.projects.locations.processors.processorVersions.deleterG   rH   rI   CDocumentaiProjectsLocationsProcessorsProcessorVersionsDeleteRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s7    8#9#9 GUxH"_7$r2   c                 L    | j                  d      }| j                  |||      S )a2  Deploys the processor version.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsDeployRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Deployr<   r>   rA   s       r1   r   zGDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Deploy  rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzyv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}:deployrk   zAdocumentai.projects.locations.processors.processorVersions.deployrG   zv1/{+name}:deploy4googleCloudDocumentaiV1DeployProcessorVersionRequestCDocumentaiProjectsLocationsProcessorsProcessorVersionsDeployRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s7    8#9#9 NUxH)L_7$r2   c                 L    | j                  d      }| j                  |||      S )ax  Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      EvaluateProcessorVersionr<   r>   rA   s       r1   r   zYDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.EvaluateProcessorVersion  s2     ##$>?f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}:evaluateProcessorVersionrk   zSdocumentai.projects.locations.processors.processorVersions.evaluateProcessorVersionprocessorVersionz/v1/{+processorVersion}:evaluateProcessorVersion6googleCloudDocumentaiV1EvaluateProcessorVersionRequestUDocumentaiProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s9    X5K5K `g*+'(GNq76r2   c                 L    | j                  d      }| j                  |||      S )a>  Gets a processor version detail.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ProcessorVersion) The response message.
      rn   r<   r>   rA   s       r1   rn   zDDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Get  ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nr   rq   z>documentai.projects.locations.processors.processorVersions.getrG   rH   rI   @DocumentaiProjectsLocationsProcessorsProcessorVersionsGetRequest'GoogleCloudDocumentaiV1ProcessorVersionFrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s7     6 6 GRxH"\D!r2   c                 L    | j                  d      }| j                  |||      S )aN  Lists all versions of a processor.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ListProcessorVersionsResponse) The response message.
      ru   r<   r>   rA   s       r1   ru   zEDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.List  rv   r2   c                  J    t        j                  ddddgdgddgddd	d
d      S )Nz\v1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersionsrq   z?documentai.projects.locations.processors.processorVersions.listr   ry   rz   zv1/{+parent}/processorVersionsrI   ADocumentaiProjectsLocationsProcessorsProcessorVersionsListRequest4GoogleCloudDocumentaiV1ListProcessorVersionsResponseFrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s9    !7!7pS zJ +.6]Q"r2   c                 L    | j                  d      }| j                  |||      S )a=  Processes a single document.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsProcessRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ProcessResponse) The response message.
      Processr<   r>   rA   s       r1   r   zHDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Process  1     ##I.f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzzv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}:processrk   zBdocumentai.projects.locations.processors.processorVersions.processrG   v1/{+name}:process%googleCloudDocumentaiV1ProcessRequestDDocumentaiProjectsLocationsProcessorsProcessorVersionsProcessRequest&GoogleCloudDocumentaiV1ProcessResponseFrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>  s7    H$:$: OVxH*=`C%r2   c                 L    | j                  d      }| j                  |||      S )as  Trains a new processor version. Operation metadata is returned as TrainProcessorVersionMetadata.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsTrainRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Trainr<   r>   rA   s       r1   r   zFDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Train!  s1     ##G,f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzbv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions:trainrk   z@documentai.projects.locations.processors.processorVersions.trainr   z$v1/{+parent}/processorVersions:train3googleCloudDocumentaiV1TrainProcessorVersionRequestBDocumentaiProjectsLocationsProcessorsProcessorVersionsTrainRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>.  s4    ("8"8vT zJ<K^7#r2   c                 L    | j                  d      }| j                  |||      S )a6  Undeploys the processor version.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessorVersionsUndeployRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Undeployr<   r>   rA   s       r1   r   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.Undeploy<  s1     ##J/f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz{v1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}/processorVersions/{processorVersionsId}:undeployrk   zCdocumentai.projects.locations.processors.processorVersions.undeployrG   zv1/{+name}:undeploy6googleCloudDocumentaiV1UndeployProcessorVersionRequestEDocumentaiProjectsLocationsProcessorsProcessorVersionsUndeployRequestrs   FrL   rX   rZ   r2   r1   r[   zIDocumentaiV1.ProjectsLocationsProcessorsProcessorVersionsService.<lambda>I  s7    X%;%; PWxH+Na7&r2   r6   )r\   r]   r^   r_   r`   r   r   ra   r;   r   r   rn   ru   r   r   r   rb   rc   s   @r1   r$   r   Z  s    Y=E
8"L8F8F8.*8C8D8G8E8Hr2   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_        ddZd e_        ddZd e_        ddZd e_        ddZd e_         xZS )/DocumentaiV1.ProjectsLocationsProcessorsServicez=Service class for the projects_locations_processors resource.r'   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r&   r   r7   r8   s     r1   r   z8DocumentaiV1.ProjectsLocationsProcessorsService.__init__\  rg   r2   c                 L    | j                  d      }| j                  |||      S )a  LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsBatchProcessRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      r   r<   r>   rA   s       r1   r   z<DocumentaiV1.ProjectsLocationsProcessorsService.BatchProcessa  r   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzWv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}:batchProcessrk   z5documentai.projects.locations.processors.batchProcessrG   r   r   8DocumentaiProjectsLocationsProcessorsBatchProcessRequestrs   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>n  s4    )?)?kIxH/BT7*r2   c                 L    | j                  d      }| j                  |||      S )a~  Creates a processor from the ProcessorType provided. The processor will be at `ENABLED` state by default after its creation. Note that this method requires the `documentai.processors.create` permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1Processor) The response message.
      Creater<   r>   rA   s       r1   r   z6DocumentaiV1.ProjectsLocationsProcessorsService.Create|  rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )N;v1/projects/{projectsId}/locations/{locationsId}/processorsrk   z/documentai.projects.locations.processors.creater   v1/{+parent}/processors googleCloudDocumentaiV1Processor2DocumentaiProjectsLocationsProcessorsCreateRequest GoogleCloudDocumentaiV1ProcessorFrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s4    8#9#9OC zJ/8N=$r2   c                 L    | j                  d      }| j                  |||      S )a  Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      r;   r<   r>   rA   s       r1   r;   z6DocumentaiV1.ProjectsLocationsProcessorsService.Delete  rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NJv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}rF   z/documentai.projects.locations.processors.deleterG   rH   rI   2DocumentaiProjectsLocationsProcessorsDeleteRequestrs   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s4    8#9#9^CxH"N7$r2   c                 L    | j                  d      }| j                  |||      S )a  Disables a processor.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsDisableRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Disabler<   r>   rA   s       r1   r   z7DocumentaiV1.ProjectsLocationsProcessorsService.Disable  r   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzRv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}:disablerk   z0documentai.projects.locations.processors.disablerG   zv1/{+name}:disable.googleCloudDocumentaiV1DisableProcessorRequest3DocumentaiProjectsLocationsProcessorsDisableRequestrs   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s4    H$:$:fDxH*FO7%r2   c                 L    | j                  d      }| j                  |||      S )a  Enables a processor.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsEnableRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      Enabler<   r>   rA   s       r1   r   z6DocumentaiV1.ProjectsLocationsProcessorsService.Enable  rD   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzQv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}:enablerk   z/documentai.projects.locations.processors.enablerG   zv1/{+name}:enable-googleCloudDocumentaiV1EnableProcessorRequest2DocumentaiProjectsLocationsProcessorsEnableRequestrs   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s4    8#9#9eCxH)EN7$r2   c                 L    | j                  d      }| j                  |||      S )a  Gets a processor detail.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1Processor) The response message.
      rn   r<   r>   rA   s       r1   rn   z3DocumentaiV1.ProjectsLocationsProcessorsService.Get  ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nr   rq   z,documentai.projects.locations.processors.getrG   rH   rI   /DocumentaiProjectsLocationsProcessorsGetRequestr   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s4     6 6^@xH"K=!r2   c                 L    | j                  d      }| j                  |||      S )aF  Lists all processors which belong to this project.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ListProcessorsResponse) The response message.
      ru   r<   r>   rA   s       r1   ru   z4DocumentaiV1.ProjectsLocationsProcessorsService.List  rv   r2   c                  J    t        j                  ddddgdgddgddd	d
d      S )Nr   rq   z-documentai.projects.locations.processors.listr   ry   rz   r   rI   0DocumentaiProjectsLocationsProcessorsListRequest-GoogleCloudDocumentaiV1ListProcessorsResponseFrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>  s9    !7!7OA zJ +./LJ"r2   c                 L    | j                  d      }| j                  |||      S )a,  Processes a single document.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsProcessRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1ProcessResponse) The response message.
      r   r<   r>   rA   s       r1   r   z7DocumentaiV1.ProjectsLocationsProcessorsService.Process  r   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzRv1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}:processrk   z0documentai.projects.locations.processors.processrG   r   r   3DocumentaiProjectsLocationsProcessorsProcessRequestr   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>+  s4    H$:$:fDxH*=OC%r2   c                 L    | j                  d      }| j                  |||      S )a  Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

      Args:
        request: (DocumentaiProjectsLocationsProcessorsSetDefaultProcessorVersionRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      SetDefaultProcessorVersionr<   r>   rA   s       r1   r   zJDocumentaiV1.ProjectsLocationsProcessorsService.SetDefaultProcessorVersion9  s2     ##$@Af__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzev1/projects/{projectsId}/locations/{locationsId}/processors/{processorsId}:setDefaultProcessorVersionrk   zCdocumentai.projects.locations.processors.setDefaultProcessorVersion	processorz*v1/{+processor}:setDefaultProcessorVersion8googleCloudDocumentaiV1SetDefaultProcessorVersionRequestFDocumentaiProjectsLocationsProcessorsSetDefaultProcessorVersionRequestrs   FrL   rX   rZ   r2   r1   r[   z8DocumentaiV1.ProjectsLocationsProcessorsService.<lambda>F  s4    x7M7MyW#} MBPb78r2   r6   )r\   r]   r^   r_   r`   r   r   ra   r   r;   r   r   rn   ru   r   r   rb   rc   s   @r1   r&   r   W  s    G+E
8"L8F8F8G8F8C8D8G80,,r2   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 )%DocumentaiV1.ProjectsLocationsServicez2Service class for the projects_locations resource.r)   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r(   r   r7   r8   s     r1   r   z.DocumentaiV1.ProjectsLocationsService.__init__Y  s"    L114A&Idr2   c                 L    | j                  d      }| j                  |||      S )a  Fetches processor types. Note that we don't use ListProcessorTypes here, because it isn't paginated.

      Args:
        request: (DocumentaiProjectsLocationsFetchProcessorTypesRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudDocumentaiV1FetchProcessorTypesResponse) The response message.
      FetchProcessorTypesr<   r>   rA   s       r1   r  z9DocumentaiV1.ProjectsLocationsService.FetchProcessorTypes^  s2     ##$9:f__
'  8 8r2   c                  F    t        j                  ddddgdgg ddddd	
      S )NzDv1/projects/{projectsId}/locations/{locationsId}:fetchProcessorTypesrq   z1documentai.projects.locations.fetchProcessorTypesr   z v1/{+parent}:fetchProcessorTypesrI   5DocumentaiProjectsLocationsFetchProcessorTypesRequest2GoogleCloudDocumentaiV1FetchProcessorTypesResponseFrL   rX   rZ   r2   r1   r[   z.DocumentaiV1.ProjectsLocationsService.<lambda>k  s4    0F0FXE zJ8QO1r2   c                 L    | j                  d      }| j                  |||      S )a  Gets information about a location.

      Args:
        request: (DocumentaiProjectsLocationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudLocationLocation) The response message.
      rn   r<   r>   rA   s       r1   rn   z)DocumentaiV1.ProjectsLocationsService.Gety  ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz0v1/projects/{projectsId}/locations/{locationsId}rq   z!documentai.projects.locations.getrG   rH   rI   %DocumentaiProjectsLocationsGetRequestGoogleCloudLocationLocationFrL   rX   rZ   r2   r1   r[   z.DocumentaiV1.ProjectsLocationsService.<lambda>  s4     6 6D5xH"A8!r2   c                 L    | j                  d      }| j                  |||      S )aF  Lists information about the supported locations for this service.

      Args:
        request: (DocumentaiProjectsLocationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudLocationListLocationsResponse) The response message.
      ru   r<   r>   rA   s       r1   ru   z*DocumentaiV1.ProjectsLocationsService.List  rv   r2   c                  J    t        j                  ddddgdgg ddddd	d
      S )Nz"v1/projects/{projectsId}/locationsrq   z"documentai.projects.locations.listrG   )extraLocationTypesrx   ry   rz   zv1/{+name}/locationsrI   &DocumentaiProjectsLocationsListRequest(GoogleCloudLocationListLocationsResponseFrL   rX   rZ   r2   r1   r[   z.DocumentaiV1.ProjectsLocationsService.<lambda>  s4    !7!766xHN,BE"r2   r6   )r\   r]   r^   r_   r`   r   r  ra   rn   ru   rb   rc   s   @r1   r(   r   T  sA    < E
8)%8C8Dr2   r(   c                   >     e Zd ZdZdZ fdZddZd e_         xZS )&DocumentaiV1.ProjectsOperationsServicez3Service class for the projects_operations resource.r+   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r*   r   r7   r8   s     r1   r   z/DocumentaiV1.ProjectsOperationsService.__init__  s"    L22DB6Jdr2   c                 L    | j                  d      }| j                  |||      S )a  Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

      Args:
        request: (DocumentaiProjectsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) The response message.
      rn   r<   r>   rA   s       r1   rn   z*DocumentaiV1.ProjectsOperationsService.Get  ro   r2   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz2v1/projects/{projectsId}/operations/{operationsId}rq   z"documentai.projects.operations.getrG   rH   rI   &DocumentaiProjectsOperationsGetRequestrs   FrL   rX   rZ   r2   r1   r[   z/DocumentaiV1.ProjectsOperationsService.<lambda>  s4     6 6F6xH"B7!r2   r6   )	r\   r]   r^   r_   r`   r   rn   ra   rb   rc   s   @r1   r*   r    s"    =!E
8Cr2   r*   c                   &     e Zd ZdZdZ fdZ xZS )DocumentaiV1.ProjectsServicez(Service class for the projects resource.r-   c                 N    t         t        j                  |   |       i | _        y r6   )r   r   r,   r   r7   r8   s     r1   r   z%DocumentaiV1.ProjectsService.__init__  s"    L(($8@dr2   )r\   r]   r^   r_   r`   r   rb   rc   s   @r1   r,   r    s    2E r2   r,   )rI   NTNNFFNNNN)r\   r]   r^   r_   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$   r&   r(   r*   r,   rb   rc   s   @r1   r   r   
   s$   C/1(;-(=>'(*"."+%,()-6:/4<@?C	/4#(11 #JY8+B+B Yv>x/F/F >@#H<S<S #J>xG^G^ >@{H<S<S {z{8+B+B {zY!8!8 Yv#("9"9 #J//  r2   r   N)
r_   
__future__r   apitools.base.pyr   3googlecloudsdk.generated_clients.apis.documentai.v1r   r  BaseApiClientr   rZ   r2   r1   <module>r)     s'    9 ' % bR8)) Rr2   