Module: Google::Cloud::VisionAI::V1::AppPlatform::Paths

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

Overview

Path helper methods for the AppPlatform API.

Instance Method Summary collapse

Instance Method Details

#application_path(project:, location:, application:) ⇒ ::String

Create a fully-qualified Application resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/applications/{application}

Parameters:

  • project (String)
  • location (String)
  • application (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/vision_ai/v1/app_platform/paths.rb', line 39

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

  "projects/#{project}/locations/#{location}/applications/#{application}"
end

#draft_path(project:, location:, application:, draft:) ⇒ ::String

Create a fully-qualified Draft resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/applications/{application}/drafts/{draft}

Parameters:

  • project (String)
  • location (String)
  • application (String)
  • draft (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/vision_ai/v1/app_platform/paths.rb', line 59

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

  "projects/#{project}/locations/#{location}/applications/#{application}/drafts/#{draft}"
end

#instance_path(project:, location:, application:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/applications/{application}/instances/{instance}

Parameters:

  • project (String)
  • location (String)
  • application (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


80
81
82
83
84
85
86
# File 'lib/google/cloud/vision_ai/v1/app_platform/paths.rb', line 80

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

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


99
100
101
102
103
# File 'lib/google/cloud/vision_ai/v1/app_platform/paths.rb', line 99

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)


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

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

#stream_path(project:, location:, cluster:, stream:) ⇒ ::String

Create a fully-qualified Stream resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}

Parameters:

  • project (String)
  • location (String)
  • cluster (String)
  • stream (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/clusters/#{cluster}/streams/#{stream}"
end