Module: Google::Cloud::DocumentAI::V1beta3::DocumentProcessorService::Paths

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

Overview

Path helper methods for the DocumentProcessorService API.

Instance Method Summary collapse

Instance Method Details

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

Create a fully-qualified HumanReviewConfig resource string.

The resource will be in the following format:

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

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_processor_service/paths.rb', line 39

def human_review_config_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}/humanReviewConfig"
end

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

Create a fully-qualified Processor resource string.

The resource will be in the following format:

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

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_processor_service/paths.rb', line 58

def processor_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}"
end