def import_user_events(self, request: Union[(import_.ImportUserEventsRequest, dict)]=None, *, parent: str=None, request_id: str=None, input_config: import_.InputConfig=None, errors_config: import_.ImportErrorsConfig=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> operation.Operation:
    'Bulk import of User events. Request processing might\n        be synchronous. Events that already exist are skipped.\n        Use this method for backfilling historical user events.\n        Operation.response is of type ImportResponse. Note that\n        it is possible for a subset of the items to be\n        successfully inserted. Operation.metadata is of type\n        ImportMetadata.\n\n        Args:\n            request (Union[google.cloud.recommendationengine_v1beta1.types.ImportUserEventsRequest, dict]):\n                The request object. Request message for the\n                ImportUserEvents request.\n            parent (str):\n                Required.\n                ``projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store``\n\n                This corresponds to the ``parent`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            request_id (str):\n                Optional. Unique identifier provided by client, within\n                the ancestor dataset scope. Ensures idempotency for\n                expensive long running operations. Server-generated if\n                unspecified. Up to 128 characters long. This is returned\n                as google.longrunning.Operation.name in the response.\n                Note that this field must not be set if the desired\n                input config is catalog_inline_source.\n\n                This corresponds to the ``request_id`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            input_config (google.cloud.recommendationengine_v1beta1.types.InputConfig):\n                Required. The desired input location\n                of the data.\n\n                This corresponds to the ``input_config`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            errors_config (google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig):\n                Optional. The desired location of\n                errors incurred during the Import.\n\n                This corresponds to the ``errors_config`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            retry (google.api_core.retry.Retry): Designation of what errors, if any,\n                should be retried.\n            timeout (float): The timeout for this request.\n            metadata (Sequence[Tuple[str, str]]): Strings which should be\n                sent along with the request as metadata.\n\n        Returns:\n            google.api_core.operation.Operation:\n                An object representing a long-running operation.\n\n                The result type for the operation will be :class:`google.cloud.recommendationengine_v1beta1.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running\n                   operation was successful, then this message is\n                   returned by the\n                   google.longrunning.Operations.response field if the\n                   operation was successful.\n\n        '
    has_flattened_params = any([parent, request_id, input_config, errors_config])
    if ((request is not None) and has_flattened_params):
        raise ValueError('If the `request` argument is set, then none of the individual field arguments should be set.')
    if (not isinstance(request, import_.ImportUserEventsRequest)):
        request = import_.ImportUserEventsRequest(request)
        if (parent is not None):
            request.parent = parent
        if (request_id is not None):
            request.request_id = request_id
        if (input_config is not None):
            request.input_config = input_config
        if (errors_config is not None):
            request.errors_config = errors_config
    rpc = self._transport._wrapped_methods[self._transport.import_user_events]
    metadata = (tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata((('parent', request.parent),)),))
    response = rpc(request, retry=retry, timeout=timeout, metadata=metadata)
    response = operation.from_gapic(response, self._transport.operations_client, import_.ImportUserEventsResponse, metadata_type=import_.ImportMetadata)
    return response
Bulk import of User events. Request processing might
be synchronous. Events that already exist are skipped.
Use this method for backfilling historical user events.
Operation.response is of type ImportResponse. Note that
it is possible for a subset of the items to be
successfully inserted. Operation.metadata is of type
ImportMetadata.

Args:
    request (Union[google.cloud.recommendationengine_v1beta1.types.ImportUserEventsRequest, dict]):
        The request object. Request message for the
        ImportUserEvents request.
    parent (str):
        Required.
        ``projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store``

        This corresponds to the ``parent`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    request_id (str):
        Optional. Unique identifier provided by client, within
        the ancestor dataset scope. Ensures idempotency for
        expensive long running operations. Server-generated if
        unspecified. Up to 128 characters long. This is returned
        as google.longrunning.Operation.name in the response.
        Note that this field must not be set if the desired
        input config is catalog_inline_source.

        This corresponds to the ``request_id`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    input_config (google.cloud.recommendationengine_v1beta1.types.InputConfig):
        Required. The desired input location
        of the data.

        This corresponds to the ``input_config`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    errors_config (google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig):
        Optional. The desired location of
        errors incurred during the Import.

        This corresponds to the ``errors_config`` field
        on the ``request`` instance; if ``request`` is provided, this
        should not be set.
    retry (google.api_core.retry.Retry): Designation of what errors, if any,
        should be retried.
    timeout (float): The timeout for this request.
    metadata (Sequence[Tuple[str, str]]): Strings which should be
        sent along with the request as metadata.

Returns:
    google.api_core.operation.Operation:
        An object representing a long-running operation.

        The result type for the operation will be :class:`google.cloud.recommendationengine_v1beta1.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running
           operation was successful, then this message is
           returned by the
           google.longrunning.Operations.response field if the
           operation was successful.
def import_user_events(self, request: Union[(import_.ImportUserEventsRequest, dict)]=None, *, parent: str=None, request_id: str=None, input_config: import_.InputConfig=None, errors_config: import_.ImportErrorsConfig=None, retry: retries.Retry=gapic_v1.method.DEFAULT, timeout: float=None, metadata: Sequence[Tuple[(str, str)]]=()) -> operation.Operation:
    'Bulk import of User events. Request processing might\n        be synchronous. Events that already exist are skipped.\n        Use this method for backfilling historical user events.\n        Operation.response is of type ImportResponse. Note that\n        it is possible for a subset of the items to be\n        successfully inserted. Operation.metadata is of type\n        ImportMetadata.\n\n        Args:\n            request (Union[google.cloud.recommendationengine_v1beta1.types.ImportUserEventsRequest, dict]):\n                The request object. Request message for the\n                ImportUserEvents request.\n            parent (str):\n                Required.\n                ``projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store``\n\n                This corresponds to the ``parent`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            request_id (str):\n                Optional. Unique identifier provided by client, within\n                the ancestor dataset scope. Ensures idempotency for\n                expensive long running operations. Server-generated if\n                unspecified. Up to 128 characters long. This is returned\n                as google.longrunning.Operation.name in the response.\n                Note that this field must not be set if the desired\n                input config is catalog_inline_source.\n\n                This corresponds to the ``request_id`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            input_config (google.cloud.recommendationengine_v1beta1.types.InputConfig):\n                Required. The desired input location\n                of the data.\n\n                This corresponds to the ``input_config`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            errors_config (google.cloud.recommendationengine_v1beta1.types.ImportErrorsConfig):\n                Optional. The desired location of\n                errors incurred during the Import.\n\n                This corresponds to the ``errors_config`` field\n                on the ``request`` instance; if ``request`` is provided, this\n                should not be set.\n            retry (google.api_core.retry.Retry): Designation of what errors, if any,\n                should be retried.\n            timeout (float): The timeout for this request.\n            metadata (Sequence[Tuple[str, str]]): Strings which should be\n                sent along with the request as metadata.\n\n        Returns:\n            google.api_core.operation.Operation:\n                An object representing a long-running operation.\n\n                The result type for the operation will be :class:`google.cloud.recommendationengine_v1beta1.types.ImportUserEventsResponse` Response of the ImportUserEventsRequest. If the long running\n                   operation was successful, then this message is\n                   returned by the\n                   google.longrunning.Operations.response field if the\n                   operation was successful.\n\n        '
    has_flattened_params = any([parent, request_id, input_config, errors_config])
    if ((request is not None) and has_flattened_params):
        raise ValueError('If the `request` argument is set, then none of the individual field arguments should be set.')
    if (not isinstance(request, import_.ImportUserEventsRequest)):
        request = import_.ImportUserEventsRequest(request)
        if (parent is not None):
            request.parent = parent
        if (request_id is not None):
            request.request_id = request_id
        if (input_config is not None):
            request.input_config = input_config
        if (errors_config is not None):
            request.errors_config = errors_config
    rpc = self._transport._wrapped_methods[self._transport.import_user_events]
    metadata = (tuple(metadata) + (gapic_v1.routing_header.to_grpc_metadata((('parent', request.parent),)),))
    response = rpc(request, retry=retry, timeout=timeout, metadata=metadata)
    response = operation.from_gapic(response, self._transport.operations_client, import_.ImportUserEventsResponse, metadata_type=import_.ImportMetadata)
    return response