Module: Google::Cloud::AIPlatform::V1::EndpointService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb
Overview
Path helper methods for the EndpointService API.
Instance Method Summary collapse
-
#deployment_resource_pool_path(project:, location:, deployment_resource_pool:) ⇒ ::String
Create a fully-qualified DeploymentResourcePool resource string.
-
#endpoint_path(**args) ⇒ ::String
Create a fully-qualified Endpoint resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#model_deployment_monitoring_job_path(project:, location:, model_deployment_monitoring_job:) ⇒ ::String
Create a fully-qualified ModelDeploymentMonitoringJob resource string.
-
#model_path(project:, location:, model:) ⇒ ::String
Create a fully-qualified Model resource string.
-
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
-
#reservation_path(project_id_or_number:, zone:, reservation_name:) ⇒ ::String
Create a fully-qualified Reservation resource string.
Instance Method Details
#deployment_resource_pool_path(project:, location:, deployment_resource_pool:) ⇒ ::String
Create a fully-qualified DeploymentResourcePool resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
39 40 41 42 43 44 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 39 def deployment_resource_pool_path project:, location:, deployment_resource_pool: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/deploymentResourcePools/#{deployment_resource_pool}" end |
#endpoint_path(project: , location: , endpoint: ) ⇒ ::String #endpoint_path(project: , location: , publisher: , model: ) ⇒ ::String
Create a fully-qualified Endpoint resource string.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 69 def endpoint_path **args resources = { "endpoint:location:project" => (proc do |project:, location:, 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}/endpoints/#{endpoint}" end), "location:model:project:publisher" => (proc do |project:, location:, publisher:, model:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "publisher cannot contain /" if publisher.to_s.include? "/" "projects/#{project}/locations/#{location}/publishers/#{publisher}/models/#{model}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) 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}
102 103 104 105 106 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 102 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#model_deployment_monitoring_job_path(project:, location:, model_deployment_monitoring_job:) ⇒ ::String
Create a fully-qualified ModelDeploymentMonitoringJob resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
139 140 141 142 143 144 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 139 def model_deployment_monitoring_job_path project:, location:, model_deployment_monitoring_job: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/modelDeploymentMonitoringJobs/#{model_deployment_monitoring_job}" end |
#model_path(project:, location:, model:) ⇒ ::String
Create a fully-qualified Model resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/models/{model}
120 121 122 123 124 125 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 120 def model_path project:, location:, model: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/models/#{model}" end |
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
The resource will be in the following format:
projects/{project}/global/networks/{network}
157 158 159 160 161 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 157 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{network}" 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}
175 176 177 178 179 180 |
# File 'lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb', line 175 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 |