Module: Google::Cloud::Workflows::Executions::V1::Executions::Paths

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

Overview

Path helper methods for the Executions API.

Instance Method Summary collapse

Instance Method Details

#execution_path(project:, location:, workflow:, execution:) ⇒ ::String

Create a fully-qualified Execution resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

Parameters:

  • project (String)
  • location (String)
  • workflow (String)
  • execution (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/workflows/#{workflow}/executions/#{execution}"
end

#workflow_path(project:, location:, workflow:) ⇒ ::String

Create a fully-qualified Workflow resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/workflows/{workflow}

Parameters:

  • project (String)
  • location (String)
  • workflow (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


61
62
63
64
65
66
# File 'lib/google/cloud/workflows/executions/v1/executions/paths.rb', line 61

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

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