Module: Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Paths

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

Overview

Path helper methods for the LiveVideoAnalytics API.

Instance Method Summary collapse

Instance Method Details

#analysis_path(project:, location:, cluster:, analysis:) ⇒ ::String

Create a fully-qualified Analysis resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}

Parameters:

  • project (String)
  • location (String)
  • cluster (String)
  • analysis (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb', line 40

def analysis_path project:, location:, cluster:, analysis:
  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}/analyses/#{analysis}"
end

#cluster_path(project:, location:, cluster:) ⇒ ::String

Create a fully-qualified Cluster resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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


78
79
80
81
82
# File 'lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb', line 78

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

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

#operator_path(project:, location:, operator:) ⇒ ::String

Create a fully-qualified Operator resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/operators/{operator}

Parameters:

  • project (String)
  • location (String)
  • operator (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


96
97
98
99
100
101
# File 'lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb', line 96

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

  "projects/#{project}/locations/#{location}/operators/#{operator}"
end

#process_path(project:, location:, cluster:, process:) ⇒ ::String

Create a fully-qualified Process resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}

Parameters:

  • project (String)
  • location (String)
  • cluster (String)
  • process (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def process_path project:, location:, cluster:, process:
  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}/processes/#{process}"
end