Module: Google::Cloud::DocumentAI::V1beta3::DocumentService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/document_ai/v1beta3/document_service/paths.rb

Overview

Path helper methods for the DocumentService API.

Instance Method Summary collapse

Instance Method Details

#dataset_path(project:, location:, processor:) ⇒ ::String

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/processors/{processor}/dataset

Parameters:

  • project (String)
  • location (String)
  • processor (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/document_ai/v1beta3/document_service/paths.rb', line 39

def dataset_path project:, location:, processor:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/processors/#{processor}/dataset"
end

#dataset_schema_path(project:, location:, processor:) ⇒ ::String

Create a fully-qualified DatasetSchema resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

Parameters:

  • project (String)
  • location (String)
  • processor (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/document_ai/v1beta3/document_service/paths.rb', line 58

def dataset_schema_path project:, location:, processor:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/processors/#{processor}/dataset/datasetSchema"
end

#schema_path(project:, location:, schema:) ⇒ ::String

Create a fully-qualified Schema resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/schemas/{schema}

Parameters:

  • project (String)
  • location (String)
  • schema (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


77
78
79
80
81
82
# File 'lib/google/cloud/document_ai/v1beta3/document_service/paths.rb', line 77

def schema_path project:, location:, schema:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/schemas/#{schema}"
end