Creates and returns a new ProductSet resource.

        Possible errors:

        -  Returns INVALID\_ARGUMENT if display\_name is missing, or is longer
           than 4096 characters.

        Example:
            >>> from google.cloud import vision_v1p3beta1
            >>>
            >>> client = vision_v1p3beta1.ProductSearchClient()
            >>>
            >>> parent = client.location_path('[PROJECT]', '[LOCATION]')
            >>>
            >>> # TODO: Initialize `product_set`:
            >>> product_set = {}
            >>>
            >>> # TODO: Initialize `product_set_id`:
            >>> product_set_id = ''
            >>>
            >>> response = client.create_product_set(parent, product_set, product_set_id)

        Args:
            parent (str): The project in which the ProductSet should be created.

                Format is ``projects/PROJECT_ID/locations/LOC_ID``.
            product_set (Union[dict, ~google.cloud.vision_v1p3beta1.types.ProductSet]): The ProductSet to create.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.vision_v1p3beta1.types.ProductSet`
            product_set_id (str): A user-supplied resource id for this ProductSet. If set, the server will
                attempt to use this value as the resource id. If it is already in use,
                an error is returned with code ALREADY\_EXISTS. Must be at most 128
                characters long. It cannot contain the character ``/``.
            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.vision_v1p3beta1.types.ProductSet` 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_product_set(
        self,
        parent,
        product_set,
        product_set_id,
        retry=google.api_core.gapic_v1.method.DEFAULT,
        timeout=google.api_core.gapic_v1.method.DEFAULT,
        metadata=None,
    ):
        """
        Creates and returns a new ProductSet resource.

        Possible errors:

        -  Returns INVALID\_ARGUMENT if display\_name is missing, or is longer
           than 4096 characters.

        Example:
            >>> from google.cloud import vision_v1p3beta1
            >>>
            >>> client = vision_v1p3beta1.ProductSearchClient()
            >>>
            >>> parent = client.location_path('[PROJECT]', '[LOCATION]')
            >>>
            >>> # TODO: Initialize `product_set`:
            >>> product_set = {}
            >>>
            >>> # TODO: Initialize `product_set_id`:
            >>> product_set_id = ''
            >>>
            >>> response = client.create_product_set(parent, product_set, product_set_id)

        Args:
            parent (str): The project in which the ProductSet should be created.

                Format is ``projects/PROJECT_ID/locations/LOC_ID``.
            product_set (Union[dict, ~google.cloud.vision_v1p3beta1.types.ProductSet]): The ProductSet to create.

                If a dict is provided, it must be of the same form as the protobuf
                message :class:`~google.cloud.vision_v1p3beta1.types.ProductSet`
            product_set_id (str): A user-supplied resource id for this ProductSet. If set, the server will
                attempt to use this value as the resource id. If it is already in use,
                an error is returned with code ALREADY\_EXISTS. Must be at most 128
                characters long. It cannot contain the character ``/``.
            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.vision_v1p3beta1.types.ProductSet` 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_product_set" not in self._inner_api_calls:
            self._inner_api_calls[
                "create_product_set"
            ] = google.api_core.gapic_v1.method.wrap_method(
                self.transport.create_product_set,
                default_retry=self._method_configs["CreateProductSet"].retry,
                default_timeout=self._method_configs["CreateProductSet"].timeout,
                client_info=self._client_info,
            )

        request = product_search_service_pb2.CreateProductSetRequest(
            parent=parent, product_set=product_set, product_set_id=product_set_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_product_set"](
            request, retry=retry, timeout=timeout, metadata=metadata
        )