google-apis-policysimulator_v1 0.1.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.
@@ -0,0 +1,480 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module PolicysimulatorV1
23
+ # Policy Simulator API
24
+ #
25
+ # Policy Simulator is a collection of endpoints for creating, running, and
26
+ # viewing a Replay. A `Replay` is a type of simulation that lets you see how
27
+ # your members' access to resources might change if you changed your IAM policy.
28
+ # During a `Replay`, Policy Simulator re-evaluates, or replays, past access
29
+ # attempts under both the current policy and your proposed policy, and compares
30
+ # those results to determine how your members' access might change under the
31
+ # proposed policy.
32
+ #
33
+ # @example
34
+ # require 'google/apis/policysimulator_v1'
35
+ #
36
+ # Policysimulator = Google::Apis::PolicysimulatorV1 # Alias the module
37
+ # service = Policysimulator::PolicySimulatorService.new
38
+ #
39
+ # @see https://cloud.google.com/iam/docs/simulating-access
40
+ class PolicySimulatorService < Google::Apis::Core::BaseService
41
+ # @return [String]
42
+ # API key. Your API key identifies your project and provides you with API access,
43
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
44
+ attr_accessor :key
45
+
46
+ # @return [String]
47
+ # Available to use for quota purposes for server-side applications. Can be any
48
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
49
+ attr_accessor :quota_user
50
+
51
+ def initialize
52
+ super('https://policysimulator.googleapis.com/', '',
53
+ client_name: 'google-apis-policysimulator_v1',
54
+ client_version: Google::Apis::PolicysimulatorV1::GEM_VERSION)
55
+ @batch_path = 'batch'
56
+ end
57
+
58
+ # Creates and starts a Replay using the given ReplayConfig.
59
+ # @param [String] parent
60
+ # Required. The parent resource where this Replay will be created. This resource
61
+ # must be a project, folder, or organization with a location. Example: `projects/
62
+ # my-example-project/locations/global`
63
+ # @param [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] google_cloud_policysimulator_v1_replay_object
64
+ # @param [String] fields
65
+ # Selector specifying which fields to include in a partial response.
66
+ # @param [String] quota_user
67
+ # Available to use for quota purposes for server-side applications. Can be any
68
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
69
+ # @param [Google::Apis::RequestOptions] options
70
+ # Request-specific options
71
+ #
72
+ # @yield [result, err] Result & error if block supplied
73
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
74
+ # @yieldparam err [StandardError] error object if request failed
75
+ #
76
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
77
+ #
78
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
79
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
80
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
81
+ def create_folder_location_replay(parent, google_cloud_policysimulator_v1_replay_object = nil, fields: nil, quota_user: nil, options: nil, &block)
82
+ command = make_simple_command(:post, 'v1/{+parent}/replays', options)
83
+ command.request_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
84
+ command.request_object = google_cloud_policysimulator_v1_replay_object
85
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
86
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
87
+ command.params['parent'] = parent unless parent.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ execute_or_queue_command(command, &block)
91
+ end
92
+
93
+ # Gets the specified Replay. Each `Replay` is available for at least 7 days.
94
+ # @param [String] name
95
+ # Required. The name of the Replay to retrieve, in the following format: ``
96
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
97
+ # id``, where ``resource-id`` is the ID of the project, folder, or organization
98
+ # that owns the `Replay`. Example: `projects/my-example-project/locations/global/
99
+ # replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def get_folder_location_replay(name, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:get, 'v1/{+name}', options)
119
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
120
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay
121
+ command.params['name'] = name unless name.nil?
122
+ command.query['fields'] = fields unless fields.nil?
123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
124
+ execute_or_queue_command(command, &block)
125
+ end
126
+
127
+ # Lists the results of running a Replay.
128
+ # @param [String] parent
129
+ # Required. The Replay whose results are listed, in the following format: ``
130
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
131
+ # id`` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-
132
+ # 8e03-479ce1833c36`
133
+ # @param [Fixnum] page_size
134
+ # The maximum number of ReplayResult objects to return. Defaults to 5000. The
135
+ # maximum value is 5000; values above 5000 are rounded down to 5000.
136
+ # @param [String] page_token
137
+ # A page token, received from a previous Simulator.ListReplayResults call.
138
+ # Provide this token to retrieve the next page of results. When paginating, all
139
+ # other parameters provided to [Simulator.ListReplayResults[] must match the
140
+ # call that provided the page token.
141
+ # @param [String] fields
142
+ # Selector specifying which fields to include in a partial response.
143
+ # @param [String] quota_user
144
+ # Available to use for quota purposes for server-side applications. Can be any
145
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
146
+ # @param [Google::Apis::RequestOptions] options
147
+ # Request-specific options
148
+ #
149
+ # @yield [result, err] Result & error if block supplied
150
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse] parsed result object
151
+ # @yieldparam err [StandardError] error object if request failed
152
+ #
153
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse]
154
+ #
155
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
156
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
157
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
158
+ def list_folder_location_replay_results(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
159
+ command = make_simple_command(:get, 'v1/{+parent}/results', options)
160
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse::Representation
161
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse
162
+ command.params['parent'] = parent unless parent.nil?
163
+ command.query['pageSize'] = page_size unless page_size.nil?
164
+ command.query['pageToken'] = page_token unless page_token.nil?
165
+ command.query['fields'] = fields unless fields.nil?
166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Gets the latest state of a long-running operation. Clients can use this method
171
+ # to poll the operation result at intervals as recommended by the API service.
172
+ # @param [String] name
173
+ # The name of the operation resource.
174
+ # @param [String] fields
175
+ # Selector specifying which fields to include in a partial response.
176
+ # @param [String] quota_user
177
+ # Available to use for quota purposes for server-side applications. Can be any
178
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
179
+ # @param [Google::Apis::RequestOptions] options
180
+ # Request-specific options
181
+ #
182
+ # @yield [result, err] Result & error if block supplied
183
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
184
+ # @yieldparam err [StandardError] error object if request failed
185
+ #
186
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
187
+ #
188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
191
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
192
+ command = make_simple_command(:get, 'v1/{+name}', options)
193
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
194
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
195
+ command.params['name'] = name unless name.nil?
196
+ command.query['fields'] = fields unless fields.nil?
197
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
198
+ execute_or_queue_command(command, &block)
199
+ end
200
+
201
+ # Lists operations that match the specified filter in the request. If the server
202
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
203
+ # binding allows API services to override the binding to use different resource
204
+ # name schemes, such as `users/*/operations`. To override the binding, API
205
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
206
+ # service configuration. For backwards compatibility, the default name includes
207
+ # the operations collection id, however overriding users must ensure the name
208
+ # binding is the parent resource, without the operations collection id.
209
+ # @param [String] filter
210
+ # The standard list filter.
211
+ # @param [String] name
212
+ # The name of the operation's parent resource.
213
+ # @param [Fixnum] page_size
214
+ # The standard list page size.
215
+ # @param [String] page_token
216
+ # The standard list page token.
217
+ # @param [String] fields
218
+ # Selector specifying which fields to include in a partial response.
219
+ # @param [String] quota_user
220
+ # Available to use for quota purposes for server-side applications. Can be any
221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
222
+ # @param [Google::Apis::RequestOptions] options
223
+ # Request-specific options
224
+ #
225
+ # @yield [result, err] Result & error if block supplied
226
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningListOperationsResponse] parsed result object
227
+ # @yieldparam err [StandardError] error object if request failed
228
+ #
229
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningListOperationsResponse]
230
+ #
231
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
232
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
233
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
234
+ def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
235
+ command = make_simple_command(:get, 'v1/operations', options)
236
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningListOperationsResponse::Representation
237
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningListOperationsResponse
238
+ command.query['filter'] = filter unless filter.nil?
239
+ command.query['name'] = name unless name.nil?
240
+ command.query['pageSize'] = page_size unless page_size.nil?
241
+ command.query['pageToken'] = page_token unless page_token.nil?
242
+ command.query['fields'] = fields unless fields.nil?
243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
244
+ execute_or_queue_command(command, &block)
245
+ end
246
+
247
+ # Creates and starts a Replay using the given ReplayConfig.
248
+ # @param [String] parent
249
+ # Required. The parent resource where this Replay will be created. This resource
250
+ # must be a project, folder, or organization with a location. Example: `projects/
251
+ # my-example-project/locations/global`
252
+ # @param [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] google_cloud_policysimulator_v1_replay_object
253
+ # @param [String] fields
254
+ # Selector specifying which fields to include in a partial response.
255
+ # @param [String] quota_user
256
+ # Available to use for quota purposes for server-side applications. Can be any
257
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
258
+ # @param [Google::Apis::RequestOptions] options
259
+ # Request-specific options
260
+ #
261
+ # @yield [result, err] Result & error if block supplied
262
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
263
+ # @yieldparam err [StandardError] error object if request failed
264
+ #
265
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
266
+ #
267
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
268
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
269
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
270
+ def create_organization_location_replay(parent, google_cloud_policysimulator_v1_replay_object = nil, fields: nil, quota_user: nil, options: nil, &block)
271
+ command = make_simple_command(:post, 'v1/{+parent}/replays', options)
272
+ command.request_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
273
+ command.request_object = google_cloud_policysimulator_v1_replay_object
274
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
275
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
276
+ command.params['parent'] = parent unless parent.nil?
277
+ command.query['fields'] = fields unless fields.nil?
278
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
279
+ execute_or_queue_command(command, &block)
280
+ end
281
+
282
+ # Gets the specified Replay. Each `Replay` is available for at least 7 days.
283
+ # @param [String] name
284
+ # Required. The name of the Replay to retrieve, in the following format: ``
285
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
286
+ # id``, where ``resource-id`` is the ID of the project, folder, or organization
287
+ # that owns the `Replay`. Example: `projects/my-example-project/locations/global/
288
+ # replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
289
+ # @param [String] fields
290
+ # Selector specifying which fields to include in a partial response.
291
+ # @param [String] quota_user
292
+ # Available to use for quota purposes for server-side applications. Can be any
293
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
294
+ # @param [Google::Apis::RequestOptions] options
295
+ # Request-specific options
296
+ #
297
+ # @yield [result, err] Result & error if block supplied
298
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] parsed result object
299
+ # @yieldparam err [StandardError] error object if request failed
300
+ #
301
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay]
302
+ #
303
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
304
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
305
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
306
+ def get_organization_location_replay(name, fields: nil, quota_user: nil, options: nil, &block)
307
+ command = make_simple_command(:get, 'v1/{+name}', options)
308
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
309
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay
310
+ command.params['name'] = name unless name.nil?
311
+ command.query['fields'] = fields unless fields.nil?
312
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
313
+ execute_or_queue_command(command, &block)
314
+ end
315
+
316
+ # Lists the results of running a Replay.
317
+ # @param [String] parent
318
+ # Required. The Replay whose results are listed, in the following format: ``
319
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
320
+ # id`` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-
321
+ # 8e03-479ce1833c36`
322
+ # @param [Fixnum] page_size
323
+ # The maximum number of ReplayResult objects to return. Defaults to 5000. The
324
+ # maximum value is 5000; values above 5000 are rounded down to 5000.
325
+ # @param [String] page_token
326
+ # A page token, received from a previous Simulator.ListReplayResults call.
327
+ # Provide this token to retrieve the next page of results. When paginating, all
328
+ # other parameters provided to [Simulator.ListReplayResults[] must match the
329
+ # call that provided the page token.
330
+ # @param [String] fields
331
+ # Selector specifying which fields to include in a partial response.
332
+ # @param [String] quota_user
333
+ # Available to use for quota purposes for server-side applications. Can be any
334
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
335
+ # @param [Google::Apis::RequestOptions] options
336
+ # Request-specific options
337
+ #
338
+ # @yield [result, err] Result & error if block supplied
339
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse] parsed result object
340
+ # @yieldparam err [StandardError] error object if request failed
341
+ #
342
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse]
343
+ #
344
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
345
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
346
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
347
+ def list_organization_location_replay_results(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
348
+ command = make_simple_command(:get, 'v1/{+parent}/results', options)
349
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse::Representation
350
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse
351
+ command.params['parent'] = parent unless parent.nil?
352
+ command.query['pageSize'] = page_size unless page_size.nil?
353
+ command.query['pageToken'] = page_token unless page_token.nil?
354
+ command.query['fields'] = fields unless fields.nil?
355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
356
+ execute_or_queue_command(command, &block)
357
+ end
358
+
359
+ # Creates and starts a Replay using the given ReplayConfig.
360
+ # @param [String] parent
361
+ # Required. The parent resource where this Replay will be created. This resource
362
+ # must be a project, folder, or organization with a location. Example: `projects/
363
+ # my-example-project/locations/global`
364
+ # @param [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] google_cloud_policysimulator_v1_replay_object
365
+ # @param [String] fields
366
+ # Selector specifying which fields to include in a partial response.
367
+ # @param [String] quota_user
368
+ # Available to use for quota purposes for server-side applications. Can be any
369
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
370
+ # @param [Google::Apis::RequestOptions] options
371
+ # Request-specific options
372
+ #
373
+ # @yield [result, err] Result & error if block supplied
374
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation] parsed result object
375
+ # @yieldparam err [StandardError] error object if request failed
376
+ #
377
+ # @return [Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation]
378
+ #
379
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
380
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
381
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
382
+ def create_project_location_replay(parent, google_cloud_policysimulator_v1_replay_object = nil, fields: nil, quota_user: nil, options: nil, &block)
383
+ command = make_simple_command(:post, 'v1/{+parent}/replays', options)
384
+ command.request_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
385
+ command.request_object = google_cloud_policysimulator_v1_replay_object
386
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation::Representation
387
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleLongrunningOperation
388
+ command.params['parent'] = parent unless parent.nil?
389
+ command.query['fields'] = fields unless fields.nil?
390
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
391
+ execute_or_queue_command(command, &block)
392
+ end
393
+
394
+ # Gets the specified Replay. Each `Replay` is available for at least 7 days.
395
+ # @param [String] name
396
+ # Required. The name of the Replay to retrieve, in the following format: ``
397
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
398
+ # id``, where ``resource-id`` is the ID of the project, folder, or organization
399
+ # that owns the `Replay`. Example: `projects/my-example-project/locations/global/
400
+ # replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`
401
+ # @param [String] fields
402
+ # Selector specifying which fields to include in a partial response.
403
+ # @param [String] quota_user
404
+ # Available to use for quota purposes for server-side applications. Can be any
405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
406
+ # @param [Google::Apis::RequestOptions] options
407
+ # Request-specific options
408
+ #
409
+ # @yield [result, err] Result & error if block supplied
410
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay] parsed result object
411
+ # @yieldparam err [StandardError] error object if request failed
412
+ #
413
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay]
414
+ #
415
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
416
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
417
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
418
+ def get_project_location_replay(name, fields: nil, quota_user: nil, options: nil, &block)
419
+ command = make_simple_command(:get, 'v1/{+name}', options)
420
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay::Representation
421
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1Replay
422
+ command.params['name'] = name unless name.nil?
423
+ command.query['fields'] = fields unless fields.nil?
424
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
425
+ execute_or_queue_command(command, &block)
426
+ end
427
+
428
+ # Lists the results of running a Replay.
429
+ # @param [String] parent
430
+ # Required. The Replay whose results are listed, in the following format: ``
431
+ # projects|folders|organizations`/`resource-id`/locations/global/replays/`replay-
432
+ # id`` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-
433
+ # 8e03-479ce1833c36`
434
+ # @param [Fixnum] page_size
435
+ # The maximum number of ReplayResult objects to return. Defaults to 5000. The
436
+ # maximum value is 5000; values above 5000 are rounded down to 5000.
437
+ # @param [String] page_token
438
+ # A page token, received from a previous Simulator.ListReplayResults call.
439
+ # Provide this token to retrieve the next page of results. When paginating, all
440
+ # other parameters provided to [Simulator.ListReplayResults[] must match the
441
+ # call that provided the page token.
442
+ # @param [String] fields
443
+ # Selector specifying which fields to include in a partial response.
444
+ # @param [String] quota_user
445
+ # Available to use for quota purposes for server-side applications. Can be any
446
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
447
+ # @param [Google::Apis::RequestOptions] options
448
+ # Request-specific options
449
+ #
450
+ # @yield [result, err] Result & error if block supplied
451
+ # @yieldparam result [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse] parsed result object
452
+ # @yieldparam err [StandardError] error object if request failed
453
+ #
454
+ # @return [Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse]
455
+ #
456
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
457
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
458
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
459
+ def list_project_location_replay_results(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
460
+ command = make_simple_command(:get, 'v1/{+parent}/results', options)
461
+ command.response_representation = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse::Representation
462
+ command.response_class = Google::Apis::PolicysimulatorV1::GoogleCloudPolicysimulatorV1ListReplayResultsResponse
463
+ command.params['parent'] = parent unless parent.nil?
464
+ command.query['pageSize'] = page_size unless page_size.nil?
465
+ command.query['pageToken'] = page_token unless page_token.nil?
466
+ command.query['fields'] = fields unless fields.nil?
467
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
468
+ execute_or_queue_command(command, &block)
469
+ end
470
+
471
+ protected
472
+
473
+ def apply_command_defaults(command)
474
+ command.query['key'] = key unless key.nil?
475
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
476
+ end
477
+ end
478
+ end
479
+ end
480
+ end