Module: Google::Cloud::Developerconnect::V1::InsightsConfigService::Paths

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

Overview

Path helper methods for the InsightsConfigService API.

Instance Method Summary collapse

Instance Method Details

#deployment_event_path(project:, location:, insights_config:, deployment_event:) ⇒ ::String

Create a fully-qualified DeploymentEvent resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{deployment_event}

Parameters:

  • project (String)
  • location (String)
  • insights_config (String)
  • deployment_event (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb', line 40

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

  "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}/deploymentEvents/#{deployment_event}"
end

#insights_config_path(project:, location:, insights_config:) ⇒ ::String

Create a fully-qualified InsightsConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/insightsConfigs/{insights_config}

Parameters:

  • project (String)
  • location (String)
  • insights_config (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
# File 'lib/google/cloud/developerconnect/v1/insights_config_service/paths.rb', line 60

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

  "projects/#{project}/locations/#{location}/insightsConfigs/#{insights_config}"
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/developerconnect/v1/insights_config_service/paths.rb', line 78

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

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