Module: Google::Cloud::Chronicle::V1::FindingsRefinementService::Paths

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

Overview

Path helper methods for the FindingsRefinementService API.

Instance Method Summary collapse

Instance Method Details

#curated_rule_path(project:, location:, instance:, curated_rule:) ⇒ ::String

Create a fully-qualified CuratedRule resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/curatedRules/{curated_rule}

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • curated_rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/curatedRules/#{curated_rule}"
end

#curated_rule_set_path(project:, location:, instance:, category:, rule_set:) ⇒ ::String

Create a fully-qualified CuratedRuleSet resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/curatedRuleSetCategories/{category}/curatedRuleSets/{rule_set}

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • category (String)
  • rule_set (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


62
63
64
65
66
67
68
69
# File 'lib/google/cloud/chronicle/v1/findings_refinement_service/paths.rb', line 62

def curated_rule_set_path project:, location:, instance:, category:, rule_set:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
  raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/"

  "projects/#{project}/locations/#{location}/instances/#{instance}/curatedRuleSetCategories/#{category}/curatedRuleSets/#{rule_set}"
end

#findings_refinement_deployment_path(project:, location:, instance:, findings_refinement:) ⇒ ::String

Create a fully-qualified FindingsRefinementDeployment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}/deployment

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • findings_refinement (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


105
106
107
108
109
110
111
# File 'lib/google/cloud/chronicle/v1/findings_refinement_service/paths.rb', line 105

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/findingsRefinements/#{findings_refinement}/deployment"
end

#findings_refinement_path(project:, location:, instance:, findings_refinement:) ⇒ ::String

Create a fully-qualified FindingsRefinement resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/findingsRefinements/{findings_refinement}

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • findings_refinement (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


84
85
86
87
88
89
90
# File 'lib/google/cloud/chronicle/v1/findings_refinement_service/paths.rb', line 84

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/findingsRefinements/#{findings_refinement}"
end

#instance_path(project:, location:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}

Parameters:

  • project (String)
  • location (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

#rule_path(project:, location:, instance:, rule:) ⇒ ::String

Create a fully-qualified Rule resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/instances/{instance}/rules/{rule}

Parameters:

  • project (String)
  • location (String)
  • instance (String)
  • rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


145
146
147
148
149
150
151
# File 'lib/google/cloud/chronicle/v1/findings_refinement_service/paths.rb', line 145

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

  "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}"
end