Module: Google::Cloud::AIPlatform::V1::PipelineService::Paths

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

Overview

Path helper methods for the PipelineService API.

Instance Method Summary collapse

Instance Method Details

#artifact_path(project:, location:, metadata_store:, artifact:) ⇒ ::String

Create a fully-qualified Artifact resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}

Parameters:

  • project (String)
  • location (String)
  • metadata_store (String)
  • artifact (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 40

def artifact_path project:, location:, metadata_store:, artifact:
  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/#{}/artifacts/#{artifact}"
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)


61
62
63
64
65
66
67
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 61

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)


81
82
83
84
85
86
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 81

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

#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)


111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 111

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

#execution_path(project:, location:, metadata_store:, execution:) ⇒ ::String

Create a fully-qualified Execution resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}

Parameters:

  • project (String)
  • location (String)
  • metadata_store (String)
  • execution (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


146
147
148
149
150
151
152
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 146

def execution_path project:, location:, metadata_store:, execution:
  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/#{}/executions/#{execution}"
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)


165
166
167
168
169
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 165

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

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


183
184
185
186
187
188
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 183

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}

Parameters:

  • project (String)
  • network (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


201
202
203
204
205
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 201

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

  "projects/#{project}/global/networks/#{network}"
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}

Parameters:

  • project (String)
  • location (String)
  • pipeline_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


219
220
221
222
223
224
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 219

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}

Parameters:

  • project (String)
  • location (String)
  • training_pipeline (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


238
239
240
241
242
243
# File 'lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb', line 238

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