Module: Google::Cloud::AIPlatform::V1::ModelService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/ai_platform/v1/model_service/paths.rb
Overview
Path helper methods for the ModelService API.
Instance Method Summary collapse
-
#endpoint_path(**args) ⇒ ::String
Create a fully-qualified Endpoint resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#model_evaluation_path(project:, location:, model:, evaluation:) ⇒ ::String
Create a fully-qualified ModelEvaluation resource string.
-
#model_evaluation_slice_path(project:, location:, model:, evaluation:, slice:) ⇒ ::String
Create a fully-qualified ModelEvaluationSlice resource string.
-
#model_path(project:, location:, model:) ⇒ ::String
Create a fully-qualified Model resource string.
-
#pipeline_job_path(project:, location:, pipeline_job:) ⇒ ::String
Create a fully-qualified PipelineJob resource string.
-
#training_pipeline_path(project:, location:, training_pipeline:) ⇒ ::String
Create a fully-qualified TrainingPipeline resource string.
Instance Method Details
#endpoint_path(project: , location: , endpoint: ) ⇒ ::String #endpoint_path(project: , location: , publisher: , model: ) ⇒ ::String
Create a fully-qualified Endpoint resource string.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 50 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}
83 84 85 86 87 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 83 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#model_evaluation_path(project:, location:, model:, evaluation:) ⇒ ::String
Create a fully-qualified ModelEvaluation resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}
121 122 123 124 125 126 127 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 121 def model_evaluation_path project:, location:, model:, evaluation: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" "projects/#{project}/locations/#{location}/models/#{model}/evaluations/#{evaluation}" end |
#model_evaluation_slice_path(project:, location:, model:, evaluation:, slice:) ⇒ ::String
Create a fully-qualified ModelEvaluationSlice resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}
143 144 145 146 147 148 149 150 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 143 def model_evaluation_slice_path project:, location:, model:, evaluation:, slice: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" raise ::ArgumentError, "evaluation cannot contain /" if evaluation.to_s.include? "/" "projects/#{project}/locations/#{location}/models/#{model}/evaluations/#{evaluation}/slices/#{slice}" 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}
101 102 103 104 105 106 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 101 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 |
#pipeline_job_path(project:, location:, pipeline_job:) ⇒ ::String
Create a fully-qualified PipelineJob resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}
164 165 166 167 168 169 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 164 def pipeline_job_path project:, location:, pipeline_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}/pipelineJobs/#{pipeline_job}" end |
#training_pipeline_path(project:, location:, training_pipeline:) ⇒ ::String
Create a fully-qualified TrainingPipeline resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}
183 184 185 186 187 188 |
# File 'lib/google/cloud/ai_platform/v1/model_service/paths.rb', line 183 def training_pipeline_path project:, location:, training_pipeline: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/trainingPipelines/#{training_pipeline}" end |