Parses a resume into a ``Profile``. The API attempts to fill out the
        following profile fields if present within the resume:

        -  personNames
        -  addresses
        -  emailAddress
        -  phoneNumbers
        -  personalUris
        -  employmentRecords
        -  educationRecords
        -  skills

        Note that some attributes in these fields may not be populated if
        they're not present within the resume or unrecognizable by the resume
        parser.

        This API does not save the resume or profile. To create a profile from
        this resume, clients need to call the CreateProfile method again with
        the profile returned.

        The following list of formats are supported:

        -  PDF
        -  TXT
        -  DOC
        -  RTF
        -  DOCX
        -  PNG (only when ``ParseResumeRequest.enable_ocr`` is set to ``true``,
           otherwise an error is thrown)

        Example:
            >>> from google.cloud import talent_v4beta1
            >>>
            >>> client = talent_v4beta1.ResumeServiceClient()
            >>>
            >>> parent = client.project_path('[PROJECT]')
            >>>
            >>> # TODO: Initialize `resume`:
            >>> resume = b''
            >>>
            >>> response = client.parse_resume(parent, resume)

        Args:
            parent (str): Required.

                The resource name of the project.

                The format is "projects/{project\_id}", for example,
                "projects/api-test-project".
            resume (bytes): Required.

                The bytes of the resume file in common format, for example, PDF, TXT.
                UTF-8 encoding is required if the resume is text-based, otherwise an error
                is thrown.
            region_code (str): Optional.

                The region code indicating where the resume is from. Values
                are as per the ISO-3166-2 format. For example, US, FR, DE.

                This value is optional, but providing this value improves the resume
                parsing quality and performance.

                An error is thrown if the regionCode is invalid.
            language_code (str): Optional.

                The language code of contents in the resume.

                Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
                For more information, see `Tags for Identifying
                Languages <https://tools.ietf.org/html/bcp47>`__\ {: class="external"
                target="\_blank" }.
            options_ (Union[dict, ~google.cloud.talent_v4beta1.types.ParseResumeOptions]): Optional.

                Options that change how the resume parse is performed.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.talent_v4beta1.types.ParseResumeOptions`
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            A :class:`~google.cloud.talent_v4beta1.types.ParseResumeResponse` instance.

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.

def parse_resume(
        self,
        parent,
        resume,
        region_code=None,
        language_code=None,
        options_=None,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Parses a resume into a ``Profile``. The API attempts to fill out the
        following profile fields if present within the resume:

        -  personNames
        -  addresses
        -  emailAddress
        -  phoneNumbers
        -  personalUris
        -  employmentRecords
        -  educationRecords
        -  skills

        Note that some attributes in these fields may not be populated if
        they're not present within the resume or unrecognizable by the resume
        parser.

        This API does not save the resume or profile. To create a profile from
        this resume, clients need to call the CreateProfile method again with
        the profile returned.

        The following list of formats are supported:

        -  PDF
        -  TXT
        -  DOC
        -  RTF
        -  DOCX
        -  PNG (only when ``ParseResumeRequest.enable_ocr`` is set to ``true``,
           otherwise an error is thrown)

        Example:
            >>> from google.cloud import talent_v4beta1
            >>>
            >>> client = talent_v4beta1.ResumeServiceClient()
            >>>
            >>> parent = client.project_path('[PROJECT]')
            >>>
            >>> # TODO: Initialize `resume`:
            >>> resume = b''
            >>>
            >>> response = client.parse_resume(parent, resume)

        Args:
            parent (str): Required.

                The resource name of the project.

                The format is "projects/{project\_id}", for example,
                "projects/api-test-project".
            resume (bytes): Required.

                The bytes of the resume file in common format, for example, PDF, TXT.
                UTF-8 encoding is required if the resume is text-based, otherwise an error
                is thrown.
            region_code (str): Optional.

                The region code indicating where the resume is from. Values
                are as per the ISO-3166-2 format. For example, US, FR, DE.

                This value is optional, but providing this value improves the resume
                parsing quality and performance.

                An error is thrown if the regionCode is invalid.
            language_code (str): Optional.

                The language code of contents in the resume.

                Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn".
                For more information, see `Tags for Identifying
                Languages <https://tools.ietf.org/html/bcp47>`__\ {: class="external"
                target="\_blank" }.
            options_ (Union[dict, ~google.cloud.talent_v4beta1.types.ParseResumeOptions]): Optional.

                Options that change how the resume parse is performed.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.talent_v4beta1.types.ParseResumeOptions`
            retry (Optional[google.api_core.retry.Retry]):  A retry object used
                to retry requests. If ``None`` is specified, requests will not
                be retried.
            timeout (Optional[float]): The amount of time, in seconds, to wait
                for the request to complete. Note that if ``retry`` is
                specified, the timeout applies to each individual attempt.
            metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
                that is provided to the method.

        Returns:
            A :class:`~google.cloud.talent_v4beta1.types.ParseResumeResponse` instance.

        Raises:
            google.api_core.exceptions.GoogleAPICallError: If the request
                    failed for any reason.
            google.api_core.exceptions.RetryError: If the request failed due
                    to a retryable error and retry attempts failed.
            ValueError: If the parameters are invalid.
        """
        # Wrap the transport method to add retry and timeout logic.
        if "parse_resume" not in self._inner_api_calls:
            self._inner_api_calls[
                "parse_resume"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.parse_resume,
                default_retry=self._method_configs["ParseResume"].retry,
                default_timeout=self._method_configs["ParseResume"].timeout,
                client_info=self._client_info,
            )

        request = resume_service_pb2.ParseResumeRequest(
            parent=parent,
            resume=resume,
            region_code=region_code,
            language_code=language_code,
            options=options_,
        )
        return self._inner_api_calls["parse_resume"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )