Module: Google::Cloud::NetworkServices::V1::DepService::Paths

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

Overview

Path helper methods for the DepService API.

Instance Method Summary collapse

Instance Method Details

#lb_route_extension_path(project:, location:, lb_route_extension:) ⇒ ::String

Create a fully-qualified LbRouteExtension resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}

Parameters:

  • project (String)
  • location (String)
  • lb_route_extension (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#lb_traffic_extension_path(project:, location:, lb_traffic_extension:) ⇒ ::String

Create a fully-qualified LbTrafficExtension resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}

Parameters:

  • project (String)
  • location (String)
  • lb_traffic_extension (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/network_services/v1/dep_service/paths.rb', line 58

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

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


76
77
78
79
80
# File 'lib/google/cloud/network_services/v1/dep_service/paths.rb', line 76

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

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