Module: Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb

Overview

Path helper methods for the TransportManager API.

Instance Method Summary collapse

Instance Method Details

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


38
39
40
41
42
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 38

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

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

#network_path(project:, resource_id:) ⇒ ::String

Create a fully-qualified Network resource string.

The resource will be in the following format:

projects/{project}/global/networks/{resource_id}

Parameters:

  • project (String)
  • resource_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


55
56
57
58
59
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 55

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

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

#remote_transport_profile_path(project:, location:, remote_transport_profile:) ⇒ ::String

Create a fully-qualified RemoteTransportProfile resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/remoteTransportProfiles/{remote_transport_profile}

Parameters:

  • project (String)
  • location (String)
  • remote_transport_profile (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


73
74
75
76
77
78
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 73

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

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

#transport_path(project:, location:, transport:) ⇒ ::String

Create a fully-qualified Transport resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/transports/{transport}

Parameters:

  • project (String)
  • location (String)
  • transport (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


92
93
94
95
96
97
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 92

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

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