Module: Google::Cloud::VisionAI::V1::StreamsService::Paths

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

Overview

Path helper methods for the StreamsService API.

Instance Method Summary collapse

Instance Method Details

#channel_path(project:, location:, cluster:, channel:) ⇒ ::String

Create a fully-qualified Channel resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def channel_path project:, location:, cluster:, channel:
  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}/channels/#{channel}"
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/streams_service/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

#event_path(project:, location:, cluster:, event:) ⇒ ::String

Create a fully-qualified Event resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def event_path project:, location:, cluster:, event:
  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}/events/#{event}"
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/streams_service/paths.rb', line 99

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

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

#series_path(project:, location:, cluster:, series:) ⇒ ::String

Create a fully-qualified Series resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


118
119
120
121
122
123
124
# File 'lib/google/cloud/vision_ai/v1/streams_service/paths.rb', line 118

def series_path project:, location:, cluster:, series:
  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}/series/#{series}"
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)


139
140
141
142
143
144
145
# File 'lib/google/cloud/vision_ai/v1/streams_service/paths.rb', line 139

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