Module: Google::Cloud::NetworkConnectivity::V1::CrossNetworkAutomationService::Paths

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

Overview

Path helper methods for the CrossNetworkAutomationService 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/v1/cross_network_automation_service/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/v1/cross_network_automation_service/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

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


71
72
73
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 71

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

#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String

Create a fully-qualified ServiceAttachment resource string.

The resource will be in the following format:

projects/{project}/regions/{region}/serviceAttachments/{service_attachment}

Parameters:

  • project (String)
  • region (String)
  • service_attachment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


87
88
89
90
91
92
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 87

def service_attachment_path project:, region:, service_attachment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"

  "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}"
end

#service_class_path(project:, location:, service_class:) ⇒ ::String

Create a fully-qualified ServiceClass resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/serviceClasses/{service_class}

Parameters:

  • project (String)
  • location (String)
  • service_class (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


106
107
108
109
110
111
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 106

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

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

#service_connection_map_path(project:, location:, service_connection_map:) ⇒ ::String

Create a fully-qualified ServiceConnectionMap resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map}

Parameters:

  • project (String)
  • location (String)
  • service_connection_map (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


125
126
127
128
129
130
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 125

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

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

#service_connection_policy_path(project:, location:, service_connection_policy:) ⇒ ::String

Create a fully-qualified ServiceConnectionPolicy resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy}

Parameters:

  • project (String)
  • location (String)
  • service_connection_policy (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


144
145
146
147
148
149
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 144

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

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

#service_connection_token_path(project:, location:, service_connection_token:) ⇒ ::String

Create a fully-qualified ServiceConnectionToken resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/serviceConnectionTokens/{service_connection_token}

Parameters:

  • project (String)
  • location (String)
  • service_connection_token (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


163
164
165
166
167
168
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 163

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

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

#subnetwork_path(project:, region:, subnetwork:) ⇒ ::String

Create a fully-qualified Subnetwork resource string.

The resource will be in the following format:

projects/{project}/regions/{region}/subnetworks/{subnetwork}

Parameters:

  • project (String)
  • region (String)
  • subnetwork (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


182
183
184
185
186
187
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 182

def subnetwork_path project:, region:, subnetwork:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"

  "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}"
end