Module: Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Paths

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

Overview

Path helper methods for the RecaptchaEnterpriseService API.

Instance Method Summary collapse

Instance Method Details

#assessment_path(project:, assessment:) ⇒ ::String

Create a fully-qualified Assessment resource string.

The resource will be in the following format:

projects/{project}/assessments/{assessment}

Parameters:

  • project (String)
  • assessment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 38

def assessment_path project:, assessment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/assessments/#{assessment}"
end

#firewall_policy_path(project:, firewallpolicy:) ⇒ ::String

Create a fully-qualified FirewallPolicy resource string.

The resource will be in the following format:

projects/{project}/firewallpolicies/{firewallpolicy}

Parameters:

  • project (String)
  • firewallpolicy (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


55
56
57
58
59
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 55

def firewall_policy_path project:, firewallpolicy:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/firewallpolicies/#{firewallpolicy}"
end

#key_path(project:, key:) ⇒ ::String

Create a fully-qualified Key resource string.

The resource will be in the following format:

projects/{project}/keys/{key}

Parameters:

  • project (String)
  • key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


72
73
74
75
76
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 72

def key_path project:, key:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/keys/#{key}"
end

#metrics_path(project:, key:) ⇒ ::String

Create a fully-qualified Metrics resource string.

The resource will be in the following format:

projects/{project}/keys/{key}/metrics

Parameters:

  • project (String)
  • key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


89
90
91
92
93
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 89

def metrics_path project:, key:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/keys/#{key}/metrics"
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)


105
106
107
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 105

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

Create a fully-qualified RelatedAccountGroup resource string.

The resource will be in the following format:

projects/{project}/relatedaccountgroups/{relatedaccountgroup}

Parameters:

  • project (String)
  • relatedaccountgroup (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


120
121
122
123
124
# File 'lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb', line 120

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

  "projects/#{project}/relatedaccountgroups/#{relatedaccountgroup}"
end