Creates an InspectTemplate for re-using frequently used configuration
        for inspecting content, images, and storage.
        See https://cloud.google.com/dlp/docs/creating-templates to learn more.

        Example:
            >>> from google.cloud import dlp_v2
            >>>
            >>> client = dlp_v2.DlpServiceClient()
            >>>
            >>> parent = client.organization_path('[ORGANIZATION]')
            >>>
            >>> response = client.create_inspect_template(parent)

        Args:
            parent (str): The parent resource name, for example projects/my-project-id or
                organizations/my-org-id.
            inspect_template (Union[dict, ~google.cloud.dlp_v2.types.InspectTemplate]): The InspectTemplate to create.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.dlp_v2.types.InspectTemplate`
            template_id (str): The template id can contain uppercase and lowercase letters, numbers,
                and hyphens; that is, it must match the regular expression:
                ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty
                to allow the system to generate one.
            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.dlp_v2.types.InspectTemplate` 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 create_inspect_template(
        self,
        parent,
        inspect_template=None,
        template_id=None,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Creates an InspectTemplate for re-using frequently used configuration
        for inspecting content, images, and storage.
        See https://cloud.google.com/dlp/docs/creating-templates to learn more.

        Example:
            >>> from google.cloud import dlp_v2
            >>>
            >>> client = dlp_v2.DlpServiceClient()
            >>>
            >>> parent = client.organization_path('[ORGANIZATION]')
            >>>
            >>> response = client.create_inspect_template(parent)

        Args:
            parent (str): The parent resource name, for example projects/my-project-id or
                organizations/my-org-id.
            inspect_template (Union[dict, ~google.cloud.dlp_v2.types.InspectTemplate]): The InspectTemplate to create.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.dlp_v2.types.InspectTemplate`
            template_id (str): The template id can contain uppercase and lowercase letters, numbers,
                and hyphens; that is, it must match the regular expression:
                ``[a-zA-Z\\d-_]+``. The maximum length is 100 characters. Can be empty
                to allow the system to generate one.
            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.dlp_v2.types.InspectTemplate` 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 "create_inspect_template" not in self._inner_api_calls:
            self._inner_api_calls[
                "create_inspect_template"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.create_inspect_template,
                default_retry=self._method_configs["CreateInspectTemplate"].retry,
                default_timeout=self._method_configs["CreateInspectTemplate"].timeout,
                client_info=self._client_info,
            )

        request = dlp_pb2.CreateInspectTemplateRequest(
            parent=parent, inspect_template=inspect_template, template_id=template_id
        )
        if metadata is None:
            metadata = []
        metadata = list(metadata)
        try:
            routing_header = [("parent", parent)]
        except AttributeError:
            pass
        else:
            routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
                routing_header
            )
            metadata.append(routing_metadata)

        return self._inner_api_calls["create_inspect_template"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )