Class WarehouseClient (0.1.4)

WarehouseClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.visionai_v1alpha1.services.warehouse.transports.base.WarehouseTransport, typing.Callable[[...], google.cloud.visionai_v1alpha1.services.warehouse.transports.base.WarehouseTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Service that manages media content + metadata for streaming.

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
Type Description
str The API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
Type Description
WarehouseTransport The transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
Type Description
str The universe domain used by the client instance.

Methods

WarehouseClient

WarehouseClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.visionai_v1alpha1.services.warehouse.transports.base.WarehouseTransport, typing.Callable[[...], google.cloud.visionai_v1alpha1.services.warehouse.transports.base.WarehouseTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the warehouse client.

Parameters
Name Description
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Optional[Union[str,WarehouseTransport,Callable[..., WarehouseTransport]]]

The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the WarehouseTransport constructor. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

annotation_path

annotation_path(
    project_number: str, location: str, corpus: str, asset: str, annotation: str
) -> str

Returns a fully-qualified annotation string.

asset_path

asset_path(project_number: str, location: str, corpus: str, asset: str) -> str

Returns a fully-qualified asset string.

cancel_operation

cancel_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.CancelOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

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.

Parameters
Name Description
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

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.

clip_asset

clip_asset(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ClipAssetRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.ClipAssetResponse

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_clip_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ClipAssetRequest(
        name="name_value",
    )

    # Make the request
    response = client.clip_asset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ClipAssetRequest, dict]

The request object. Request message for ClipAsset API.

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
Type Description
google.cloud.visionai_v1alpha1.types.ClipAssetResponse Response message for ClipAsset API.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

corpus_path

corpus_path(project_number: str, location: str, corpus: str) -> str

Returns a fully-qualified corpus string.

create_annotation

create_annotation(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.CreateAnnotationRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    annotation: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.Annotation
    ] = None,
    annotation_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Annotation

Creates annotation inside asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_create_annotation():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.CreateAnnotationRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_annotation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.CreateAnnotationRequest, dict]

The request object. Request message for CreateAnnotation.

parent str

Required. The parent resource where this annotation will be created. Format: projects/\ /locations//corpora//assets/ This corresponds to the parent field on the request instance; if request is provided, this should not be set.

annotation google.cloud.visionai_v1alpha1.types.Annotation

Required. The annotation to create. This corresponds to the annotation field on the request instance; if request is provided, this should not be set.

annotation_id str

Optional. The ID to use for the annotation, which will become the final component of the annotation's resource name if user choose to specify. Otherwise, annotation id will be generated by system. This value should be up to 63 characters, and valid characters are /a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number. This corresponds to the annotation_id 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
Type Description
google.cloud.visionai_v1alpha1.types.Annotation An annotation is a resource in asset. It represents a key-value mapping of content in asset.

create_asset

create_asset(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.CreateAssetRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    asset: typing.Optional[google.cloud.visionai_v1alpha1.types.warehouse.Asset] = None,
    asset_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Asset

Creates an asset inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_create_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.CreateAssetRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_asset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.CreateAssetRequest, dict]

The request object. Request message for CreateAssetRequest.

parent str

Required. The parent resource where this asset will be created. Format: projects/\ /locations//corpora/* This corresponds to the parent field on the request instance; if request is provided, this should not be set.

asset google.cloud.visionai_v1alpha1.types.Asset

Required. The asset to create. This corresponds to the asset field on the request instance; if request is provided, this should not be set.

asset_id str

Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system. This value should be up to 63 characters, and valid characters are /a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number. This corresponds to the asset_id 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
Type Description
google.cloud.visionai_v1alpha1.types.Asset An asset is a resource in corpus. It represents a media object inside corpus, contains metadata and another resource annotation. Different feature could be applied to the asset to generate annotations. User could specified annotation related to the target asset.

create_corpus

create_corpus(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.CreateCorpusRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    corpus: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.Corpus
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Creates a corpus inside a project.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_create_corpus():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    corpus = visionai_v1alpha1.Corpus()
    corpus.display_name = "display_name_value"

    request = visionai_v1alpha1.CreateCorpusRequest(
        parent="parent_value",
        corpus=corpus,
    )

    # Make the request
    operation = client.create_corpus(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.CreateCorpusRequest, dict]

The request object. Request message of CreateCorpus API.

parent str

Required. Form: projects/{project_number}/locations/{location_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

corpus google.cloud.visionai_v1alpha1.types.Corpus

Required. The corpus to be created. This corresponds to the corpus 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
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Corpus Corpus is a set of video contents for management. Within a corpus, videos share the same data schema. Search is also restricted within a single corpus.

create_data_schema

create_data_schema(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.CreateDataSchemaRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    data_schema: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.DataSchema
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.DataSchema

Creates data schema inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_create_data_schema():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    data_schema = visionai_v1alpha1.DataSchema()
    data_schema.key = "key_value"

    request = visionai_v1alpha1.CreateDataSchemaRequest(
        parent="parent_value",
        data_schema=data_schema,
    )

    # Make the request
    response = client.create_data_schema(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.CreateDataSchemaRequest, dict]

The request object. Request message for CreateDataSchema.

parent str

Required. The parent resource where this data schema will be created. Format: projects/\ /locations//corpora/* This corresponds to the parent field on the request instance; if request is provided, this should not be set.

data_schema google.cloud.visionai_v1alpha1.types.DataSchema

Required. The data schema to create. This corresponds to the data_schema 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
Type Description
google.cloud.visionai_v1alpha1.types.DataSchema Data schema indicates how the user specified annotation is interpreted in the system.

create_search_config

create_search_config(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.CreateSearchConfigRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    search_config: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.SearchConfig
    ] = None,
    search_config_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.SearchConfig

Creates a search configuration inside a corpus.

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules ---

  1. Request.search_config_id must not be associated with an existing SearchConfig.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_create_search_config():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.CreateSearchConfigRequest(
        parent="parent_value",
        search_config_id="search_config_id_value",
    )

    # Make the request
    response = client.create_search_config(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.CreateSearchConfigRequest, dict]

The request object. Request message for CreateSearchConfig.

parent str

Required. The parent resource where this search configuration will be created. Format: projects/\ /locations//corpora/* This corresponds to the parent field on the request instance; if request is provided, this should not be set.

search_config google.cloud.visionai_v1alpha1.types.SearchConfig

Required. The search config to create. This corresponds to the search_config field on the request instance; if request is provided, this should not be set.

search_config_id str

Required. ID to use for the new search config. Will become the final component of the SearchConfig's resource name. This value should be up to 63 characters, and valid characters are /a-z][0-9]-_/. The first character must be a letter, the last could be a letter or a number. This corresponds to the search_config_id 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
Type Description
google.cloud.visionai_v1alpha1.types.SearchConfig SearchConfig stores different properties that will affect search behaviors and search results.

data_schema_path

data_schema_path(
    project_number: str, location: str, corpus: str, data_schema: str
) -> str

Returns a fully-qualified data_schema string.

delete_annotation

delete_annotation(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.DeleteAnnotationRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes annotation inside asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_delete_annotation():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.DeleteAnnotationRequest(
        name="name_value",
    )

    # Make the request
    client.delete_annotation(request=request)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.DeleteAnnotationRequest, dict]

The request object. Request message for DeleteAnnotation API.

name str

Required. The name of the annotation to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} This corresponds to the name 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.

delete_asset

delete_asset(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.DeleteAssetRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.api_core.operation.Operation

Deletes asset inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_delete_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.DeleteAssetRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_asset(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.DeleteAssetRequest, dict]

The request object. Request message for DeleteAsset.

name str

Required. The name of the asset to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} This corresponds to the name 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
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_corpus

delete_corpus(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.DeleteCorpusRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes a corpus only if its empty. Returns empty response.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_delete_corpus():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.DeleteCorpusRequest(
        name="name_value",
    )

    # Make the request
    client.delete_corpus(request=request)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.DeleteCorpusRequest, dict]

The request object. Request message for DeleteCorpus.

name str

Required. The resource name of the corpus to delete. This corresponds to the name 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.

delete_data_schema

delete_data_schema(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.DeleteDataSchemaRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes data schema inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_delete_data_schema():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.DeleteDataSchemaRequest(
        name="name_value",
    )

    # Make the request
    client.delete_data_schema(request=request)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.DeleteDataSchemaRequest, dict]

The request object. Request message for DeleteDataSchema.

name str

Required. The name of the data schema to delete. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id} This corresponds to the name 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.

delete_operation

delete_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.DeleteOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

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.

Parameters
Name Description
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

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.

delete_search_config

delete_search_config(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.DeleteSearchConfigRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> None

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_delete_search_config():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.DeleteSearchConfigRequest(
        name="name_value",
    )

    # Make the request
    client.delete_search_config(request=request)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.DeleteSearchConfigRequest, dict]

The request object. Request message for DeleteSearchConfig.

name str

Required. The name of the search configuration to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} This corresponds to the name 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.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
WarehouseClient The constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
Name Description
info dict

The service account private key info.

Returns
Type Description
WarehouseClient The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
WarehouseClient The constructed client.

generate_hls_uri

generate_hls_uri(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GenerateHlsUriRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.GenerateHlsUriResponse

Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_generate_hls_uri():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GenerateHlsUriRequest(
        name="name_value",
    )

    # Make the request
    response = client.generate_hls_uri(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GenerateHlsUriRequest, dict]

The request object. Request message for GenerateHlsUri API.

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
Type Description
google.cloud.visionai_v1alpha1.types.GenerateHlsUriResponse Response message for GenerateHlsUri API.

get_annotation

get_annotation(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GetAnnotationRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Annotation

Reads annotation inside asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_get_annotation():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GetAnnotationRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_annotation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GetAnnotationRequest, dict]

The request object. Request message for GetAnnotation API.

name str

Required. The name of the annotation to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} This corresponds to the name 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
Type Description
google.cloud.visionai_v1alpha1.types.Annotation An annotation is a resource in asset. It represents a key-value mapping of content in asset.

get_asset

get_asset(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GetAssetRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Asset

Reads an asset inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_get_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GetAssetRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_asset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GetAssetRequest, dict]

The request object. Request message for GetAsset.

name str

Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} This corresponds to the name 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
Type Description
google.cloud.visionai_v1alpha1.types.Asset An asset is a resource in corpus. It represents a media object inside corpus, contains metadata and another resource annotation. Different feature could be applied to the asset to generate annotations. User could specified annotation related to the target asset.

get_corpus

get_corpus(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GetCorpusRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Corpus

Gets corpus details inside a project.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_get_corpus():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GetCorpusRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_corpus(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GetCorpusRequest, dict]

The request object. Request message for GetCorpus.

name str

Required. The resource name of the corpus to retrieve. This corresponds to the name 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
Type Description
google.cloud.visionai_v1alpha1.types.Corpus Corpus is a set of video contents for management. Within a corpus, videos share the same data schema. Search is also restricted within a single corpus.

get_data_schema

get_data_schema(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GetDataSchemaRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.DataSchema

Gets data schema inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_get_data_schema():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GetDataSchemaRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_data_schema(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GetDataSchemaRequest, dict]

The request object. Request message for GetDataSchema.

name str

Required. The name of the data schema to retrieve. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id} This corresponds to the name 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
Type Description
google.cloud.visionai_v1alpha1.types.DataSchema Data schema indicates how the user specified annotation is interpreted in the system.

get_iam_policy

get_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy

Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does not have a policy set.

Parameters
Name Description
request .iam_policy_pb2.GetIamPolicyRequest

The request object. Request message for GetIamPolicy method.

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
Type Description
.policy_pb2.Policy Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

get_location

get_location(
    request: typing.Optional[
        google.cloud.location.locations_pb2.GetLocationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
Name Description
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

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
Type Description
.location_pb2.Location Location object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
Name Description
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If any errors happen.
Returns
Type Description
Tuple[str, Callable[[], Tuple[bytes, bytes]]] returns the API endpoint and the client cert source to use.

get_operation

get_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.GetOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
Name Description
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

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
Type Description
.operations_pb2.Operation An Operation object.

get_search_config

get_search_config(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.GetSearchConfigRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.SearchConfig

Gets a search configuration inside a corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_get_search_config():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.GetSearchConfigRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_search_config(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.GetSearchConfigRequest, dict]

The request object. Request message for GetSearchConfig.

name str

Required. The name of the search configuration to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} This corresponds to the name 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
Type Description
google.cloud.visionai_v1alpha1.types.SearchConfig SearchConfig stores different properties that will affect search behaviors and search results.

ingest_asset

ingest_asset(
    requests: typing.Optional[
        typing.Iterator[
            google.cloud.visionai_v1alpha1.types.warehouse.IngestAssetRequest
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> typing.Iterable[
    google.cloud.visionai_v1alpha1.types.warehouse.IngestAssetResponse
]

Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_ingest_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    config = visionai_v1alpha1.Config()
    config.asset = "asset_value"

    request = visionai_v1alpha1.IngestAssetRequest(
        config=config,
    )

    # This method expects an iterator which contains
    # 'visionai_v1alpha1.IngestAssetRequest' objects
    # Here we create a generator that yields a single `request` for
    # demonstrative purposes.
    requests = [request]

    def request_generator():
        for request in requests:
            yield request

    # Make the request
    stream = client.ingest_asset(requests=request_generator())

    # Handle the response
    for response in stream:
        print(response)
Parameters
Name Description
requests Iterator[google.cloud.visionai_v1alpha1.types.IngestAssetRequest]

The request object iterator. Request message for IngestAsset API.

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
Type Description
Iterable[google.cloud.visionai_v1alpha1.types.IngestAssetResponse] Response message for IngestAsset API.

list_annotations

list_annotations(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ListAnnotationsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListAnnotationsPager

Lists a list of annotations inside asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_list_annotations():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ListAnnotationsRequest(
    )

    # Make the request
    page_result = client.list_annotations(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ListAnnotationsRequest, dict]

The request object. Request message for GetAnnotation API.

parent str

The parent, which owns this collection of annotations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} This corresponds to the parent 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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListAnnotationsPager Request message for ListAnnotations API. Iterating over this object will yield results and resolve additional pages automatically.

list_assets

list_assets(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ListAssetsRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListAssetsPager

Lists an list of assets inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_list_assets():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ListAssetsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_assets(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ListAssetsRequest, dict]

The request object. Request message for ListAssets.

parent str

Required. The parent, which owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus} This corresponds to the parent 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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListAssetsPager Response message for ListAssets. Iterating over this object will yield results and resolve additional pages automatically.

list_corpora

list_corpora(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ListCorporaRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListCorporaPager

Lists all corpora in a project.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_list_corpora():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ListCorporaRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_corpora(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ListCorporaRequest, dict]

The request object. Request message for ListCorpora.

parent str

Required. The resource name of the project from which to list corpora. This corresponds to the parent 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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListCorporaPager Response message for ListCorpora. Iterating over this object will yield results and resolve additional pages automatically.

list_data_schemas

list_data_schemas(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ListDataSchemasRequest, dict
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListDataSchemasPager

Lists a list of data schemas inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_list_data_schemas():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ListDataSchemasRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_data_schemas(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ListDataSchemasRequest, dict]

The request object. Request message for ListDataSchemas.

parent str

Required. The parent, which owns this collection of data schemas. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id} This corresponds to the parent 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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListDataSchemasPager Response message for ListDataSchemas. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        google.cloud.location.locations_pb2.ListLocationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
Name Description
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

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
Type Description
.location_pb2.ListLocationsResponse Response message for ListLocations method.

list_operations

list_operations(
    request: typing.Optional[
        google.longrunning.operations_pb2.ListOperationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
Name Description
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

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
Type Description
.operations_pb2.ListOperationsResponse Response message for ListOperations method.

list_search_configs

list_search_configs(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.ListSearchConfigsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListSearchConfigsPager

Lists all search configurations inside a corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_list_search_configs():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.ListSearchConfigsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_search_configs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.ListSearchConfigsRequest, dict]

The request object. Request message for ListSearchConfigs.

parent str

Required. The parent, which owns this collection of search configurations. Format: projects/{project_number}/locations/{location}/corpora/{corpus} This corresponds to the parent 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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.ListSearchConfigsPager Response message for ListSearchConfigs. Iterating over this object will yield results and resolve additional pages automatically.

parse_annotation_path

parse_annotation_path(path: str) -> typing.Dict[str, str]

Parses a annotation path into its component segments.

parse_asset_path

parse_asset_path(path: str) -> typing.Dict[str, str]

Parses a asset path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_corpus_path

parse_corpus_path(path: str) -> typing.Dict[str, str]

Parses a corpus path into its component segments.

parse_data_schema_path

parse_data_schema_path(path: str) -> typing.Dict[str, str]

Parses a data_schema path into its component segments.

parse_search_config_path

parse_search_config_path(path: str) -> typing.Dict[str, str]

Parses a search_config path into its component segments.

search_assets

search_assets(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.SearchAssetsRequest, dict
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.services.warehouse.pagers.SearchAssetsPager

Search media asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_search_assets():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.SearchAssetsRequest(
        corpus="corpus_value",
    )

    # Make the request
    page_result = client.search_assets(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.SearchAssetsRequest, dict]

The request object. Request message for SearchAssets.

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
Type Description
google.cloud.visionai_v1alpha1.services.warehouse.pagers.SearchAssetsPager Response message for SearchAssets. Iterating over this object will yield results and resolve additional pages automatically.

search_config_path

search_config_path(
    project_number: str, location: str, corpus: str, search_config: str
) -> str

Returns a fully-qualified search_config string.

set_iam_policy

set_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.policy_pb2.Policy

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters
Name Description
request .iam_policy_pb2.SetIamPolicyRequest

The request object. Request message for SetIamPolicy method.

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
Type Description
.policy_pb2.Policy Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

test_iam_permissions

test_iam_permissions(
    request: typing.Optional[
        google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

Tests the specified IAM permissions against the IAM access control policy for a function.

If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Parameters
Name Description
request .iam_policy_pb2.TestIamPermissionsRequest

The request object. Request message for TestIamPermissions method.

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
Type Description
.iam_policy_pb2.TestIamPermissionsResponse Response message for TestIamPermissions method.

update_annotation

update_annotation(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.UpdateAnnotationRequest, dict
        ]
    ] = None,
    *,
    annotation: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.Annotation
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Annotation

Updates annotation inside asset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_update_annotation():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.UpdateAnnotationRequest(
    )

    # Make the request
    response = client.update_annotation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.UpdateAnnotationRequest, dict]

The request object. Request message for UpdateAnnotation API.

annotation google.cloud.visionai_v1alpha1.types.Annotation

Required. The annotation to update. The annotation's name field is used to identify the annotation to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} This corresponds to the annotation field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

The list of fields to be updated. This corresponds to the update_mask 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
Type Description
google.cloud.visionai_v1alpha1.types.Annotation An annotation is a resource in asset. It represents a key-value mapping of content in asset.

update_asset

update_asset(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.UpdateAssetRequest, dict
        ]
    ] = None,
    *,
    asset: typing.Optional[google.cloud.visionai_v1alpha1.types.warehouse.Asset] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Asset

Updates an asset inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_update_asset():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.UpdateAssetRequest(
    )

    # Make the request
    response = client.update_asset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.UpdateAssetRequest, dict]

The request object. Response message for UpdateAsset.

asset google.cloud.visionai_v1alpha1.types.Asset

Required. The asset to update. The asset's name field is used to identify the asset to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} This corresponds to the asset field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

The list of fields to be updated. This corresponds to the update_mask 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
Type Description
google.cloud.visionai_v1alpha1.types.Asset An asset is a resource in corpus. It represents a media object inside corpus, contains metadata and another resource annotation. Different feature could be applied to the asset to generate annotations. User could specified annotation related to the target asset.

update_corpus

update_corpus(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.UpdateCorpusRequest, dict
        ]
    ] = None,
    *,
    corpus: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.Corpus
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.Corpus

Updates a corpus in a project.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_update_corpus():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    corpus = visionai_v1alpha1.Corpus()
    corpus.display_name = "display_name_value"

    request = visionai_v1alpha1.UpdateCorpusRequest(
        corpus=corpus,
    )

    # Make the request
    response = client.update_corpus(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.UpdateCorpusRequest, dict]

The request object. Request message for UpdateCorpus.

corpus google.cloud.visionai_v1alpha1.types.Corpus

Required. The corpus which replaces the resource on the server. This corresponds to the corpus field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

The list of fields to be updated. This corresponds to the update_mask 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
Type Description
google.cloud.visionai_v1alpha1.types.Corpus Corpus is a set of video contents for management. Within a corpus, videos share the same data schema. Search is also restricted within a single corpus.

update_data_schema

update_data_schema(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.UpdateDataSchemaRequest, dict
        ]
    ] = None,
    *,
    data_schema: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.DataSchema
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.DataSchema

Updates data schema inside corpus.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_update_data_schema():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    data_schema = visionai_v1alpha1.DataSchema()
    data_schema.key = "key_value"

    request = visionai_v1alpha1.UpdateDataSchemaRequest(
        data_schema=data_schema,
    )

    # Make the request
    response = client.update_data_schema(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.UpdateDataSchemaRequest, dict]

The request object. Request message for UpdateDataSchema.

data_schema google.cloud.visionai_v1alpha1.types.DataSchema

Required. The data schema's name field is used to identify the data schema to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema} This corresponds to the data_schema field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

The list of fields to be updated. This corresponds to the update_mask 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
Type Description
google.cloud.visionai_v1alpha1.types.DataSchema Data schema indicates how the user specified annotation is interpreted in the system.

update_search_config

update_search_config(
    request: typing.Optional[
        typing.Union[
            google.cloud.visionai_v1alpha1.types.warehouse.UpdateSearchConfigRequest,
            dict,
        ]
    ] = None,
    *,
    search_config: typing.Optional[
        google.cloud.visionai_v1alpha1.types.warehouse.SearchConfig
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, str]] = ()
) -> google.cloud.visionai_v1alpha1.types.warehouse.SearchConfig

Updates a search configuration inside a corpus.

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules ---

  1. Request.search_configuration.name must already exist.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import visionai_v1alpha1

def sample_update_search_config():
    # Create a client
    client = visionai_v1alpha1.WarehouseClient()

    # Initialize request argument(s)
    request = visionai_v1alpha1.UpdateSearchConfigRequest(
    )

    # Make the request
    response = client.update_search_config(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.visionai_v1alpha1.types.UpdateSearchConfigRequest, dict]

The request object. Request message for UpdateSearchConfig.

search_config google.cloud.visionai_v1alpha1.types.SearchConfig

Required. The search configuration to update. The search configuration's name field is used to identify the resource to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} This corresponds to the search_config field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

The list of fields to be updated. If left unset, all field paths will be updated/overwritten. This corresponds to the update_mask 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
Type Description
google.cloud.visionai_v1alpha1.types.SearchConfig SearchConfig stores different properties that will affect search behaviors and search results.