Module: Google::Cloud::AIPlatform::V1::JobService::Paths

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

Overview

Path helper methods for the JobService API.

Instance Method Summary collapse

Instance Method Details

#batch_prediction_job_path(project:, location:, batch_prediction_job:) ⇒ ::String

Create a fully-qualified BatchPredictionJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

Parameters:

  • project (String)
  • location (String)
  • batch_prediction_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 39

def batch_prediction_job_path project:, location:, batch_prediction_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}/batchPredictionJobs/#{batch_prediction_job}"
end

#context_path(project:, location:, metadata_store:, context:) ⇒ ::String

Create a fully-qualified Context resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}

Parameters:

  • project (String)
  • location (String)
  • metadata_store (String)
  • context (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 59

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

  "projects/#{project}/locations/#{location}/metadataStores/#{}/contexts/#{context}"
end

#custom_job_path(project:, location:, custom_job:) ⇒ ::String

Create a fully-qualified CustomJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/customJobs/{custom_job}

Parameters:

  • project (String)
  • location (String)
  • custom_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 79

def custom_job_path project:, location:, custom_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}/customJobs/#{custom_job}"
end

#data_labeling_job_path(project:, location:, data_labeling_job:) ⇒ ::String

Create a fully-qualified DataLabelingJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

Parameters:

  • project (String)
  • location (String)
  • data_labeling_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


98
99
100
101
102
103
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 98

def data_labeling_job_path project:, location:, data_labeling_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}/dataLabelingJobs/#{data_labeling_job}"
end

#dataset_path(project:, location:, dataset:) ⇒ ::String

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


117
118
119
120
121
122
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 117

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

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

#endpoint_path(project: , location: , endpoint: ) ⇒ ::String #endpoint_path(project: , location: , publisher: , model: ) ⇒ ::String

Create a fully-qualified Endpoint resource string.

Overloads:

  • #endpoint_path(project: , location: , endpoint: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/endpoints/{endpoint}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • endpoint (String) (defaults to: )
  • #endpoint_path(project: , location: , publisher: , model: ) ⇒ ::String

    The resource will be in the following format:

    projects/{project}/locations/{location}/publishers/{publisher}/models/{model}

    Parameters:

    • project (String) (defaults to: )
    • location (String) (defaults to: )
    • publisher (String) (defaults to: )
    • model (String) (defaults to: )

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 147

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

#hyperparameter_tuning_job_path(project:, location:, hyperparameter_tuning_job:) ⇒ ::String

Create a fully-qualified HyperparameterTuningJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

Parameters:

  • project (String)
  • location (String)
  • hyperparameter_tuning_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


181
182
183
184
185
186
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 181

def hyperparameter_tuning_job_path project:, location:, hyperparameter_tuning_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}/hyperparameterTuningJobs/#{hyperparameter_tuning_job}"
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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


199
200
201
202
203
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 199

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}

Parameters:

  • project (String)
  • location (String)
  • model_deployment_monitoring_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


236
237
238
239
240
241
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 236

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}

Parameters:

  • project (String)
  • location (String)
  • model (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


217
218
219
220
221
222
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 217

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

#nas_job_path(project:, location:, nas_job:) ⇒ ::String

Create a fully-qualified NasJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/nasJobs/{nas_job}

Parameters:

  • project (String)
  • location (String)
  • nas_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


255
256
257
258
259
260
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 255

def nas_job_path project:, location:, nas_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}/nasJobs/#{nas_job}"
end

#nas_trial_detail_path(project:, location:, nas_job:, nas_trial_detail:) ⇒ ::String

Create a fully-qualified NasTrialDetail resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}

Parameters:

  • project (String)
  • location (String)
  • nas_job (String)
  • nas_trial_detail (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


275
276
277
278
279
280
281
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 275

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

  "projects/#{project}/locations/#{location}/nasJobs/#{nas_job}/nasTrialDetails/#{nas_trial_detail}"
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}

Parameters:

  • project (String)
  • network (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


294
295
296
297
298
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 294

def network_path project:, network:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/networks/#{network}"
end

#notification_channel_path(project:, notification_channel:) ⇒ ::String

Create a fully-qualified NotificationChannel resource string.

The resource will be in the following format:

projects/{project}/notificationChannels/{notification_channel}

Parameters:

  • project (String)
  • notification_channel (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


311
312
313
314
315
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 311

def notification_channel_path project:, notification_channel:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/notificationChannels/#{notification_channel}"
end

#persistent_resource_path(project:, location:, persistent_resource:) ⇒ ::String

Create a fully-qualified PersistentResource resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/persistentResources/{persistent_resource}

Parameters:

  • project (String)
  • location (String)
  • persistent_resource (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


329
330
331
332
333
334
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 329

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

  "projects/#{project}/locations/#{location}/persistentResources/#{persistent_resource}"
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}

Parameters:

  • project_id_or_number (String)
  • zone (String)
  • reservation_name (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


348
349
350
351
352
353
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 348

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

#tensorboard_path(project:, location:, tensorboard:) ⇒ ::String

Create a fully-qualified Tensorboard resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/tensorboards/{tensorboard}

Parameters:

  • project (String)
  • location (String)
  • tensorboard (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


367
368
369
370
371
372
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 367

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

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

#trial_path(project:, location:, study:, trial:) ⇒ ::String

Create a fully-qualified Trial resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/studies/{study}/trials/{trial}

Parameters:

  • project (String)
  • location (String)
  • study (String)
  • trial (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


387
388
389
390
391
392
393
# File 'lib/google/cloud/ai_platform/v1/job_service/paths.rb', line 387

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

  "projects/#{project}/locations/#{location}/studies/#{study}/trials/#{trial}"
end