Googly.DocumentAI.Projects.Locations (googly_document_ai v0.1.0)

Copy Markdown View Source

Endpoints for the Projects.Locations resource.

Summary

Functions

Fetches processor types. Note that we don't use ListProcessorTypes here, because it isn't paginated.

Gets information about a location.

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: Global locations: If name is empty, the method lists the public locations available to all projects. Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

Functions

fetch_processor_types(parent, opts \\ [])

@spec fetch_processor_types(
  String.t(),
  keyword()
) ::
  {:ok,
   Googly.DocumentAI.Model.GoogleCloudDocumentaiV1FetchProcessorTypesResponse.t()}
  | {:error, term()}

Fetches processor types. Note that we don't use ListProcessorTypes here, because it isn't paginated.

Parameters

  • parent (type: String.t()) - Required. The location of processor types to list. Format: projects/{project}/locations/{location}.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • access_token (type: String.t()) - OAuth access token.
    • alt (type: String.t()) - Data format for response.
    • callback (type: String.t()) - JSONP
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol (type: String.t()) - Upload protocol for media (e.g. "raw", "multipart").
    • upload_type (type: String.t()) - Legacy upload protocol for media (e.g. "media", "multipart").
    • xgafv (type: String.t()) - V1 error format.

Returns

  • {:ok, %Googly.DocumentAI.Model.GoogleCloudDocumentaiV1FetchProcessorTypesResponse{}} on success
  • {:error, %Googly.DocumentAI.Error{}} on failure

get(name, opts \\ [])

@spec get(
  String.t(),
  keyword()
) ::
  {:ok, Googly.DocumentAI.Model.GoogleCloudLocationLocation.t()}
  | {:error, term()}

Gets information about a location.

Parameters

  • name (type: String.t()) - Resource name for the location.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • access_token (type: String.t()) - OAuth access token.
    • alt (type: String.t()) - Data format for response.
    • callback (type: String.t()) - JSONP
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol (type: String.t()) - Upload protocol for media (e.g. "raw", "multipart").
    • upload_type (type: String.t()) - Legacy upload protocol for media (e.g. "media", "multipart").
    • xgafv (type: String.t()) - V1 error format.

Returns

  • {:ok, %Googly.DocumentAI.Model.GoogleCloudLocationLocation{}} on success
  • {:error, %Googly.DocumentAI.Error{}} on failure

list(name, opts \\ [])

Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: Global locations: If name is empty, the method lists the public locations available to all projects. Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

Parameters

  • name (type: String.t()) - The resource that owns the locations collection, if applicable.
  • opts (type: keyword()) - Query and call options (:token, plus any of the below)
    • access_token (type: String.t()) - OAuth access token.
    • alt (type: String.t()) - Data format for response.
    • callback (type: String.t()) - JSONP
    • fields (type: String.t()) - Selector specifying which fields to include in a partial response.
    • key (type: String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token (type: String.t()) - OAuth 2.0 token for the current user.
    • pretty_print (type: boolean()) - Returns response with indentations and line breaks.
    • quota_user (type: String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol (type: String.t()) - Upload protocol for media (e.g. "raw", "multipart").
    • upload_type (type: String.t()) - Legacy upload protocol for media (e.g. "media", "multipart").
    • xgafv (type: String.t()) - V1 error format.
    • extra_location_types (type: list(String.t())) - Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage.
    • filter (type: String.t()) - A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in AIP-160.
    • page_size (type: integer()) - The maximum number of results to return. If not set, the service selects a default.
    • page_token (type: String.t()) - A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.

Returns

  • {:ok, %Googly.DocumentAI.Model.GoogleCloudLocationListLocationsResponse{}} on success
  • {:error, %Googly.DocumentAI.Error{}} on failure