Module: Google::Cloud::DocumentAI::V1::DocumentProcessorService::Paths

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

Overview

Path helper methods for the DocumentProcessorService API.

Instance Method Summary collapse

Instance Method Details

#evaluation_path(project:, location:, processor:, processor_version:, evaluation:) ⇒ ::String

Create a fully-qualified Evaluation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}

Parameters:

  • project (String)
  • location (String)
  • processor (String)
  • processor_version (String)
  • evaluation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
48
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 41

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

  "projects/#{project}/locations/#{location}/processors/#{processor}/processorVersions/#{processor_version}/evaluations/#{evaluation}"
end

#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)


62
63
64
65
66
67
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 62

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

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


80
81
82
83
84
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 80

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

  "projects/#{project}/locations/#{location}"
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)


98
99
100
101
102
103
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 98

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

#processor_type_path(project:, location:, processor_type:) ⇒ ::String

Create a fully-qualified ProcessorType resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/processorTypes/{processor_type}

Parameters:

  • project (String)
  • location (String)
  • processor_type (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


117
118
119
120
121
122
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 117

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

  "projects/#{project}/locations/#{location}/processorTypes/#{processor_type}"
end

#processor_version_path(project:, location:, processor:, processor_version:) ⇒ ::String

Create a fully-qualified ProcessorVersion resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


137
138
139
140
141
142
143
# File 'lib/google/cloud/document_ai/v1/document_processor_service/paths.rb', line 137

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

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