Module: Google::Cloud::ConfigDelivery::V1::ConfigDelivery::Paths

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

Overview

Path helper methods for the ConfigDelivery API.

Instance Method Summary collapse

Instance Method Details

#fleet_package_path(project:, location:, fleet_package:) ⇒ ::String

Create a fully-qualified FleetPackage resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/fleetPackages/{fleet_package}

Parameters:

  • project (String)
  • location (String)
  • fleet_package (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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


57
58
59
60
61
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 57

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

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

#project_path(project:) ⇒ ::String

Create a fully-qualified Project resource string.

The resource will be in the following format:

projects/{project}

Parameters:

  • project (String)

Returns:

  • (::String)


73
74
75
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 73

def project_path project:
  "projects/#{project}"
end

#release_path(project:, location:, resource_bundle:, release:) ⇒ ::String

Create a fully-qualified Release resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}

Parameters:

  • project (String)
  • location (String)
  • resource_bundle (String)
  • release (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


90
91
92
93
94
95
96
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 90

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

  "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}/releases/#{release}"
end

#repository_path(project:, location:, connection:, repository:) ⇒ ::String

Create a fully-qualified Repository resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}

Parameters:

  • project (String)
  • location (String)
  • connection (String)
  • repository (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


111
112
113
114
115
116
117
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 111

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

  "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}"
end

#resource_bundle_path(project:, location:, resource_bundle:) ⇒ ::String

Create a fully-qualified ResourceBundle resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/resourceBundles/{resource_bundle}

Parameters:

  • project (String)
  • location (String)
  • resource_bundle (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


131
132
133
134
135
136
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 131

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

  "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}"
end

#rollout_path(project:, location:, fleet_package:, rollout:) ⇒ ::String

Create a fully-qualified Rollout resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/fleetPackages/{fleet_package}/rollouts/{rollout}

Parameters:

  • project (String)
  • location (String)
  • fleet_package (String)
  • rollout (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


151
152
153
154
155
156
157
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 151

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

  "projects/#{project}/locations/#{location}/fleetPackages/#{fleet_package}/rollouts/#{rollout}"
end

#variant_path(project:, location:, resource_bundle:, release:, variant:) ⇒ ::String

Create a fully-qualified Variant resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/resourceBundles/{resource_bundle}/releases/{release}/variants/{variant}

Parameters:

  • project (String)
  • location (String)
  • resource_bundle (String)
  • release (String)
  • variant (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


173
174
175
176
177
178
179
180
# File 'lib/google/cloud/config_delivery/v1/config_delivery/paths.rb', line 173

def variant_path project:, location:, resource_bundle:, release:, variant:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "resource_bundle cannot contain /" if resource_bundle.to_s.include? "/"
  raise ::ArgumentError, "release cannot contain /" if release.to_s.include? "/"

  "projects/#{project}/locations/#{location}/resourceBundles/#{resource_bundle}/releases/#{release}/variants/#{variant}"
end