Module: Google::Cloud::AIPlatform::V1::IndexEndpointService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb
Overview
Path helper methods for the IndexEndpointService API.
Instance Method Summary collapse
-
#index_endpoint_path(project:, location:, index_endpoint:) ⇒ ::String
Create a fully-qualified IndexEndpoint resource string.
-
#index_path(project:, location:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#reservation_path(project_id_or_number:, zone:, reservation_name:) ⇒ ::String
Create a fully-qualified Reservation resource string.
Instance Method Details
#index_endpoint_path(project:, location:, index_endpoint:) ⇒ ::String
Create a fully-qualified IndexEndpoint resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
58 59 60 61 62 63 |
# File 'lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb', line 58 def index_endpoint_path project:, location:, index_endpoint: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/indexEndpoints/#{index_endpoint}" end |
#index_path(project:, location:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/indexes/{index}
39 40 41 42 43 44 |
# File 'lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb', line 39 def index_path project:, location:, index: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/indexes/#{index}" 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}
76 77 78 79 80 |
# File 'lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb', line 76 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#reservation_path(project_id_or_number:, zone:, reservation_name:) ⇒ ::String
Create a fully-qualified Reservation resource string.
The resource will be in the following format:
projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}
94 95 96 97 98 99 |
# File 'lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb', line 94 def reservation_path project_id_or_number:, zone:, reservation_name: raise ::ArgumentError, "project_id_or_number cannot contain /" if project_id_or_number.to_s.include? "/" raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" "projects/#{project_id_or_number}/zones/#{zone}/reservations/#{reservation_name}" end |