Module: Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb
Overview
Path helper methods for the RecaptchaEnterpriseService API.
Instance Method Summary collapse
-
#assessment_path(project:, assessment:) ⇒ ::String
Create a fully-qualified Assessment resource string.
-
#key_path(project:, key:) ⇒ ::String
Create a fully-qualified Key resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
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}
38 39 40 41 42 |
# File 'lib/google/cloud/recaptcha_enterprise/v1beta1/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 |
#key_path(project:, key:) ⇒ ::String
Create a fully-qualified Key resource string.
The resource will be in the following format:
projects/{project}/keys/{key}
55 56 57 58 59 |
# File 'lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb', line 55 def key_path project:, key: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/keys/#{key}" end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
71 72 73 |
# File 'lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb', line 71 def project_path project: "projects/#{project}" end |