google-cloud-security_center-v2 0.a → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/cloud/security_center/v2/rest.rb +37 -0
- data/lib/google/cloud/security_center/v2/security_center/client.rb +4771 -0
- data/lib/google/cloud/security_center/v2/security_center/credentials.rb +51 -0
- data/lib/google/cloud/security_center/v2/security_center/operations.rb +809 -0
- data/lib/google/cloud/security_center/v2/security_center/paths.rb +973 -0
- data/lib/google/cloud/security_center/v2/security_center/rest/client.rb +4390 -0
- data/lib/google/cloud/security_center/v2/security_center/rest/operations.rb +901 -0
- data/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb +3165 -0
- data/lib/google/cloud/security_center/v2/security_center/rest.rb +53 -0
- data/lib/google/cloud/security_center/v2/security_center.rb +56 -0
- data/lib/google/cloud/security_center/v2/version.rb +7 -2
- data/lib/google/cloud/security_center/v2.rb +45 -0
- data/lib/google/cloud/securitycenter/v2/access_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/application_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/attack_path_pb.rb +49 -0
- data/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb +45 -0
- data/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb +45 -0
- data/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/compliance_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/connection_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/contact_details_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/container_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/database_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/external_system_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/file_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/finding_pb.rb +109 -0
- data/lib/google/cloud/securitycenter/v2/group_membership_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/indicator_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb +57 -0
- data/lib/google/cloud/securitycenter/v2/label_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/log_entry_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/mute_config_pb.rb +48 -0
- data/lib/google/cloud/securitycenter/v2/notification_config_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v2/notification_message_pb.rb +47 -0
- data/lib/google/cloud/securitycenter/v2/org_policy_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/process_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v2/resource_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb +49 -0
- data/lib/google/cloud/securitycenter/v2/security_marks_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/security_posture_pb.rb +43 -0
- data/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb +128 -0
- data/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb +167 -0
- data/lib/google/cloud/securitycenter/v2/simulation_pb.rb +49 -0
- data/lib/google/cloud/securitycenter/v2/source_pb.rb +44 -0
- data/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb +42 -0
- data/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb +46 -0
- data/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb +58 -0
- data/lib/google-cloud-security_center-v2.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/api/routing.rb +459 -0
- data/proto_docs/google/cloud/securitycenter/v2/access.rb +120 -0
- data/proto_docs/google/cloud/securitycenter/v2/application.rb +40 -0
- data/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb +73 -0
- data/proto_docs/google/cloud/securitycenter/v2/attack_path.rb +147 -0
- data/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb +90 -0
- data/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb +96 -0
- data/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb +52 -0
- data/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb +50 -0
- data/proto_docs/google/cloud/securitycenter/v2/compliance.rb +43 -0
- data/proto_docs/google/cloud/securitycenter/v2/connection.rb +70 -0
- data/proto_docs/google/cloud/securitycenter/v2/contact_details.rb +44 -0
- data/proto_docs/google/cloud/securitycenter/v2/container.rb +49 -0
- data/proto_docs/google/cloud/securitycenter/v2/database.rb +67 -0
- data/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb +64 -0
- data/proto_docs/google/cloud/securitycenter/v2/external_system.rb +106 -0
- data/proto_docs/google/cloud/securitycenter/v2/file.rb +72 -0
- data/proto_docs/google/cloud/securitycenter/v2/finding.rb +427 -0
- data/proto_docs/google/cloud/securitycenter/v2/group_membership.rb +48 -0
- data/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb +56 -0
- data/proto_docs/google/cloud/securitycenter/v2/indicator.rb +112 -0
- data/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb +66 -0
- data/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb +241 -0
- data/proto_docs/google/cloud/securitycenter/v2/label.rb +41 -0
- data/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb +36 -0
- data/proto_docs/google/cloud/securitycenter/v2/log_entry.rb +58 -0
- data/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +285 -0
- data/proto_docs/google/cloud/securitycenter/v2/mute_config.rb +100 -0
- data/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +90 -0
- data/proto_docs/google/cloud/securitycenter/v2/notification_message.rb +42 -0
- data/proto_docs/google/cloud/securitycenter/v2/org_policy.rb +37 -0
- data/proto_docs/google/cloud/securitycenter/v2/process.rb +79 -0
- data/proto_docs/google/cloud/securitycenter/v2/resource.rb +42 -0
- data/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb +122 -0
- data/proto_docs/google/cloud/securitycenter/v2/security_marks.rb +84 -0
- data/proto_docs/google/cloud/securitycenter/v2/security_posture.rb +83 -0
- data/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +1136 -0
- data/proto_docs/google/cloud/securitycenter/v2/simulation.rb +43 -0
- data/proto_docs/google/cloud/securitycenter/v2/source.rb +65 -0
- data/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb +46 -0
- data/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb +86 -0
- data/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +333 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
- data/proto_docs/google/iam/v1/options.rb +50 -0
- data/proto_docs/google/iam/v1/policy.rb +426 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +173 -10
|
@@ -0,0 +1,973 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2024 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module SecurityCenter
|
|
23
|
+
module V2
|
|
24
|
+
module SecurityCenter
|
|
25
|
+
# Path helper methods for the SecurityCenter API.
|
|
26
|
+
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified BigQueryExport resource string.
|
|
29
|
+
#
|
|
30
|
+
# @overload big_query_export_path(organization:, location:, export:)
|
|
31
|
+
# The resource will be in the following format:
|
|
32
|
+
#
|
|
33
|
+
# `organizations/{organization}/locations/{location}/bigQueryExports/{export}`
|
|
34
|
+
#
|
|
35
|
+
# @param organization [String]
|
|
36
|
+
# @param location [String]
|
|
37
|
+
# @param export [String]
|
|
38
|
+
#
|
|
39
|
+
# @overload big_query_export_path(folder:, location:, export:)
|
|
40
|
+
# The resource will be in the following format:
|
|
41
|
+
#
|
|
42
|
+
# `folders/{folder}/locations/{location}/bigQueryExports/{export}`
|
|
43
|
+
#
|
|
44
|
+
# @param folder [String]
|
|
45
|
+
# @param location [String]
|
|
46
|
+
# @param export [String]
|
|
47
|
+
#
|
|
48
|
+
# @overload big_query_export_path(project:, location:, export:)
|
|
49
|
+
# The resource will be in the following format:
|
|
50
|
+
#
|
|
51
|
+
# `projects/{project}/locations/{location}/bigQueryExports/{export}`
|
|
52
|
+
#
|
|
53
|
+
# @param project [String]
|
|
54
|
+
# @param location [String]
|
|
55
|
+
# @param export [String]
|
|
56
|
+
#
|
|
57
|
+
# @return [::String]
|
|
58
|
+
def big_query_export_path **args
|
|
59
|
+
resources = {
|
|
60
|
+
"export:location:organization" => (proc do |organization:, location:, export:|
|
|
61
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
62
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
63
|
+
|
|
64
|
+
"organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}"
|
|
65
|
+
end),
|
|
66
|
+
"export:folder:location" => (proc do |folder:, location:, export:|
|
|
67
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
68
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
69
|
+
|
|
70
|
+
"folders/#{folder}/locations/#{location}/bigQueryExports/#{export}"
|
|
71
|
+
end),
|
|
72
|
+
"export:location:project" => (proc do |project:, location:, export:|
|
|
73
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
74
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
75
|
+
|
|
76
|
+
"projects/#{project}/locations/#{location}/bigQueryExports/#{export}"
|
|
77
|
+
end)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
resource = resources[args.keys.sort.join(":")]
|
|
81
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
82
|
+
resource.call(**args)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
##
|
|
86
|
+
# Create a fully-qualified DlpJob resource string.
|
|
87
|
+
#
|
|
88
|
+
# @overload dlp_job_path(project:, dlp_job:)
|
|
89
|
+
# The resource will be in the following format:
|
|
90
|
+
#
|
|
91
|
+
# `projects/{project}/dlpJobs/{dlp_job}`
|
|
92
|
+
#
|
|
93
|
+
# @param project [String]
|
|
94
|
+
# @param dlp_job [String]
|
|
95
|
+
#
|
|
96
|
+
# @overload dlp_job_path(project:, location:, dlp_job:)
|
|
97
|
+
# The resource will be in the following format:
|
|
98
|
+
#
|
|
99
|
+
# `projects/{project}/locations/{location}/dlpJobs/{dlp_job}`
|
|
100
|
+
#
|
|
101
|
+
# @param project [String]
|
|
102
|
+
# @param location [String]
|
|
103
|
+
# @param dlp_job [String]
|
|
104
|
+
#
|
|
105
|
+
# @return [::String]
|
|
106
|
+
def dlp_job_path **args
|
|
107
|
+
resources = {
|
|
108
|
+
"dlp_job:project" => (proc do |project:, dlp_job:|
|
|
109
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
110
|
+
|
|
111
|
+
"projects/#{project}/dlpJobs/#{dlp_job}"
|
|
112
|
+
end),
|
|
113
|
+
"dlp_job:location:project" => (proc do |project:, location:, dlp_job:|
|
|
114
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
115
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
116
|
+
|
|
117
|
+
"projects/#{project}/locations/#{location}/dlpJobs/#{dlp_job}"
|
|
118
|
+
end)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
resource = resources[args.keys.sort.join(":")]
|
|
122
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
123
|
+
resource.call(**args)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
##
|
|
127
|
+
# Create a fully-qualified ExternalSystem resource string.
|
|
128
|
+
#
|
|
129
|
+
# @overload external_system_path(organization:, source:, finding:, externalsystem:)
|
|
130
|
+
# The resource will be in the following format:
|
|
131
|
+
#
|
|
132
|
+
# `organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}`
|
|
133
|
+
#
|
|
134
|
+
# @param organization [String]
|
|
135
|
+
# @param source [String]
|
|
136
|
+
# @param finding [String]
|
|
137
|
+
# @param externalsystem [String]
|
|
138
|
+
#
|
|
139
|
+
# @overload external_system_path(organization:, source:, location:, finding:, externalsystem:)
|
|
140
|
+
# The resource will be in the following format:
|
|
141
|
+
#
|
|
142
|
+
# `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}`
|
|
143
|
+
#
|
|
144
|
+
# @param organization [String]
|
|
145
|
+
# @param source [String]
|
|
146
|
+
# @param location [String]
|
|
147
|
+
# @param finding [String]
|
|
148
|
+
# @param externalsystem [String]
|
|
149
|
+
#
|
|
150
|
+
# @overload external_system_path(folder:, source:, finding:, externalsystem:)
|
|
151
|
+
# The resource will be in the following format:
|
|
152
|
+
#
|
|
153
|
+
# `folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}`
|
|
154
|
+
#
|
|
155
|
+
# @param folder [String]
|
|
156
|
+
# @param source [String]
|
|
157
|
+
# @param finding [String]
|
|
158
|
+
# @param externalsystem [String]
|
|
159
|
+
#
|
|
160
|
+
# @overload external_system_path(folder:, source:, location:, finding:, externalsystem:)
|
|
161
|
+
# The resource will be in the following format:
|
|
162
|
+
#
|
|
163
|
+
# `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}`
|
|
164
|
+
#
|
|
165
|
+
# @param folder [String]
|
|
166
|
+
# @param source [String]
|
|
167
|
+
# @param location [String]
|
|
168
|
+
# @param finding [String]
|
|
169
|
+
# @param externalsystem [String]
|
|
170
|
+
#
|
|
171
|
+
# @overload external_system_path(project:, source:, finding:, externalsystem:)
|
|
172
|
+
# The resource will be in the following format:
|
|
173
|
+
#
|
|
174
|
+
# `projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}`
|
|
175
|
+
#
|
|
176
|
+
# @param project [String]
|
|
177
|
+
# @param source [String]
|
|
178
|
+
# @param finding [String]
|
|
179
|
+
# @param externalsystem [String]
|
|
180
|
+
#
|
|
181
|
+
# @overload external_system_path(project:, source:, location:, finding:, externalsystem:)
|
|
182
|
+
# The resource will be in the following format:
|
|
183
|
+
#
|
|
184
|
+
# `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}`
|
|
185
|
+
#
|
|
186
|
+
# @param project [String]
|
|
187
|
+
# @param source [String]
|
|
188
|
+
# @param location [String]
|
|
189
|
+
# @param finding [String]
|
|
190
|
+
# @param externalsystem [String]
|
|
191
|
+
#
|
|
192
|
+
# @return [::String]
|
|
193
|
+
def external_system_path **args
|
|
194
|
+
resources = {
|
|
195
|
+
"externalsystem:finding:organization:source" => (proc do |organization:, source:, finding:, externalsystem:|
|
|
196
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
197
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
198
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
199
|
+
|
|
200
|
+
"organizations/#{organization}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
201
|
+
end),
|
|
202
|
+
"externalsystem:finding:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:|
|
|
203
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
204
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
205
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
206
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
207
|
+
|
|
208
|
+
"organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
209
|
+
end),
|
|
210
|
+
"externalsystem:finding:folder:source" => (proc do |folder:, source:, finding:, externalsystem:|
|
|
211
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
212
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
213
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
214
|
+
|
|
215
|
+
"folders/#{folder}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
216
|
+
end),
|
|
217
|
+
"externalsystem:finding:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:|
|
|
218
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
219
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
220
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
221
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
222
|
+
|
|
223
|
+
"folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
224
|
+
end),
|
|
225
|
+
"externalsystem:finding:project:source" => (proc do |project:, source:, finding:, externalsystem:|
|
|
226
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
227
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
228
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
229
|
+
|
|
230
|
+
"projects/#{project}/sources/#{source}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
231
|
+
end),
|
|
232
|
+
"externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:|
|
|
233
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
234
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
235
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
236
|
+
raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/"
|
|
237
|
+
|
|
238
|
+
"projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/externalSystems/#{externalsystem}"
|
|
239
|
+
end)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
resource = resources[args.keys.sort.join(":")]
|
|
243
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
244
|
+
resource.call(**args)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
##
|
|
248
|
+
# Create a fully-qualified Finding resource string.
|
|
249
|
+
#
|
|
250
|
+
# @overload finding_path(organization:, source:, finding:)
|
|
251
|
+
# The resource will be in the following format:
|
|
252
|
+
#
|
|
253
|
+
# `organizations/{organization}/sources/{source}/findings/{finding}`
|
|
254
|
+
#
|
|
255
|
+
# @param organization [String]
|
|
256
|
+
# @param source [String]
|
|
257
|
+
# @param finding [String]
|
|
258
|
+
#
|
|
259
|
+
# @overload finding_path(organization:, source:, location:, finding:)
|
|
260
|
+
# The resource will be in the following format:
|
|
261
|
+
#
|
|
262
|
+
# `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}`
|
|
263
|
+
#
|
|
264
|
+
# @param organization [String]
|
|
265
|
+
# @param source [String]
|
|
266
|
+
# @param location [String]
|
|
267
|
+
# @param finding [String]
|
|
268
|
+
#
|
|
269
|
+
# @overload finding_path(folder:, source:, finding:)
|
|
270
|
+
# The resource will be in the following format:
|
|
271
|
+
#
|
|
272
|
+
# `folders/{folder}/sources/{source}/findings/{finding}`
|
|
273
|
+
#
|
|
274
|
+
# @param folder [String]
|
|
275
|
+
# @param source [String]
|
|
276
|
+
# @param finding [String]
|
|
277
|
+
#
|
|
278
|
+
# @overload finding_path(folder:, source:, location:, finding:)
|
|
279
|
+
# The resource will be in the following format:
|
|
280
|
+
#
|
|
281
|
+
# `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}`
|
|
282
|
+
#
|
|
283
|
+
# @param folder [String]
|
|
284
|
+
# @param source [String]
|
|
285
|
+
# @param location [String]
|
|
286
|
+
# @param finding [String]
|
|
287
|
+
#
|
|
288
|
+
# @overload finding_path(project:, source:, finding:)
|
|
289
|
+
# The resource will be in the following format:
|
|
290
|
+
#
|
|
291
|
+
# `projects/{project}/sources/{source}/findings/{finding}`
|
|
292
|
+
#
|
|
293
|
+
# @param project [String]
|
|
294
|
+
# @param source [String]
|
|
295
|
+
# @param finding [String]
|
|
296
|
+
#
|
|
297
|
+
# @overload finding_path(project:, source:, location:, finding:)
|
|
298
|
+
# The resource will be in the following format:
|
|
299
|
+
#
|
|
300
|
+
# `projects/{project}/sources/{source}/locations/{location}/findings/{finding}`
|
|
301
|
+
#
|
|
302
|
+
# @param project [String]
|
|
303
|
+
# @param source [String]
|
|
304
|
+
# @param location [String]
|
|
305
|
+
# @param finding [String]
|
|
306
|
+
#
|
|
307
|
+
# @return [::String]
|
|
308
|
+
def finding_path **args
|
|
309
|
+
resources = {
|
|
310
|
+
"finding:organization:source" => (proc do |organization:, source:, finding:|
|
|
311
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
312
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
313
|
+
|
|
314
|
+
"organizations/#{organization}/sources/#{source}/findings/#{finding}"
|
|
315
|
+
end),
|
|
316
|
+
"finding:location:organization:source" => (proc do |organization:, source:, location:, finding:|
|
|
317
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
318
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
319
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
320
|
+
|
|
321
|
+
"organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}"
|
|
322
|
+
end),
|
|
323
|
+
"finding:folder:source" => (proc do |folder:, source:, finding:|
|
|
324
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
325
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
326
|
+
|
|
327
|
+
"folders/#{folder}/sources/#{source}/findings/#{finding}"
|
|
328
|
+
end),
|
|
329
|
+
"finding:folder:location:source" => (proc do |folder:, source:, location:, finding:|
|
|
330
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
331
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
332
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
333
|
+
|
|
334
|
+
"folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}"
|
|
335
|
+
end),
|
|
336
|
+
"finding:project:source" => (proc do |project:, source:, finding:|
|
|
337
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
338
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
339
|
+
|
|
340
|
+
"projects/#{project}/sources/#{source}/findings/#{finding}"
|
|
341
|
+
end),
|
|
342
|
+
"finding:location:project:source" => (proc do |project:, source:, location:, finding:|
|
|
343
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
344
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
345
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
346
|
+
|
|
347
|
+
"projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}"
|
|
348
|
+
end)
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
resource = resources[args.keys.sort.join(":")]
|
|
352
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
353
|
+
resource.call(**args)
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
##
|
|
357
|
+
# Create a fully-qualified Folder resource string.
|
|
358
|
+
#
|
|
359
|
+
# The resource will be in the following format:
|
|
360
|
+
#
|
|
361
|
+
# `folders/{folder}`
|
|
362
|
+
#
|
|
363
|
+
# @param folder [String]
|
|
364
|
+
#
|
|
365
|
+
# @return [::String]
|
|
366
|
+
def folder_path folder:
|
|
367
|
+
"folders/#{folder}"
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
##
|
|
371
|
+
# Create a fully-qualified FolderLocation resource string.
|
|
372
|
+
#
|
|
373
|
+
# The resource will be in the following format:
|
|
374
|
+
#
|
|
375
|
+
# `folders/{folder}/locations/{location}`
|
|
376
|
+
#
|
|
377
|
+
# @param folder [String]
|
|
378
|
+
# @param location [String]
|
|
379
|
+
#
|
|
380
|
+
# @return [::String]
|
|
381
|
+
def folder_location_path folder:, location:
|
|
382
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
383
|
+
|
|
384
|
+
"folders/#{folder}/locations/#{location}"
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
##
|
|
388
|
+
# Create a fully-qualified Location resource string.
|
|
389
|
+
#
|
|
390
|
+
# The resource will be in the following format:
|
|
391
|
+
#
|
|
392
|
+
# `projects/{project}/locations/{location}`
|
|
393
|
+
#
|
|
394
|
+
# @param project [String]
|
|
395
|
+
# @param location [String]
|
|
396
|
+
#
|
|
397
|
+
# @return [::String]
|
|
398
|
+
def location_path project:, location:
|
|
399
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
400
|
+
|
|
401
|
+
"projects/#{project}/locations/#{location}"
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
##
|
|
405
|
+
# Create a fully-qualified MuteConfig resource string.
|
|
406
|
+
#
|
|
407
|
+
# @overload mute_config_path(organization:, mute_config:)
|
|
408
|
+
# The resource will be in the following format:
|
|
409
|
+
#
|
|
410
|
+
# `organizations/{organization}/muteConfigs/{mute_config}`
|
|
411
|
+
#
|
|
412
|
+
# @param organization [String]
|
|
413
|
+
# @param mute_config [String]
|
|
414
|
+
#
|
|
415
|
+
# @overload mute_config_path(organization:, location:, mute_config:)
|
|
416
|
+
# The resource will be in the following format:
|
|
417
|
+
#
|
|
418
|
+
# `organizations/{organization}/locations/{location}/muteConfigs/{mute_config}`
|
|
419
|
+
#
|
|
420
|
+
# @param organization [String]
|
|
421
|
+
# @param location [String]
|
|
422
|
+
# @param mute_config [String]
|
|
423
|
+
#
|
|
424
|
+
# @overload mute_config_path(folder:, mute_config:)
|
|
425
|
+
# The resource will be in the following format:
|
|
426
|
+
#
|
|
427
|
+
# `folders/{folder}/muteConfigs/{mute_config}`
|
|
428
|
+
#
|
|
429
|
+
# @param folder [String]
|
|
430
|
+
# @param mute_config [String]
|
|
431
|
+
#
|
|
432
|
+
# @overload mute_config_path(folder:, location:, mute_config:)
|
|
433
|
+
# The resource will be in the following format:
|
|
434
|
+
#
|
|
435
|
+
# `folders/{folder}/locations/{location}/muteConfigs/{mute_config}`
|
|
436
|
+
#
|
|
437
|
+
# @param folder [String]
|
|
438
|
+
# @param location [String]
|
|
439
|
+
# @param mute_config [String]
|
|
440
|
+
#
|
|
441
|
+
# @overload mute_config_path(project:, mute_config:)
|
|
442
|
+
# The resource will be in the following format:
|
|
443
|
+
#
|
|
444
|
+
# `projects/{project}/muteConfigs/{mute_config}`
|
|
445
|
+
#
|
|
446
|
+
# @param project [String]
|
|
447
|
+
# @param mute_config [String]
|
|
448
|
+
#
|
|
449
|
+
# @overload mute_config_path(project:, location:, mute_config:)
|
|
450
|
+
# The resource will be in the following format:
|
|
451
|
+
#
|
|
452
|
+
# `projects/{project}/locations/{location}/muteConfigs/{mute_config}`
|
|
453
|
+
#
|
|
454
|
+
# @param project [String]
|
|
455
|
+
# @param location [String]
|
|
456
|
+
# @param mute_config [String]
|
|
457
|
+
#
|
|
458
|
+
# @return [::String]
|
|
459
|
+
def mute_config_path **args
|
|
460
|
+
resources = {
|
|
461
|
+
"mute_config:organization" => (proc do |organization:, mute_config:|
|
|
462
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
463
|
+
|
|
464
|
+
"organizations/#{organization}/muteConfigs/#{mute_config}"
|
|
465
|
+
end),
|
|
466
|
+
"location:mute_config:organization" => (proc do |organization:, location:, mute_config:|
|
|
467
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
468
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
469
|
+
|
|
470
|
+
"organizations/#{organization}/locations/#{location}/muteConfigs/#{mute_config}"
|
|
471
|
+
end),
|
|
472
|
+
"folder:mute_config" => (proc do |folder:, mute_config:|
|
|
473
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
474
|
+
|
|
475
|
+
"folders/#{folder}/muteConfigs/#{mute_config}"
|
|
476
|
+
end),
|
|
477
|
+
"folder:location:mute_config" => (proc do |folder:, location:, mute_config:|
|
|
478
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
479
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
480
|
+
|
|
481
|
+
"folders/#{folder}/locations/#{location}/muteConfigs/#{mute_config}"
|
|
482
|
+
end),
|
|
483
|
+
"mute_config:project" => (proc do |project:, mute_config:|
|
|
484
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
485
|
+
|
|
486
|
+
"projects/#{project}/muteConfigs/#{mute_config}"
|
|
487
|
+
end),
|
|
488
|
+
"location:mute_config:project" => (proc do |project:, location:, mute_config:|
|
|
489
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
490
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
491
|
+
|
|
492
|
+
"projects/#{project}/locations/#{location}/muteConfigs/#{mute_config}"
|
|
493
|
+
end)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
resource = resources[args.keys.sort.join(":")]
|
|
497
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
498
|
+
resource.call(**args)
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
##
|
|
502
|
+
# Create a fully-qualified NotificationConfig resource string.
|
|
503
|
+
#
|
|
504
|
+
# @overload notification_config_path(organization:, location:, notification_config:)
|
|
505
|
+
# The resource will be in the following format:
|
|
506
|
+
#
|
|
507
|
+
# `organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}`
|
|
508
|
+
#
|
|
509
|
+
# @param organization [String]
|
|
510
|
+
# @param location [String]
|
|
511
|
+
# @param notification_config [String]
|
|
512
|
+
#
|
|
513
|
+
# @overload notification_config_path(folder:, location:, notification_config:)
|
|
514
|
+
# The resource will be in the following format:
|
|
515
|
+
#
|
|
516
|
+
# `folders/{folder}/locations/{location}/notificationConfigs/{notification_config}`
|
|
517
|
+
#
|
|
518
|
+
# @param folder [String]
|
|
519
|
+
# @param location [String]
|
|
520
|
+
# @param notification_config [String]
|
|
521
|
+
#
|
|
522
|
+
# @overload notification_config_path(project:, location:, notification_config:)
|
|
523
|
+
# The resource will be in the following format:
|
|
524
|
+
#
|
|
525
|
+
# `projects/{project}/locations/{location}/notificationConfigs/{notification_config}`
|
|
526
|
+
#
|
|
527
|
+
# @param project [String]
|
|
528
|
+
# @param location [String]
|
|
529
|
+
# @param notification_config [String]
|
|
530
|
+
#
|
|
531
|
+
# @return [::String]
|
|
532
|
+
def notification_config_path **args
|
|
533
|
+
resources = {
|
|
534
|
+
"location:notification_config:organization" => (proc do |organization:, location:, notification_config:|
|
|
535
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
536
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
537
|
+
|
|
538
|
+
"organizations/#{organization}/locations/#{location}/notificationConfigs/#{notification_config}"
|
|
539
|
+
end),
|
|
540
|
+
"folder:location:notification_config" => (proc do |folder:, location:, notification_config:|
|
|
541
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
542
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
543
|
+
|
|
544
|
+
"folders/#{folder}/locations/#{location}/notificationConfigs/#{notification_config}"
|
|
545
|
+
end),
|
|
546
|
+
"location:notification_config:project" => (proc do |project:, location:, notification_config:|
|
|
547
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
548
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
549
|
+
|
|
550
|
+
"projects/#{project}/locations/#{location}/notificationConfigs/#{notification_config}"
|
|
551
|
+
end)
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
resource = resources[args.keys.sort.join(":")]
|
|
555
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
556
|
+
resource.call(**args)
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
##
|
|
560
|
+
# Create a fully-qualified Organization resource string.
|
|
561
|
+
#
|
|
562
|
+
# The resource will be in the following format:
|
|
563
|
+
#
|
|
564
|
+
# `organizations/{organization}`
|
|
565
|
+
#
|
|
566
|
+
# @param organization [String]
|
|
567
|
+
#
|
|
568
|
+
# @return [::String]
|
|
569
|
+
def organization_path organization:
|
|
570
|
+
"organizations/#{organization}"
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
##
|
|
574
|
+
# Create a fully-qualified OrganizationLocation resource string.
|
|
575
|
+
#
|
|
576
|
+
# The resource will be in the following format:
|
|
577
|
+
#
|
|
578
|
+
# `organizations/{organization}/locations/{location}`
|
|
579
|
+
#
|
|
580
|
+
# @param organization [String]
|
|
581
|
+
# @param location [String]
|
|
582
|
+
#
|
|
583
|
+
# @return [::String]
|
|
584
|
+
def organization_location_path organization:, location:
|
|
585
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
586
|
+
|
|
587
|
+
"organizations/#{organization}/locations/#{location}"
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
##
|
|
591
|
+
# Create a fully-qualified Policy resource string.
|
|
592
|
+
#
|
|
593
|
+
# @overload policy_path(organization:, constraint_name:)
|
|
594
|
+
# The resource will be in the following format:
|
|
595
|
+
#
|
|
596
|
+
# `organizations/{organization}/policies/{constraint_name}`
|
|
597
|
+
#
|
|
598
|
+
# @param organization [String]
|
|
599
|
+
# @param constraint_name [String]
|
|
600
|
+
#
|
|
601
|
+
# @overload policy_path(folder:, constraint_name:)
|
|
602
|
+
# The resource will be in the following format:
|
|
603
|
+
#
|
|
604
|
+
# `folders/{folder}/policies/{constraint_name}`
|
|
605
|
+
#
|
|
606
|
+
# @param folder [String]
|
|
607
|
+
# @param constraint_name [String]
|
|
608
|
+
#
|
|
609
|
+
# @overload policy_path(project:, constraint_name:)
|
|
610
|
+
# The resource will be in the following format:
|
|
611
|
+
#
|
|
612
|
+
# `projects/{project}/policies/{constraint_name}`
|
|
613
|
+
#
|
|
614
|
+
# @param project [String]
|
|
615
|
+
# @param constraint_name [String]
|
|
616
|
+
#
|
|
617
|
+
# @return [::String]
|
|
618
|
+
def policy_path **args
|
|
619
|
+
resources = {
|
|
620
|
+
"constraint_name:organization" => (proc do |organization:, constraint_name:|
|
|
621
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
622
|
+
|
|
623
|
+
"organizations/#{organization}/policies/#{constraint_name}"
|
|
624
|
+
end),
|
|
625
|
+
"constraint_name:folder" => (proc do |folder:, constraint_name:|
|
|
626
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
627
|
+
|
|
628
|
+
"folders/#{folder}/policies/#{constraint_name}"
|
|
629
|
+
end),
|
|
630
|
+
"constraint_name:project" => (proc do |project:, constraint_name:|
|
|
631
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
632
|
+
|
|
633
|
+
"projects/#{project}/policies/#{constraint_name}"
|
|
634
|
+
end)
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
resource = resources[args.keys.sort.join(":")]
|
|
638
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
639
|
+
resource.call(**args)
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
##
|
|
643
|
+
# Create a fully-qualified Project resource string.
|
|
644
|
+
#
|
|
645
|
+
# The resource will be in the following format:
|
|
646
|
+
#
|
|
647
|
+
# `projects/{project}`
|
|
648
|
+
#
|
|
649
|
+
# @param project [String]
|
|
650
|
+
#
|
|
651
|
+
# @return [::String]
|
|
652
|
+
def project_path project:
|
|
653
|
+
"projects/#{project}"
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
##
|
|
657
|
+
# Create a fully-qualified ResourceValueConfig resource string.
|
|
658
|
+
#
|
|
659
|
+
# The resource will be in the following format:
|
|
660
|
+
#
|
|
661
|
+
# `organizations/{organization}/resourceValueConfigs/{resource_value_config}`
|
|
662
|
+
#
|
|
663
|
+
# @param organization [String]
|
|
664
|
+
# @param resource_value_config [String]
|
|
665
|
+
#
|
|
666
|
+
# @return [::String]
|
|
667
|
+
def resource_value_config_path organization:, resource_value_config:
|
|
668
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
669
|
+
|
|
670
|
+
"organizations/#{organization}/resourceValueConfigs/#{resource_value_config}"
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
##
|
|
674
|
+
# Create a fully-qualified SecurityMarks resource string.
|
|
675
|
+
#
|
|
676
|
+
# @overload security_marks_path(organization:, asset:)
|
|
677
|
+
# The resource will be in the following format:
|
|
678
|
+
#
|
|
679
|
+
# `organizations/{organization}/assets/{asset}/securityMarks`
|
|
680
|
+
#
|
|
681
|
+
# @param organization [String]
|
|
682
|
+
# @param asset [String]
|
|
683
|
+
#
|
|
684
|
+
# @overload security_marks_path(organization:, source:, finding:)
|
|
685
|
+
# The resource will be in the following format:
|
|
686
|
+
#
|
|
687
|
+
# `organizations/{organization}/sources/{source}/findings/{finding}/securityMarks`
|
|
688
|
+
#
|
|
689
|
+
# @param organization [String]
|
|
690
|
+
# @param source [String]
|
|
691
|
+
# @param finding [String]
|
|
692
|
+
#
|
|
693
|
+
# @overload security_marks_path(organization:, source:, location:, finding:)
|
|
694
|
+
# The resource will be in the following format:
|
|
695
|
+
#
|
|
696
|
+
# `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks`
|
|
697
|
+
#
|
|
698
|
+
# @param organization [String]
|
|
699
|
+
# @param source [String]
|
|
700
|
+
# @param location [String]
|
|
701
|
+
# @param finding [String]
|
|
702
|
+
#
|
|
703
|
+
# @overload security_marks_path(folder:, asset:)
|
|
704
|
+
# The resource will be in the following format:
|
|
705
|
+
#
|
|
706
|
+
# `folders/{folder}/assets/{asset}/securityMarks`
|
|
707
|
+
#
|
|
708
|
+
# @param folder [String]
|
|
709
|
+
# @param asset [String]
|
|
710
|
+
#
|
|
711
|
+
# @overload security_marks_path(folder:, source:, finding:)
|
|
712
|
+
# The resource will be in the following format:
|
|
713
|
+
#
|
|
714
|
+
# `folders/{folder}/sources/{source}/findings/{finding}/securityMarks`
|
|
715
|
+
#
|
|
716
|
+
# @param folder [String]
|
|
717
|
+
# @param source [String]
|
|
718
|
+
# @param finding [String]
|
|
719
|
+
#
|
|
720
|
+
# @overload security_marks_path(folder:, source:, location:, finding:)
|
|
721
|
+
# The resource will be in the following format:
|
|
722
|
+
#
|
|
723
|
+
# `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks`
|
|
724
|
+
#
|
|
725
|
+
# @param folder [String]
|
|
726
|
+
# @param source [String]
|
|
727
|
+
# @param location [String]
|
|
728
|
+
# @param finding [String]
|
|
729
|
+
#
|
|
730
|
+
# @overload security_marks_path(project:, asset:)
|
|
731
|
+
# The resource will be in the following format:
|
|
732
|
+
#
|
|
733
|
+
# `projects/{project}/assets/{asset}/securityMarks`
|
|
734
|
+
#
|
|
735
|
+
# @param project [String]
|
|
736
|
+
# @param asset [String]
|
|
737
|
+
#
|
|
738
|
+
# @overload security_marks_path(project:, source:, finding:)
|
|
739
|
+
# The resource will be in the following format:
|
|
740
|
+
#
|
|
741
|
+
# `projects/{project}/sources/{source}/findings/{finding}/securityMarks`
|
|
742
|
+
#
|
|
743
|
+
# @param project [String]
|
|
744
|
+
# @param source [String]
|
|
745
|
+
# @param finding [String]
|
|
746
|
+
#
|
|
747
|
+
# @overload security_marks_path(project:, source:, location:, finding:)
|
|
748
|
+
# The resource will be in the following format:
|
|
749
|
+
#
|
|
750
|
+
# `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks`
|
|
751
|
+
#
|
|
752
|
+
# @param project [String]
|
|
753
|
+
# @param source [String]
|
|
754
|
+
# @param location [String]
|
|
755
|
+
# @param finding [String]
|
|
756
|
+
#
|
|
757
|
+
# @return [::String]
|
|
758
|
+
def security_marks_path **args
|
|
759
|
+
resources = {
|
|
760
|
+
"asset:organization" => (proc do |organization:, asset:|
|
|
761
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
762
|
+
|
|
763
|
+
"organizations/#{organization}/assets/#{asset}/securityMarks"
|
|
764
|
+
end),
|
|
765
|
+
"finding:organization:source" => (proc do |organization:, source:, finding:|
|
|
766
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
767
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
768
|
+
|
|
769
|
+
"organizations/#{organization}/sources/#{source}/findings/#{finding}/securityMarks"
|
|
770
|
+
end),
|
|
771
|
+
"finding:location:organization:source" => (proc do |organization:, source:, location:, finding:|
|
|
772
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
773
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
774
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
775
|
+
|
|
776
|
+
"organizations/#{organization}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks"
|
|
777
|
+
end),
|
|
778
|
+
"asset:folder" => (proc do |folder:, asset:|
|
|
779
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
780
|
+
|
|
781
|
+
"folders/#{folder}/assets/#{asset}/securityMarks"
|
|
782
|
+
end),
|
|
783
|
+
"finding:folder:source" => (proc do |folder:, source:, finding:|
|
|
784
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
785
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
786
|
+
|
|
787
|
+
"folders/#{folder}/sources/#{source}/findings/#{finding}/securityMarks"
|
|
788
|
+
end),
|
|
789
|
+
"finding:folder:location:source" => (proc do |folder:, source:, location:, finding:|
|
|
790
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
791
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
792
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
793
|
+
|
|
794
|
+
"folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks"
|
|
795
|
+
end),
|
|
796
|
+
"asset:project" => (proc do |project:, asset:|
|
|
797
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
798
|
+
|
|
799
|
+
"projects/#{project}/assets/#{asset}/securityMarks"
|
|
800
|
+
end),
|
|
801
|
+
"finding:project:source" => (proc do |project:, source:, finding:|
|
|
802
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
803
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
804
|
+
|
|
805
|
+
"projects/#{project}/sources/#{source}/findings/#{finding}/securityMarks"
|
|
806
|
+
end),
|
|
807
|
+
"finding:location:project:source" => (proc do |project:, source:, location:, finding:|
|
|
808
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
809
|
+
raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
|
|
810
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
811
|
+
|
|
812
|
+
"projects/#{project}/sources/#{source}/locations/#{location}/findings/#{finding}/securityMarks"
|
|
813
|
+
end)
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
resource = resources[args.keys.sort.join(":")]
|
|
817
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
818
|
+
resource.call(**args)
|
|
819
|
+
end
|
|
820
|
+
|
|
821
|
+
##
|
|
822
|
+
# Create a fully-qualified Simulation resource string.
|
|
823
|
+
#
|
|
824
|
+
# The resource will be in the following format:
|
|
825
|
+
#
|
|
826
|
+
# `organizations/{organization}/simulations/{simulation}`
|
|
827
|
+
#
|
|
828
|
+
# @param organization [String]
|
|
829
|
+
# @param simulation [String]
|
|
830
|
+
#
|
|
831
|
+
# @return [::String]
|
|
832
|
+
def simulation_path organization:, simulation:
|
|
833
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
834
|
+
|
|
835
|
+
"organizations/#{organization}/simulations/#{simulation}"
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
##
|
|
839
|
+
# Create a fully-qualified Source resource string.
|
|
840
|
+
#
|
|
841
|
+
# @overload source_path(organization:, source:)
|
|
842
|
+
# The resource will be in the following format:
|
|
843
|
+
#
|
|
844
|
+
# `organizations/{organization}/sources/{source}`
|
|
845
|
+
#
|
|
846
|
+
# @param organization [String]
|
|
847
|
+
# @param source [String]
|
|
848
|
+
#
|
|
849
|
+
# @overload source_path(folder:, source:)
|
|
850
|
+
# The resource will be in the following format:
|
|
851
|
+
#
|
|
852
|
+
# `folders/{folder}/sources/{source}`
|
|
853
|
+
#
|
|
854
|
+
# @param folder [String]
|
|
855
|
+
# @param source [String]
|
|
856
|
+
#
|
|
857
|
+
# @overload source_path(project:, source:)
|
|
858
|
+
# The resource will be in the following format:
|
|
859
|
+
#
|
|
860
|
+
# `projects/{project}/sources/{source}`
|
|
861
|
+
#
|
|
862
|
+
# @param project [String]
|
|
863
|
+
# @param source [String]
|
|
864
|
+
#
|
|
865
|
+
# @return [::String]
|
|
866
|
+
def source_path **args
|
|
867
|
+
resources = {
|
|
868
|
+
"organization:source" => (proc do |organization:, source:|
|
|
869
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
870
|
+
|
|
871
|
+
"organizations/#{organization}/sources/#{source}"
|
|
872
|
+
end),
|
|
873
|
+
"folder:source" => (proc do |folder:, source:|
|
|
874
|
+
raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
|
875
|
+
|
|
876
|
+
"folders/#{folder}/sources/#{source}"
|
|
877
|
+
end),
|
|
878
|
+
"project:source" => (proc do |project:, source:|
|
|
879
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
880
|
+
|
|
881
|
+
"projects/#{project}/sources/#{source}"
|
|
882
|
+
end)
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
resource = resources[args.keys.sort.join(":")]
|
|
886
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
887
|
+
resource.call(**args)
|
|
888
|
+
end
|
|
889
|
+
|
|
890
|
+
##
|
|
891
|
+
# Create a fully-qualified TableDataProfile resource string.
|
|
892
|
+
#
|
|
893
|
+
# @overload table_data_profile_path(project:, table_profile:)
|
|
894
|
+
# The resource will be in the following format:
|
|
895
|
+
#
|
|
896
|
+
# `projects/{project}/tableProfiles/{table_profile}`
|
|
897
|
+
#
|
|
898
|
+
# @param project [String]
|
|
899
|
+
# @param table_profile [String]
|
|
900
|
+
#
|
|
901
|
+
# @overload table_data_profile_path(project:, location:, table_profile:)
|
|
902
|
+
# The resource will be in the following format:
|
|
903
|
+
#
|
|
904
|
+
# `projects/{project}/locations/{location}/tableProfiles/{table_profile}`
|
|
905
|
+
#
|
|
906
|
+
# @param project [String]
|
|
907
|
+
# @param location [String]
|
|
908
|
+
# @param table_profile [String]
|
|
909
|
+
#
|
|
910
|
+
# @return [::String]
|
|
911
|
+
def table_data_profile_path **args
|
|
912
|
+
resources = {
|
|
913
|
+
"project:table_profile" => (proc do |project:, table_profile:|
|
|
914
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
915
|
+
|
|
916
|
+
"projects/#{project}/tableProfiles/#{table_profile}"
|
|
917
|
+
end),
|
|
918
|
+
"location:project:table_profile" => (proc do |project:, location:, table_profile:|
|
|
919
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
920
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
921
|
+
|
|
922
|
+
"projects/#{project}/locations/#{location}/tableProfiles/#{table_profile}"
|
|
923
|
+
end)
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
resource = resources[args.keys.sort.join(":")]
|
|
927
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
|
928
|
+
resource.call(**args)
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
##
|
|
932
|
+
# Create a fully-qualified Topic resource string.
|
|
933
|
+
#
|
|
934
|
+
# The resource will be in the following format:
|
|
935
|
+
#
|
|
936
|
+
# `projects/{project}/topics/{topic}`
|
|
937
|
+
#
|
|
938
|
+
# @param project [String]
|
|
939
|
+
# @param topic [String]
|
|
940
|
+
#
|
|
941
|
+
# @return [::String]
|
|
942
|
+
def topic_path project:, topic:
|
|
943
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
944
|
+
|
|
945
|
+
"projects/#{project}/topics/#{topic}"
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
##
|
|
949
|
+
# Create a fully-qualified ValuedResource resource string.
|
|
950
|
+
#
|
|
951
|
+
# The resource will be in the following format:
|
|
952
|
+
#
|
|
953
|
+
# `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`
|
|
954
|
+
#
|
|
955
|
+
# @param organization [String]
|
|
956
|
+
# @param simulation [String]
|
|
957
|
+
# @param valued_resource [String]
|
|
958
|
+
#
|
|
959
|
+
# @return [::String]
|
|
960
|
+
def valued_resource_path organization:, simulation:, valued_resource:
|
|
961
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
|
962
|
+
raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/"
|
|
963
|
+
|
|
964
|
+
"organizations/#{organization}/simulations/#{simulation}/valuedResources/#{valued_resource}"
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
extend self
|
|
968
|
+
end
|
|
969
|
+
end
|
|
970
|
+
end
|
|
971
|
+
end
|
|
972
|
+
end
|
|
973
|
+
end
|