google-cloud-access_approval-v1 0.4.2 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54b1b9a27a8376ef30c5d6f229c0d120d1efba16e6c90b618b5fe7ad4e353c18
4
- data.tar.gz: b02af0fddbdf43cb1281d085e90a0c65246e2c31e783fd7bc82d6f97d3a7d9b5
3
+ metadata.gz: 37f4b44fbdd48df2ba584f2d5c20c954fa9ac6099885cb43e93bec9492472032
4
+ data.tar.gz: e29907811985a29327b0ea4e6ec591cf142d15dc98dd53d26dec29b9e119ba24
5
5
  SHA512:
6
- metadata.gz: 4e0d0d7a556edfe4d3cd218205869a769c457b170221291de6999413eb738fda6cd740c366ad194ecc1be6d30e3c66198665a917e948b135ad0658843b17bc9d
7
- data.tar.gz: 84a50d02ea8631d88c449ffa4fa8539265935c5b7b44ce3b991fa953920486d94fdff97e3b3355bb5e8aa6fb9e507d5d29f3ec0745737e28bb9e52963dfb0683
6
+ metadata.gz: c22da0fa4848ae4f8316ec62545e351719d6ddcf0897b4263fcb9c872c969ae60bf60d3e9ddbb66dc43fcbefeec5463741682ce8809acb2503502fd92010dc8f
7
+ data.tar.gz: 561c6ea7129538c61b6794f645d2e7bcc7f05697612d0955c8b5d2fde91d78e38c07569abc71db3549fe94c5ae84e237e39d5530dba1fd1310962cd26f2d6ea0
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Access Approval V1 API
2
+ --title="Access Approval V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage.new #
37
37
  response = client.list_approval_requests request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-access_approval-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-access_approval-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/access-approval/)
@@ -32,17 +32,17 @@ module Google
32
32
  #
33
33
  # - The API has a collection of
34
34
  # {::Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
35
- # resources, named `approvalRequests/{approval_request_id}`
35
+ # resources, named `approvalRequests/{approval_request}`
36
36
  # - The API has top-level settings per Project/Folder/Organization, named
37
37
  # `accessApprovalSettings`
38
38
  #
39
39
  # The service also periodically emails a list of recipients, defined at the
40
40
  # Project/Folder/Organization level in the accessApprovalSettings, when there
41
41
  # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
42
- # also optionally be published to a Cloud Pub/Sub topic owned by the customer
43
- # (for Beta, the Pub/Sub setup is managed manually).
42
+ # also optionally be published to a Pub/Sub topic owned by the customer
43
+ # (contact support if you would like to enable Pub/Sub notifications).
44
44
  #
45
- # ApprovalRequests can be approved or dismissed. Google personel can only
45
+ # ApprovalRequests can be approved or dismissed. Google personnel can only
46
46
  # access the indicated resource or resources if the request is approved
47
47
  # (subject to some exclusions:
48
48
  # https://cloud.google.com/access-approval/docs/overview#exclusions).
@@ -62,6 +62,8 @@ module Google
62
62
  # If a request is not approved or dismissed, we call it pending.
63
63
  #
64
64
  class Client
65
+ include Paths
66
+
65
67
  # @private
66
68
  attr_reader :access_approval_stub
67
69
 
@@ -71,13 +73,12 @@ module Google
71
73
  # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
72
74
  # for a description of the configuration fields.
73
75
  #
74
- # ## Example
75
- #
76
- # To modify the configuration for all AccessApproval clients:
76
+ # @example
77
77
  #
78
- # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
79
- # config.timeout = 10.0
80
- # end
78
+ # # Modify the configuration for all AccessApproval clients
79
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
80
+ # config.timeout = 10.0
81
+ # end
81
82
  #
82
83
  # @yield [config] Configure the Client client.
83
84
  # @yieldparam config [Client::Configuration]
@@ -147,19 +148,15 @@ module Google
147
148
  ##
148
149
  # Create a new AccessApproval client object.
149
150
  #
150
- # ## Examples
151
- #
152
- # To create a new AccessApproval client with the default
153
- # configuration:
154
- #
155
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
151
+ # @example
156
152
  #
157
- # To create a new AccessApproval client with a custom
158
- # configuration:
153
+ # # Create a client using the default configuration
154
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
159
155
  #
160
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
161
- # config.timeout = 10.0
162
- # end
156
+ # # Create a client using a custom configuration
157
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
158
+ # config.timeout = 10.0
159
+ # end
163
160
  #
164
161
  # @yield [config] Configure the AccessApproval client.
165
162
  # @yieldparam config [Client::Configuration]
@@ -179,10 +176,9 @@ module Google
179
176
 
180
177
  # Create credentials
181
178
  credentials = @config.credentials
182
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
179
+ # Use self-signed JWT if the endpoint is unchanged from default,
183
180
  # but only if the default endpoint does not have a region prefix.
184
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
185
- @config.endpoint == Client.configure.endpoint &&
181
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
186
182
  !@config.endpoint.split(".").first.include?("-")
187
183
  credentials ||= Credentials.default scope: @config.scope,
188
184
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -224,17 +220,21 @@ module Google
224
220
  # the default parameter values, pass an empty Hash as a request object (see above).
225
221
  #
226
222
  # @param parent [::String]
227
- # The parent resource. This may be "projects/\\{project_id}",
228
- # "folders/\\{folder_id}", or "organizations/\\{organization_id}".
223
+ # The parent resource. This may be "projects/\\{project}",
224
+ # "folders/\\{folder}", or "organizations/\\{organization}".
229
225
  # @param filter [::String]
230
226
  # A filter on the type of approval requests to retrieve. Must be one of the
231
227
  # following values:
232
228
  #
233
- # - [not set]: Requests that are pending or have active approvals.
234
- # - ALL: All requests.
235
- # - PENDING: Only pending requests.
236
- # - ACTIVE: Only active (i.e. currently approved) requests.
237
- # - DISMISSED: Only dismissed (including expired) requests.
229
+ # * [not set]: Requests that are pending or have active approvals.
230
+ # * ALL: All requests.
231
+ # * PENDING: Only pending requests.
232
+ # * ACTIVE: Only active (i.e. currently approved) requests.
233
+ # * DISMISSED: Only requests that have been dismissed, or requests that
234
+ # are not approved and past expiration.
235
+ # * EXPIRED: Only requests that have been approved, and the approval has
236
+ # expired.
237
+ # * HISTORY: Active, dismissed and expired requests.
238
238
  # @param page_size [::Integer]
239
239
  # Requested page size.
240
240
  # @param page_token [::String]
@@ -248,6 +248,27 @@ module Google
248
248
  #
249
249
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
250
250
  #
251
+ # @example Basic example
252
+ # require "google/cloud/access_approval/v1"
253
+ #
254
+ # # Create a client object. The client can be reused for multiple calls.
255
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
256
+ #
257
+ # # Create a request. To set request fields, pass in keyword arguments.
258
+ # request = Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage.new
259
+ #
260
+ # # Call the list_approval_requests method.
261
+ # result = client.list_approval_requests request
262
+ #
263
+ # # The returned object is of type Gapic::PagedEnumerable. You can
264
+ # # iterate over all elements by calling #each, and the enumerable
265
+ # # will lazily make API calls to fetch subsequent pages. Other
266
+ # # methods are also available for managing paging directly.
267
+ # result.each do |response|
268
+ # # Each element is of type ::Google::Cloud::AccessApproval::V1::ApprovalRequest.
269
+ # p response
270
+ # end
271
+ #
251
272
  def list_approval_requests request, options = nil
252
273
  raise ::ArgumentError, "request must be provided" if request.nil?
253
274
 
@@ -265,16 +286,20 @@ module Google
265
286
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
266
287
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
267
288
 
268
- header_params = {
269
- "parent" => request.parent
270
- }
289
+ header_params = {}
290
+ if request.parent
291
+ header_params["parent"] = request.parent
292
+ end
293
+
271
294
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
272
295
  metadata[:"x-goog-request-params"] ||= request_params_header
273
296
 
274
297
  options.apply_defaults timeout: @config.rpcs.list_approval_requests.timeout,
275
298
  metadata: metadata,
276
299
  retry_policy: @config.rpcs.list_approval_requests.retry_policy
277
- options.apply_defaults metadata: @config.metadata,
300
+
301
+ options.apply_defaults timeout: @config.timeout,
302
+ metadata: @config.metadata,
278
303
  retry_policy: @config.retry_policy
279
304
 
280
305
  @access_approval_stub.call_rpc :list_approval_requests, request, options: options do |response, operation|
@@ -305,7 +330,9 @@ module Google
305
330
  # the default parameter values, pass an empty Hash as a request object (see above).
306
331
  #
307
332
  # @param name [::String]
308
- # Name of the approval request to retrieve.
333
+ # The name of the approval request to retrieve.
334
+ # Format:
335
+ # "\\{projects|folders|organizations}/\\{id}/approvalRequests/\\{approval_request}"
309
336
  #
310
337
  # @yield [response, operation] Access the result along with the RPC operation
311
338
  # @yieldparam response [::Google::Cloud::AccessApproval::V1::ApprovalRequest]
@@ -315,6 +342,21 @@ module Google
315
342
  #
316
343
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
317
344
  #
345
+ # @example Basic example
346
+ # require "google/cloud/access_approval/v1"
347
+ #
348
+ # # Create a client object. The client can be reused for multiple calls.
349
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
350
+ #
351
+ # # Create a request. To set request fields, pass in keyword arguments.
352
+ # request = Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage.new
353
+ #
354
+ # # Call the get_approval_request method.
355
+ # result = client.get_approval_request request
356
+ #
357
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
358
+ # p result
359
+ #
318
360
  def get_approval_request request, options = nil
319
361
  raise ::ArgumentError, "request must be provided" if request.nil?
320
362
 
@@ -332,16 +374,20 @@ module Google
332
374
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
333
375
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
376
 
335
- header_params = {
336
- "name" => request.name
337
- }
377
+ header_params = {}
378
+ if request.name
379
+ header_params["name"] = request.name
380
+ end
381
+
338
382
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
339
383
  metadata[:"x-goog-request-params"] ||= request_params_header
340
384
 
341
385
  options.apply_defaults timeout: @config.rpcs.get_approval_request.timeout,
342
386
  metadata: metadata,
343
387
  retry_policy: @config.rpcs.get_approval_request.retry_policy
344
- options.apply_defaults metadata: @config.metadata,
388
+
389
+ options.apply_defaults timeout: @config.timeout,
390
+ metadata: @config.metadata,
345
391
  retry_policy: @config.retry_policy
346
392
 
347
393
  @access_approval_stub.call_rpc :get_approval_request, request, options: options do |response, operation|
@@ -386,6 +432,21 @@ module Google
386
432
  #
387
433
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
388
434
  #
435
+ # @example Basic example
436
+ # require "google/cloud/access_approval/v1"
437
+ #
438
+ # # Create a client object. The client can be reused for multiple calls.
439
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
440
+ #
441
+ # # Create a request. To set request fields, pass in keyword arguments.
442
+ # request = Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage.new
443
+ #
444
+ # # Call the approve_approval_request method.
445
+ # result = client.approve_approval_request request
446
+ #
447
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
448
+ # p result
449
+ #
389
450
  def approve_approval_request request, options = nil
390
451
  raise ::ArgumentError, "request must be provided" if request.nil?
391
452
 
@@ -403,16 +464,20 @@ module Google
403
464
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
404
465
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
466
 
406
- header_params = {
407
- "name" => request.name
408
- }
467
+ header_params = {}
468
+ if request.name
469
+ header_params["name"] = request.name
470
+ end
471
+
409
472
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
410
473
  metadata[:"x-goog-request-params"] ||= request_params_header
411
474
 
412
475
  options.apply_defaults timeout: @config.rpcs.approve_approval_request.timeout,
413
476
  metadata: metadata,
414
477
  retry_policy: @config.rpcs.approve_approval_request.retry_policy
415
- options.apply_defaults metadata: @config.metadata,
478
+
479
+ options.apply_defaults timeout: @config.timeout,
480
+ metadata: @config.metadata,
416
481
  retry_policy: @config.retry_policy
417
482
 
418
483
  @access_approval_stub.call_rpc :approve_approval_request, request, options: options do |response, operation|
@@ -461,6 +526,21 @@ module Google
461
526
  #
462
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
463
528
  #
529
+ # @example Basic example
530
+ # require "google/cloud/access_approval/v1"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage.new
537
+ #
538
+ # # Call the dismiss_approval_request method.
539
+ # result = client.dismiss_approval_request request
540
+ #
541
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
542
+ # p result
543
+ #
464
544
  def dismiss_approval_request request, options = nil
465
545
  raise ::ArgumentError, "request must be provided" if request.nil?
466
546
 
@@ -478,16 +558,20 @@ module Google
478
558
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
479
559
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
560
 
481
- header_params = {
482
- "name" => request.name
483
- }
561
+ header_params = {}
562
+ if request.name
563
+ header_params["name"] = request.name
564
+ end
565
+
484
566
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
485
567
  metadata[:"x-goog-request-params"] ||= request_params_header
486
568
 
487
569
  options.apply_defaults timeout: @config.rpcs.dismiss_approval_request.timeout,
488
570
  metadata: metadata,
489
571
  retry_policy: @config.rpcs.dismiss_approval_request.retry_policy
490
- options.apply_defaults metadata: @config.metadata,
572
+
573
+ options.apply_defaults timeout: @config.timeout,
574
+ metadata: @config.metadata,
491
575
  retry_policy: @config.retry_policy
492
576
 
493
577
  @access_approval_stub.call_rpc :dismiss_approval_request, request, options: options do |response, operation|
@@ -517,7 +601,8 @@ module Google
517
601
  # the default parameter values, pass an empty Hash as a request object (see above).
518
602
  #
519
603
  # @param name [::String]
520
- # Name of the AccessApprovalSettings to retrieve.
604
+ # The name of the AccessApprovalSettings to retrieve.
605
+ # Format: "\\{projects|folders|organizations}/\\{id}/accessApprovalSettings"
521
606
  #
522
607
  # @yield [response, operation] Access the result along with the RPC operation
523
608
  # @yieldparam response [::Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
@@ -527,6 +612,21 @@ module Google
527
612
  #
528
613
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
529
614
  #
615
+ # @example Basic example
616
+ # require "google/cloud/access_approval/v1"
617
+ #
618
+ # # Create a client object. The client can be reused for multiple calls.
619
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
620
+ #
621
+ # # Create a request. To set request fields, pass in keyword arguments.
622
+ # request = Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage.new
623
+ #
624
+ # # Call the get_access_approval_settings method.
625
+ # result = client.get_access_approval_settings request
626
+ #
627
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::AccessApprovalSettings.
628
+ # p result
629
+ #
530
630
  def get_access_approval_settings request, options = nil
531
631
  raise ::ArgumentError, "request must be provided" if request.nil?
532
632
 
@@ -544,16 +644,20 @@ module Google
544
644
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
545
645
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
546
646
 
547
- header_params = {
548
- "name" => request.name
549
- }
647
+ header_params = {}
648
+ if request.name
649
+ header_params["name"] = request.name
650
+ end
651
+
550
652
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
551
653
  metadata[:"x-goog-request-params"] ||= request_params_header
552
654
 
553
655
  options.apply_defaults timeout: @config.rpcs.get_access_approval_settings.timeout,
554
656
  metadata: metadata,
555
657
  retry_policy: @config.rpcs.get_access_approval_settings.retry_policy
556
- options.apply_defaults metadata: @config.metadata,
658
+
659
+ options.apply_defaults timeout: @config.timeout,
660
+ metadata: @config.metadata,
557
661
  retry_policy: @config.retry_policy
558
662
 
559
663
  @access_approval_stub.call_rpc :get_access_approval_settings, request, options: options do |response, operation|
@@ -605,6 +709,21 @@ module Google
605
709
  #
606
710
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
607
711
  #
712
+ # @example Basic example
713
+ # require "google/cloud/access_approval/v1"
714
+ #
715
+ # # Create a client object. The client can be reused for multiple calls.
716
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
717
+ #
718
+ # # Create a request. To set request fields, pass in keyword arguments.
719
+ # request = Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage.new
720
+ #
721
+ # # Call the update_access_approval_settings method.
722
+ # result = client.update_access_approval_settings request
723
+ #
724
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::AccessApprovalSettings.
725
+ # p result
726
+ #
608
727
  def update_access_approval_settings request, options = nil
609
728
  raise ::ArgumentError, "request must be provided" if request.nil?
610
729
 
@@ -622,16 +741,20 @@ module Google
622
741
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
623
742
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
743
 
625
- header_params = {
626
- "settings.name" => request.settings.name
627
- }
744
+ header_params = {}
745
+ if request.settings&.name
746
+ header_params["settings.name"] = request.settings.name
747
+ end
748
+
628
749
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
629
750
  metadata[:"x-goog-request-params"] ||= request_params_header
630
751
 
631
752
  options.apply_defaults timeout: @config.rpcs.update_access_approval_settings.timeout,
632
753
  metadata: metadata,
633
754
  retry_policy: @config.rpcs.update_access_approval_settings.retry_policy
634
- options.apply_defaults metadata: @config.metadata,
755
+
756
+ options.apply_defaults timeout: @config.timeout,
757
+ metadata: @config.metadata,
635
758
  retry_policy: @config.retry_policy
636
759
 
637
760
  @access_approval_stub.call_rpc :update_access_approval_settings, request, options: options do |response, operation|
@@ -676,6 +799,21 @@ module Google
676
799
  #
677
800
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
678
801
  #
802
+ # @example Basic example
803
+ # require "google/cloud/access_approval/v1"
804
+ #
805
+ # # Create a client object. The client can be reused for multiple calls.
806
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
807
+ #
808
+ # # Create a request. To set request fields, pass in keyword arguments.
809
+ # request = Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage.new
810
+ #
811
+ # # Call the delete_access_approval_settings method.
812
+ # result = client.delete_access_approval_settings request
813
+ #
814
+ # # The returned object is of type Google::Protobuf::Empty.
815
+ # p result
816
+ #
679
817
  def delete_access_approval_settings request, options = nil
680
818
  raise ::ArgumentError, "request must be provided" if request.nil?
681
819
 
@@ -693,16 +831,20 @@ module Google
693
831
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
694
832
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
695
833
 
696
- header_params = {
697
- "name" => request.name
698
- }
834
+ header_params = {}
835
+ if request.name
836
+ header_params["name"] = request.name
837
+ end
838
+
699
839
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
700
840
  metadata[:"x-goog-request-params"] ||= request_params_header
701
841
 
702
842
  options.apply_defaults timeout: @config.rpcs.delete_access_approval_settings.timeout,
703
843
  metadata: metadata,
704
844
  retry_policy: @config.rpcs.delete_access_approval_settings.retry_policy
705
- options.apply_defaults metadata: @config.metadata,
845
+
846
+ options.apply_defaults timeout: @config.timeout,
847
+ metadata: @config.metadata,
706
848
  retry_policy: @config.retry_policy
707
849
 
708
850
  @access_approval_stub.call_rpc :delete_access_approval_settings, request, options: options do |response, operation|
@@ -726,22 +868,21 @@ module Google
726
868
  # Configuration can be applied globally to all clients, or to a single client
727
869
  # on construction.
728
870
  #
729
- # # Examples
730
- #
731
- # To modify the global config, setting the timeout for list_approval_requests
732
- # to 20 seconds, and all remaining timeouts to 10 seconds:
733
- #
734
- # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
735
- # config.timeout = 10.0
736
- # config.rpcs.list_approval_requests.timeout = 20.0
737
- # end
738
- #
739
- # To apply the above configuration only to a new client:
740
- #
741
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
742
- # config.timeout = 10.0
743
- # config.rpcs.list_approval_requests.timeout = 20.0
744
- # end
871
+ # @example
872
+ #
873
+ # # Modify the global config, setting the timeout for
874
+ # # list_approval_requests to 20 seconds,
875
+ # # and all remaining timeouts to 10 seconds.
876
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
877
+ # config.timeout = 10.0
878
+ # config.rpcs.list_approval_requests.timeout = 20.0
879
+ # end
880
+ #
881
+ # # Apply the above configuration only to a new client.
882
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
883
+ # config.timeout = 10.0
884
+ # config.rpcs.list_approval_requests.timeout = 20.0
885
+ # end
745
886
  #
746
887
  # @!attribute [rw] endpoint
747
888
  # The hostname or hostname:port of the service endpoint.
@@ -0,0 +1,170 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 AccessApproval
23
+ module V1
24
+ module AccessApproval
25
+ # Path helper methods for the AccessApproval API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified AccessApprovalSettings resource string.
29
+ #
30
+ # @overload access_approval_settings_path(project:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/accessApprovalSettings`
34
+ #
35
+ # @param project [String]
36
+ #
37
+ # @overload access_approval_settings_path(folder:)
38
+ # The resource will be in the following format:
39
+ #
40
+ # `folders/{folder}/accessApprovalSettings`
41
+ #
42
+ # @param folder [String]
43
+ #
44
+ # @overload access_approval_settings_path(organization:)
45
+ # The resource will be in the following format:
46
+ #
47
+ # `organizations/{organization}/accessApprovalSettings`
48
+ #
49
+ # @param organization [String]
50
+ #
51
+ # @return [::String]
52
+ def access_approval_settings_path **args
53
+ resources = {
54
+ "project" => (proc do |project:|
55
+ "projects/#{project}/accessApprovalSettings"
56
+ end),
57
+ "folder" => (proc do |folder:|
58
+ "folders/#{folder}/accessApprovalSettings"
59
+ end),
60
+ "organization" => (proc do |organization:|
61
+ "organizations/#{organization}/accessApprovalSettings"
62
+ end)
63
+ }
64
+
65
+ resource = resources[args.keys.sort.join(":")]
66
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
67
+ resource.call(**args)
68
+ end
69
+
70
+ ##
71
+ # Create a fully-qualified ApprovalRequest resource string.
72
+ #
73
+ # @overload approval_request_path(project:, approval_request:)
74
+ # The resource will be in the following format:
75
+ #
76
+ # `projects/{project}/approvalRequests/{approval_request}`
77
+ #
78
+ # @param project [String]
79
+ # @param approval_request [String]
80
+ #
81
+ # @overload approval_request_path(folder:, approval_request:)
82
+ # The resource will be in the following format:
83
+ #
84
+ # `folders/{folder}/approvalRequests/{approval_request}`
85
+ #
86
+ # @param folder [String]
87
+ # @param approval_request [String]
88
+ #
89
+ # @overload approval_request_path(organization:, approval_request:)
90
+ # The resource will be in the following format:
91
+ #
92
+ # `organizations/{organization}/approvalRequests/{approval_request}`
93
+ #
94
+ # @param organization [String]
95
+ # @param approval_request [String]
96
+ #
97
+ # @return [::String]
98
+ def approval_request_path **args
99
+ resources = {
100
+ "approval_request:project" => (proc do |project:, approval_request:|
101
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
102
+
103
+ "projects/#{project}/approvalRequests/#{approval_request}"
104
+ end),
105
+ "approval_request:folder" => (proc do |folder:, approval_request:|
106
+ raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
107
+
108
+ "folders/#{folder}/approvalRequests/#{approval_request}"
109
+ end),
110
+ "approval_request:organization" => (proc do |organization:, approval_request:|
111
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
112
+
113
+ "organizations/#{organization}/approvalRequests/#{approval_request}"
114
+ end)
115
+ }
116
+
117
+ resource = resources[args.keys.sort.join(":")]
118
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
119
+ resource.call(**args)
120
+ end
121
+
122
+ ##
123
+ # Create a fully-qualified Folder resource string.
124
+ #
125
+ # The resource will be in the following format:
126
+ #
127
+ # `folders/{folder}`
128
+ #
129
+ # @param folder [String]
130
+ #
131
+ # @return [::String]
132
+ def folder_path folder:
133
+ "folders/#{folder}"
134
+ end
135
+
136
+ ##
137
+ # Create a fully-qualified Organization resource string.
138
+ #
139
+ # The resource will be in the following format:
140
+ #
141
+ # `organizations/{organization}`
142
+ #
143
+ # @param organization [String]
144
+ #
145
+ # @return [::String]
146
+ def organization_path organization:
147
+ "organizations/#{organization}"
148
+ end
149
+
150
+ ##
151
+ # Create a fully-qualified Project resource string.
152
+ #
153
+ # The resource will be in the following format:
154
+ #
155
+ # `projects/{project}`
156
+ #
157
+ # @param project [String]
158
+ #
159
+ # @return [::String]
160
+ def project_path project:
161
+ "projects/#{project}"
162
+ end
163
+
164
+ extend self
165
+ end
166
+ end
167
+ end
168
+ end
169
+ end
170
+ end
@@ -23,6 +23,7 @@ require "gapic/config/method"
23
23
  require "google/cloud/access_approval/v1/version"
24
24
 
25
25
  require "google/cloud/access_approval/v1/access_approval/credentials"
26
+ require "google/cloud/access_approval/v1/access_approval/paths"
26
27
  require "google/cloud/access_approval/v1/access_approval/client"
27
28
 
28
29
  module Google
@@ -35,17 +36,17 @@ module Google
35
36
  #
36
37
  # - The API has a collection of
37
38
  # {::Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
38
- # resources, named `approvalRequests/{approval_request_id}`
39
+ # resources, named `approvalRequests/{approval_request}`
39
40
  # - The API has top-level settings per Project/Folder/Organization, named
40
41
  # `accessApprovalSettings`
41
42
  #
42
43
  # The service also periodically emails a list of recipients, defined at the
43
44
  # Project/Folder/Organization level in the accessApprovalSettings, when there
44
45
  # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
45
- # also optionally be published to a Cloud Pub/Sub topic owned by the customer
46
- # (for Beta, the Pub/Sub setup is managed manually).
46
+ # also optionally be published to a Pub/Sub topic owned by the customer
47
+ # (contact support if you would like to enable Pub/Sub notifications).
47
48
  #
48
- # ApprovalRequests can be approved or dismissed. Google personel can only
49
+ # ApprovalRequests can be approved or dismissed. Google personnel can only
49
50
  # access the indicated resource or resources if the request is approved
50
51
  # (subject to some exclusions:
51
52
  # https://cloud.google.com/access-approval/docs/overview#exclusions).
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AccessApproval
23
23
  module V1
24
- VERSION = "0.4.2"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,14 +1,15 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/accessapproval/v1/accessapproval.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
9
8
  require 'google/protobuf/empty_pb'
10
9
  require 'google/protobuf/field_mask_pb'
11
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
12
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  add_file("google/cloud/accessapproval/v1/accessapproval.proto", :syntax => :proto3) do
14
15
  add_message "google.cloud.accessapproval.v1.AccessLocations" do
@@ -31,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
32
  end
32
33
  add_message "google.cloud.accessapproval.v1.DismissDecision" do
33
34
  optional :dismiss_time, :message, 1, "google.protobuf.Timestamp"
35
+ optional :implicit, :bool, 2
34
36
  end
35
37
  add_message "google.cloud.accessapproval.v1.ResourceProperties" do
36
38
  optional :excludes_descendants, :bool, 1
@@ -29,17 +29,17 @@ module Google
29
29
  #
30
30
  # - The API has a collection of
31
31
  # [ApprovalRequest][google.cloud.accessapproval.v1.ApprovalRequest]
32
- # resources, named `approvalRequests/{approval_request_id}`
32
+ # resources, named `approvalRequests/{approval_request}`
33
33
  # - The API has top-level settings per Project/Folder/Organization, named
34
34
  # `accessApprovalSettings`
35
35
  #
36
36
  # The service also periodically emails a list of recipients, defined at the
37
37
  # Project/Folder/Organization level in the accessApprovalSettings, when there
38
38
  # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
39
- # also optionally be published to a Cloud Pub/Sub topic owned by the customer
40
- # (for Beta, the Pub/Sub setup is managed manually).
39
+ # also optionally be published to a Pub/Sub topic owned by the customer
40
+ # (contact support if you would like to enable Pub/Sub notifications).
41
41
  #
42
- # ApprovalRequests can be approved or dismissed. Google personel can only
42
+ # ApprovalRequests can be approved or dismissed. Google personnel can only
43
43
  # access the indicated resource or resources if the request is approved
44
44
  # (subject to some exclusions:
45
45
  # https://cloud.google.com/access-approval/docs/overview#exclusions).
@@ -59,7 +59,7 @@ module Google
59
59
  # If a request is not approved or dismissed, we call it pending.
60
60
  class Service
61
61
 
62
- include GRPC::GenericService
62
+ include ::GRPC::GenericService
63
63
 
64
64
  self.marshal_class_method = :encode
65
65
  self.unmarshal_class_method = :decode
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -30,14 +30,14 @@ module Google
30
30
  # of a country code.
31
31
  # Possible Region Codes:
32
32
  #
33
- # - ASI: Asia
34
- # - EUR: Europe
35
- # - OCE: Oceania
36
- # - AFR: Africa
37
- # - NAM: North America
38
- # - SAM: South America
39
- # - ANT: Antarctica
40
- # - ANY: Any location
33
+ # * ASI: Asia
34
+ # * EUR: Europe
35
+ # * OCE: Oceania
36
+ # * AFR: Africa
37
+ # * NAM: North America
38
+ # * SAM: South America
39
+ # * ANT: Antarctica
40
+ # * ANY: Any location
41
41
  # @!attribute [rw] principal_physical_location_country
42
42
  # @return [::String]
43
43
  # Physical location of the principal at the time of the access. A
@@ -46,14 +46,14 @@ module Google
46
46
  # a region code instead of a country code.
47
47
  # Possible Region Codes:
48
48
  #
49
- # - ASI: Asia
50
- # - EUR: Europe
51
- # - OCE: Oceania
52
- # - AFR: Africa
53
- # - NAM: North America
54
- # - SAM: South America
55
- # - ANT: Antarctica
56
- # - ANY: Any location
49
+ # * ASI: Asia
50
+ # * EUR: Europe
51
+ # * OCE: Oceania
52
+ # * AFR: Africa
53
+ # * NAM: North America
54
+ # * SAM: South America
55
+ # * ANT: Antarctica
56
+ # * ANY: Any location
57
57
  class AccessLocations
58
58
  include ::Google::Protobuf::MessageExts
59
59
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -77,12 +77,12 @@ module Google
77
77
  # Customer made a request or raised an issue that required the principal to
78
78
  # access customer data. `detail` is of the form ("#####" is the issue ID):
79
79
  #
80
- # - "Feedback Report: #####"
81
- # - "Case Number: #####"
82
- # - "Case ID: #####"
83
- # - "E-PIN Reference: #####"
84
- # - "Google-#####"
85
- # - "T-#####"
80
+ # * "Feedback Report: #####"
81
+ # * "Case Number: #####"
82
+ # * "Case ID: #####"
83
+ # * "E-PIN Reference: #####"
84
+ # * "Google-#####"
85
+ # * "T-#####"
86
86
  CUSTOMER_INITIATED_SUPPORT = 1
87
87
 
88
88
  # The principal accessed customer data in order to diagnose or resolve a
@@ -113,6 +113,11 @@ module Google
113
113
  # @!attribute [rw] dismiss_time
114
114
  # @return [::Google::Protobuf::Timestamp]
115
115
  # The time at which the approval request was dismissed.
116
+ # @!attribute [rw] implicit
117
+ # @return [::Boolean]
118
+ # This field will be true if the ApprovalRequest was implcitly dismissed
119
+ # due to inaction by the access approval approvers (the request is not acted
120
+ # on by the approvers before the exiration time).
116
121
  class DismissDecision
117
122
  include ::Google::Protobuf::MessageExts
118
123
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -132,7 +137,7 @@ module Google
132
137
  # @!attribute [rw] name
133
138
  # @return [::String]
134
139
  # The resource name of the request. Format is
135
- # "\\{projects|folders|organizations}/\\{id}/approvalRequests/\\{approval_request_id}".
140
+ # "\\{projects|folders|organizations}/\\{id}/approvalRequests/\\{approval_request}".
136
141
  # @!attribute [rw] requested_resource_name
137
142
  # @return [::String]
138
143
  # The resource for which approval is being requested. The format of the
@@ -175,16 +180,61 @@ module Google
175
180
  # The product for which Access Approval will be enrolled. Allowed values are
176
181
  # listed below (case-sensitive):
177
182
  #
178
- # - all
179
- # - appengine.googleapis.com
180
- # - bigquery.googleapis.com
181
- # - bigtable.googleapis.com
182
- # - cloudkms.googleapis.com
183
- # - compute.googleapis.com
184
- # - dataflow.googleapis.com
185
- # - iam.googleapis.com
186
- # - pubsub.googleapis.com
187
- # - storage.googleapis.com
183
+ # * all
184
+ # * GA
185
+ # * App Engine
186
+ # * BigQuery
187
+ # * Cloud Bigtable
188
+ # * Cloud Key Management Service
189
+ # * Compute Engine
190
+ # * Cloud Dataflow
191
+ # * Cloud DLP
192
+ # * Cloud EKM
193
+ # * Cloud HSM
194
+ # * Cloud Identity and Access Management
195
+ # * Cloud Logging
196
+ # * Cloud Pub/Sub
197
+ # * Cloud Spanner
198
+ # * Cloud SQL
199
+ # * Cloud Storage
200
+ # * Google Kubernetes Engine
201
+ # * Organization Policy Serivice
202
+ # * Persistent Disk
203
+ # * Resource Manager
204
+ # * Speaker ID
205
+ #
206
+ # Note: These values are supported as input for legacy purposes, but will not
207
+ # be returned from the API.
208
+ #
209
+ # * all
210
+ # * ga-only
211
+ # * appengine.googleapis.com
212
+ # * bigquery.googleapis.com
213
+ # * bigtable.googleapis.com
214
+ # * container.googleapis.com
215
+ # * cloudkms.googleapis.com
216
+ # * cloudresourcemanager.googleapis.com
217
+ # * cloudsql.googleapis.com
218
+ # * compute.googleapis.com
219
+ # * dataflow.googleapis.com
220
+ # * dlp.googleapis.com
221
+ # * iam.googleapis.com
222
+ # * logging.googleapis.com
223
+ # * orgpolicy.googleapis.com
224
+ # * pubsub.googleapis.com
225
+ # * spanner.googleapis.com
226
+ # * speakerid.googleapis.com
227
+ # * storage.googleapis.com
228
+ #
229
+ # Calls to UpdateAccessApprovalSettings using 'all' or any of the
230
+ # XXX.googleapis.com will be translated to the associated product name
231
+ # ('all', 'App Engine', etc.).
232
+ #
233
+ # Note: 'all' will enroll the resource in all products supported at both 'GA'
234
+ # and 'Preview' levels.
235
+ #
236
+ # More information about levels of support is available at
237
+ # https://cloud.google.com/access-approval/docs/supported-services
188
238
  # @!attribute [rw] enrollment_level
189
239
  # @return [::Google::Cloud::AccessApproval::V1::EnrollmentLevel]
190
240
  # The enrollment level of the service.
@@ -198,9 +248,9 @@ module Google
198
248
  # @return [::String]
199
249
  # The resource name of the settings. Format is one of:
200
250
  #
201
- # - "projects/\\{project_id}/accessApprovalSettings"
202
- # - "folders/\\{folder_id}/accessApprovalSettings"
203
- # - "organizations/\\{organization_id}/accessApprovalSettings"
251
+ # * "projects/\\{project}/accessApprovalSettings"
252
+ # * "folders/\\{folder}/accessApprovalSettings"
253
+ # * "organizations/\\{organization}/accessApprovalSettings"
204
254
  # @!attribute [rw] notification_emails
205
255
  # @return [::Array<::String>]
206
256
  # A list of email addresses to which notifications relating to approval
@@ -223,7 +273,7 @@ module Google
223
273
  # @!attribute [r] enrolled_ancestor
224
274
  # @return [::Boolean]
225
275
  # Output only. This field is read only (not settable via
226
- # UpdateAccessAccessApprovalSettings method). If the field is true, that
276
+ # UpdateAccessApprovalSettings method). If the field is true, that
227
277
  # indicates that at least one service is enrolled for Access Approval in one
228
278
  # or more ancestors of the Project or Folder (this field will always be
229
279
  # unset for the organization since organizations do not have ancestors).
@@ -235,18 +285,22 @@ module Google
235
285
  # Request to list approval requests.
236
286
  # @!attribute [rw] parent
237
287
  # @return [::String]
238
- # The parent resource. This may be "projects/\\{project_id}",
239
- # "folders/\\{folder_id}", or "organizations/\\{organization_id}".
288
+ # The parent resource. This may be "projects/\\{project}",
289
+ # "folders/\\{folder}", or "organizations/\\{organization}".
240
290
  # @!attribute [rw] filter
241
291
  # @return [::String]
242
292
  # A filter on the type of approval requests to retrieve. Must be one of the
243
293
  # following values:
244
294
  #
245
- # - [not set]: Requests that are pending or have active approvals.
246
- # - ALL: All requests.
247
- # - PENDING: Only pending requests.
248
- # - ACTIVE: Only active (i.e. currently approved) requests.
249
- # - DISMISSED: Only dismissed (including expired) requests.
295
+ # * [not set]: Requests that are pending or have active approvals.
296
+ # * ALL: All requests.
297
+ # * PENDING: Only pending requests.
298
+ # * ACTIVE: Only active (i.e. currently approved) requests.
299
+ # * DISMISSED: Only requests that have been dismissed, or requests that
300
+ # are not approved and past expiration.
301
+ # * EXPIRED: Only requests that have been approved, and the approval has
302
+ # expired.
303
+ # * HISTORY: Active, dismissed and expired requests.
250
304
  # @!attribute [rw] page_size
251
305
  # @return [::Integer]
252
306
  # Requested page size.
@@ -273,7 +327,9 @@ module Google
273
327
  # Request to get an approval request.
274
328
  # @!attribute [rw] name
275
329
  # @return [::String]
276
- # Name of the approval request to retrieve.
330
+ # The name of the approval request to retrieve.
331
+ # Format:
332
+ # "\\{projects|folders|organizations}/\\{id}/approvalRequests/\\{approval_request}"
277
333
  class GetApprovalRequestMessage
278
334
  include ::Google::Protobuf::MessageExts
279
335
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -303,7 +359,8 @@ module Google
303
359
  # Request to get access approval settings.
304
360
  # @!attribute [rw] name
305
361
  # @return [::String]
306
- # Name of the AccessApprovalSettings to retrieve.
362
+ # The name of the AccessApprovalSettings to retrieve.
363
+ # Format: "\\{projects|folders|organizations}/\\{id}/accessApprovalSettings"
307
364
  class GetAccessApprovalSettingsMessage
308
365
  include ::Google::Protobuf::MessageExts
309
366
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-access_approval-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -174,6 +174,7 @@ files:
174
174
  - lib/google/cloud/access_approval/v1/access_approval.rb
175
175
  - lib/google/cloud/access_approval/v1/access_approval/client.rb
176
176
  - lib/google/cloud/access_approval/v1/access_approval/credentials.rb
177
+ - lib/google/cloud/access_approval/v1/access_approval/paths.rb
177
178
  - lib/google/cloud/access_approval/v1/version.rb
178
179
  - lib/google/cloud/accessapproval/v1/accessapproval_pb.rb
179
180
  - lib/google/cloud/accessapproval/v1/accessapproval_services_pb.rb
@@ -203,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
204
  - !ruby/object:Gem::Version
204
205
  version: '0'
205
206
  requirements: []
206
- rubygems_version: 3.2.17
207
+ rubygems_version: 3.3.5
207
208
  signing_key:
208
209
  specification_version: 4
209
210
  summary: API Client library for the Access Approval V1 API