Module: Google::Cloud::ApiHub::V1::HostProjectRegistrationService::Paths
- Extended by:
- Paths
- Included in:
- Paths, Rest::Client
- Defined in:
- lib/google/cloud/api_hub/v1/host_project_registration_service/paths.rb
Overview
Path helper methods for the HostProjectRegistrationService API.
Instance Method Summary collapse
-
#host_project_registration_path(project:, location:, host_project_registration:) ⇒ ::String
Create a fully-qualified HostProjectRegistration resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
Instance Method Details
#host_project_registration_path(project:, location:, host_project_registration:) ⇒ ::String
Create a fully-qualified HostProjectRegistration resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/hostProjectRegistrations/{host_project_registration}
39 40 41 42 43 44 |
# File 'lib/google/cloud/api_hub/v1/host_project_registration_service/paths.rb', line 39 def host_project_registration_path project:, location:, host_project_registration: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/hostProjectRegistrations/#{host_project_registration}" 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}
57 58 59 60 61 |
# File 'lib/google/cloud/api_hub/v1/host_project_registration_service/paths.rb', line 57 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}
73 74 75 |
# File 'lib/google/cloud/api_hub/v1/host_project_registration_service/paths.rb', line 73 def project_path project: "projects/#{project}" end |