Module: Google::Cloud::ApiHub::V1::RuntimeProjectAttachmentService::Paths

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

Overview

Path helper methods for the RuntimeProjectAttachmentService API.

Instance Method Summary collapse

Instance Method Details

#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)


38
39
40
41
42
# File 'lib/google/cloud/api_hub/v1/runtime_project_attachment_service/paths.rb', line 38

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

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

#project_path(project:) ⇒ ::String

Create a fully-qualified Project resource string.

The resource will be in the following format:

projects/{project}

Parameters:

  • project (String)

Returns:

  • (::String)


54
55
56
# File 'lib/google/cloud/api_hub/v1/runtime_project_attachment_service/paths.rb', line 54

def project_path project:
  "projects/#{project}"
end

#runtime_project_attachment_path(project:, location:, runtime_project_attachment:) ⇒ ::String

Create a fully-qualified RuntimeProjectAttachment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/runtimeProjectAttachments/{runtime_project_attachment}

Parameters:

  • project (String)
  • location (String)
  • runtime_project_attachment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


70
71
72
73
74
75
# File 'lib/google/cloud/api_hub/v1/runtime_project_attachment_service/paths.rb', line 70

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

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