Module: Google::Cloud::Ces::V1beta::WidgetService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/ces/v1beta/widget_service/paths.rb
Overview
Path helper methods for the WidgetService API.
Instance Method Summary collapse
-
#deployment_path(project:, location:, app:, deployment:) ⇒ ::String
Create a fully-qualified Deployment resource string.
-
#session_path(project:, location:, app:, session:) ⇒ ::String
Create a fully-qualified Session resource string.
Instance Method Details
#deployment_path(project:, location:, app:, deployment:) ⇒ ::String
Create a fully-qualified Deployment resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}
40 41 42 43 44 45 46 |
# File 'lib/google/cloud/ces/v1beta/widget_service/paths.rb', line 40 def deployment_path project:, location:, app:, deployment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/deployments/#{deployment}" end |
#session_path(project:, location:, app:, session:) ⇒ ::String
Create a fully-qualified Session resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/apps/{app}/sessions/{session}
61 62 63 64 65 66 67 |
# File 'lib/google/cloud/ces/v1beta/widget_service/paths.rb', line 61 def session_path project:, location:, app:, session: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "app cannot contain /" if app.to_s.include? "/" "projects/#{project}/locations/#{location}/apps/#{app}/sessions/#{session}" end |