Module: Google::Cloud::ApiHub::V1::ApiHubDiscovery::Paths

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

Overview

Path helper methods for the ApiHubDiscovery API.

Instance Method Summary collapse

Instance Method Details

#discovered_api_observation_path(project:, location:, discovered_api_observation:) ⇒ ::String

Create a fully-qualified DiscoveredApiObservation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}

Parameters:

  • project (String)
  • location (String)
  • discovered_api_observation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#discovered_api_operation_path(project:, location:, discovered_api_observation:, discovered_api_operation:) ⇒ ::String

Create a fully-qualified DiscoveredApiOperation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}

Parameters:

  • project (String)
  • location (String)
  • discovered_api_observation (String)
  • discovered_api_operation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/api_hub/v1/api_hub_discovery/paths.rb', line 59

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

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


78
79
80
81
82
# File 'lib/google/cloud/api_hub/v1/api_hub_discovery/paths.rb', line 78

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

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