google-cloud-access_approval-v1 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc30ffd49ea2fe007728375cc045003f11ec7afe9b0219291405fad8fcc32b7e
4
- data.tar.gz: f51e09a840c2f5c8a6182d7b4e07130ae83f852499b00c0226f5b209746344bd
3
+ metadata.gz: 7a962123aff5296be4f054c61335936ff0e8b7b0929c57ba5a50d0657785aa5a
4
+ data.tar.gz: 0b7b45a09fbd4f06d6554344ecf1641344ca686a06d2ef84f62ba7626133a9a9
5
5
  SHA512:
6
- metadata.gz: 7e0e41521a0698e5d7e3324f11b001ba063af295b81d2becf5c225a564238db2f8500203d3f34a4566bcbe797644e91f78f30bf9ec61fa992f10f85957c0616b
7
- data.tar.gz: 681fc624c220a00017e2f6632f67106a85ac18bbce32e9c87dffa5eb706c68b14a13e092ce26af4decf1b57c8a0b34c5ff020b4cd3016d4a3f8b789bfc5b2eb1
6
+ metadata.gz: 863a751bf59753032fa4dceedaa38611bed925ea4f51b84b4fff7b097564b05b5c23e3602a9d9c908d0f5274e8a699314a1aa4afdd8931ccd403642ccc5eda66
7
+ data.tar.gz: 91869d676c37297e41f5660fcae15c494a03a3dd66d430c628822531287b565e43a4dc25be13902e1e08672cab892886cb6cfd5826dd64ba57afbdc73c6b9021
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
@@ -66,11 +66,11 @@ The environment variables that google-cloud-access_approval-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::AccessApproval::V1::AccessApproval::Credentials}):
68
68
 
69
- 1. `ACCESS_APPROVAL_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `ACCESS_APPROVAL_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `ACCESS_APPROVAL_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `ACCESS_APPROVAL_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/access_approval/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/access_approval/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |con
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/access_approval/v1"
@@ -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
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/access_approval/v1"
34
34
 
35
35
  client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage.new # (request fields as keyword arguments...)
37
37
  response = client.list_approval_requests request
38
38
  ```
39
39
 
@@ -71,13 +71,12 @@ module Google
71
71
  # See {::Google::Cloud::AccessApproval::V1::AccessApproval::Client::Configuration}
72
72
  # for a description of the configuration fields.
73
73
  #
74
- # ## Example
74
+ # @example
75
75
  #
76
- # To modify the configuration for all AccessApproval clients:
77
- #
78
- # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
79
- # config.timeout = 10.0
80
- # end
76
+ # # Modify the configuration for all AccessApproval clients
77
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
78
+ # config.timeout = 10.0
79
+ # end
81
80
  #
82
81
  # @yield [config] Configure the Client client.
83
82
  # @yieldparam config [Client::Configuration]
@@ -97,18 +96,12 @@ module Google
97
96
 
98
97
  default_config.rpcs.list_approval_requests.timeout = 600.0
99
98
  default_config.rpcs.list_approval_requests.retry_policy = {
100
- initial_delay: 0.1,
101
- max_delay: 60.0,
102
- multiplier: 1.3,
103
- retry_codes: [14]
99
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
104
100
  }
105
101
 
106
102
  default_config.rpcs.get_approval_request.timeout = 600.0
107
103
  default_config.rpcs.get_approval_request.retry_policy = {
108
- initial_delay: 0.1,
109
- max_delay: 60.0,
110
- multiplier: 1.3,
111
- retry_codes: [14]
104
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
112
105
  }
113
106
 
114
107
  default_config.rpcs.approve_approval_request.timeout = 600.0
@@ -117,10 +110,7 @@ module Google
117
110
 
118
111
  default_config.rpcs.get_access_approval_settings.timeout = 600.0
119
112
  default_config.rpcs.get_access_approval_settings.retry_policy = {
120
- initial_delay: 0.1,
121
- max_delay: 60.0,
122
- multiplier: 1.3,
123
- retry_codes: [14]
113
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
124
114
  }
125
115
 
126
116
  default_config.rpcs.update_access_approval_settings.timeout = 600.0
@@ -156,19 +146,15 @@ module Google
156
146
  ##
157
147
  # Create a new AccessApproval client object.
158
148
  #
159
- # ## Examples
160
- #
161
- # To create a new AccessApproval client with the default
162
- # configuration:
149
+ # @example
163
150
  #
164
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
151
+ # # Create a client using the default configuration
152
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
165
153
  #
166
- # To create a new AccessApproval client with a custom
167
- # configuration:
168
- #
169
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
170
- # config.timeout = 10.0
171
- # end
154
+ # # Create a client using a custom configuration
155
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
156
+ # config.timeout = 10.0
157
+ # end
172
158
  #
173
159
  # @yield [config] Configure the AccessApproval client.
174
160
  # @yieldparam config [Client::Configuration]
@@ -188,14 +174,13 @@ module Google
188
174
 
189
175
  # Create credentials
190
176
  credentials = @config.credentials
191
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
177
+ # Use self-signed JWT if the endpoint is unchanged from default,
192
178
  # but only if the default endpoint does not have a region prefix.
193
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
194
- @config.endpoint == Client.configure.endpoint &&
179
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
195
180
  !@config.endpoint.split(".").first.include?("-")
196
181
  credentials ||= Credentials.default scope: @config.scope,
197
182
  enable_self_signed_jwt: enable_self_signed_jwt
198
- if credentials.is_a?(String) || credentials.is_a?(Hash)
183
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
199
184
  credentials = Credentials.new credentials, scope: @config.scope
200
185
  end
201
186
  @quota_project_id = @config.quota_project
@@ -257,6 +242,27 @@ module Google
257
242
  #
258
243
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
244
  #
245
+ # @example Basic example
246
+ # require "google/cloud/access_approval/v1"
247
+ #
248
+ # # Create a client object. The client can be reused for multiple calls.
249
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
250
+ #
251
+ # # Create a request. To set request fields, pass in keyword arguments.
252
+ # request = Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage.new
253
+ #
254
+ # # Call the list_approval_requests method.
255
+ # result = client.list_approval_requests request
256
+ #
257
+ # # The returned object is of type Gapic::PagedEnumerable. You can
258
+ # # iterate over all elements by calling #each, and the enumerable
259
+ # # will lazily make API calls to fetch subsequent pages. Other
260
+ # # methods are also available for managing paging directly.
261
+ # result.each do |response|
262
+ # # Each element is of type ::Google::Cloud::AccessApproval::V1::ApprovalRequest.
263
+ # p response
264
+ # end
265
+ #
260
266
  def list_approval_requests request, options = nil
261
267
  raise ::ArgumentError, "request must be provided" if request.nil?
262
268
 
@@ -274,16 +280,20 @@ module Google
274
280
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
275
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
282
 
277
- header_params = {
278
- "parent" => request.parent
279
- }
283
+ header_params = {}
284
+ if request.parent
285
+ header_params["parent"] = request.parent
286
+ end
287
+
280
288
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
289
  metadata[:"x-goog-request-params"] ||= request_params_header
282
290
 
283
291
  options.apply_defaults timeout: @config.rpcs.list_approval_requests.timeout,
284
292
  metadata: metadata,
285
293
  retry_policy: @config.rpcs.list_approval_requests.retry_policy
286
- options.apply_defaults metadata: @config.metadata,
294
+
295
+ options.apply_defaults timeout: @config.timeout,
296
+ metadata: @config.metadata,
287
297
  retry_policy: @config.retry_policy
288
298
 
289
299
  @access_approval_stub.call_rpc :list_approval_requests, request, options: options do |response, operation|
@@ -324,6 +334,21 @@ module Google
324
334
  #
325
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
326
336
  #
337
+ # @example Basic example
338
+ # require "google/cloud/access_approval/v1"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage.new
345
+ #
346
+ # # Call the get_approval_request method.
347
+ # result = client.get_approval_request request
348
+ #
349
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
350
+ # p result
351
+ #
327
352
  def get_approval_request request, options = nil
328
353
  raise ::ArgumentError, "request must be provided" if request.nil?
329
354
 
@@ -341,16 +366,20 @@ module Google
341
366
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
342
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
343
368
 
344
- header_params = {
345
- "name" => request.name
346
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
347
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
348
375
  metadata[:"x-goog-request-params"] ||= request_params_header
349
376
 
350
377
  options.apply_defaults timeout: @config.rpcs.get_approval_request.timeout,
351
378
  metadata: metadata,
352
379
  retry_policy: @config.rpcs.get_approval_request.retry_policy
353
- options.apply_defaults metadata: @config.metadata,
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
354
383
  retry_policy: @config.retry_policy
355
384
 
356
385
  @access_approval_stub.call_rpc :get_approval_request, request, options: options do |response, operation|
@@ -395,6 +424,21 @@ module Google
395
424
  #
396
425
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
397
426
  #
427
+ # @example Basic example
428
+ # require "google/cloud/access_approval/v1"
429
+ #
430
+ # # Create a client object. The client can be reused for multiple calls.
431
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
432
+ #
433
+ # # Create a request. To set request fields, pass in keyword arguments.
434
+ # request = Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage.new
435
+ #
436
+ # # Call the approve_approval_request method.
437
+ # result = client.approve_approval_request request
438
+ #
439
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
440
+ # p result
441
+ #
398
442
  def approve_approval_request request, options = nil
399
443
  raise ::ArgumentError, "request must be provided" if request.nil?
400
444
 
@@ -412,16 +456,20 @@ module Google
412
456
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
413
457
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
414
458
 
415
- header_params = {
416
- "name" => request.name
417
- }
459
+ header_params = {}
460
+ if request.name
461
+ header_params["name"] = request.name
462
+ end
463
+
418
464
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
419
465
  metadata[:"x-goog-request-params"] ||= request_params_header
420
466
 
421
467
  options.apply_defaults timeout: @config.rpcs.approve_approval_request.timeout,
422
468
  metadata: metadata,
423
469
  retry_policy: @config.rpcs.approve_approval_request.retry_policy
424
- options.apply_defaults metadata: @config.metadata,
470
+
471
+ options.apply_defaults timeout: @config.timeout,
472
+ metadata: @config.metadata,
425
473
  retry_policy: @config.retry_policy
426
474
 
427
475
  @access_approval_stub.call_rpc :approve_approval_request, request, options: options do |response, operation|
@@ -470,6 +518,21 @@ module Google
470
518
  #
471
519
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
472
520
  #
521
+ # @example Basic example
522
+ # require "google/cloud/access_approval/v1"
523
+ #
524
+ # # Create a client object. The client can be reused for multiple calls.
525
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
526
+ #
527
+ # # Create a request. To set request fields, pass in keyword arguments.
528
+ # request = Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage.new
529
+ #
530
+ # # Call the dismiss_approval_request method.
531
+ # result = client.dismiss_approval_request request
532
+ #
533
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::ApprovalRequest.
534
+ # p result
535
+ #
473
536
  def dismiss_approval_request request, options = nil
474
537
  raise ::ArgumentError, "request must be provided" if request.nil?
475
538
 
@@ -487,16 +550,20 @@ module Google
487
550
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
488
551
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
489
552
 
490
- header_params = {
491
- "name" => request.name
492
- }
553
+ header_params = {}
554
+ if request.name
555
+ header_params["name"] = request.name
556
+ end
557
+
493
558
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
494
559
  metadata[:"x-goog-request-params"] ||= request_params_header
495
560
 
496
561
  options.apply_defaults timeout: @config.rpcs.dismiss_approval_request.timeout,
497
562
  metadata: metadata,
498
563
  retry_policy: @config.rpcs.dismiss_approval_request.retry_policy
499
- options.apply_defaults metadata: @config.metadata,
564
+
565
+ options.apply_defaults timeout: @config.timeout,
566
+ metadata: @config.metadata,
500
567
  retry_policy: @config.retry_policy
501
568
 
502
569
  @access_approval_stub.call_rpc :dismiss_approval_request, request, options: options do |response, operation|
@@ -536,6 +603,21 @@ module Google
536
603
  #
537
604
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
538
605
  #
606
+ # @example Basic example
607
+ # require "google/cloud/access_approval/v1"
608
+ #
609
+ # # Create a client object. The client can be reused for multiple calls.
610
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
611
+ #
612
+ # # Create a request. To set request fields, pass in keyword arguments.
613
+ # request = Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage.new
614
+ #
615
+ # # Call the get_access_approval_settings method.
616
+ # result = client.get_access_approval_settings request
617
+ #
618
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::AccessApprovalSettings.
619
+ # p result
620
+ #
539
621
  def get_access_approval_settings request, options = nil
540
622
  raise ::ArgumentError, "request must be provided" if request.nil?
541
623
 
@@ -553,16 +635,20 @@ module Google
553
635
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
554
636
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
637
 
556
- header_params = {
557
- "name" => request.name
558
- }
638
+ header_params = {}
639
+ if request.name
640
+ header_params["name"] = request.name
641
+ end
642
+
559
643
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
560
644
  metadata[:"x-goog-request-params"] ||= request_params_header
561
645
 
562
646
  options.apply_defaults timeout: @config.rpcs.get_access_approval_settings.timeout,
563
647
  metadata: metadata,
564
648
  retry_policy: @config.rpcs.get_access_approval_settings.retry_policy
565
- options.apply_defaults metadata: @config.metadata,
649
+
650
+ options.apply_defaults timeout: @config.timeout,
651
+ metadata: @config.metadata,
566
652
  retry_policy: @config.retry_policy
567
653
 
568
654
  @access_approval_stub.call_rpc :get_access_approval_settings, request, options: options do |response, operation|
@@ -614,6 +700,21 @@ module Google
614
700
  #
615
701
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
616
702
  #
703
+ # @example Basic example
704
+ # require "google/cloud/access_approval/v1"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage.new
711
+ #
712
+ # # Call the update_access_approval_settings method.
713
+ # result = client.update_access_approval_settings request
714
+ #
715
+ # # The returned object is of type Google::Cloud::AccessApproval::V1::AccessApprovalSettings.
716
+ # p result
717
+ #
617
718
  def update_access_approval_settings request, options = nil
618
719
  raise ::ArgumentError, "request must be provided" if request.nil?
619
720
 
@@ -631,16 +732,20 @@ module Google
631
732
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
632
733
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
734
 
634
- header_params = {
635
- "settings.name" => request.settings.name
636
- }
735
+ header_params = {}
736
+ if request.settings&.name
737
+ header_params["settings.name"] = request.settings.name
738
+ end
739
+
637
740
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
638
741
  metadata[:"x-goog-request-params"] ||= request_params_header
639
742
 
640
743
  options.apply_defaults timeout: @config.rpcs.update_access_approval_settings.timeout,
641
744
  metadata: metadata,
642
745
  retry_policy: @config.rpcs.update_access_approval_settings.retry_policy
643
- options.apply_defaults metadata: @config.metadata,
746
+
747
+ options.apply_defaults timeout: @config.timeout,
748
+ metadata: @config.metadata,
644
749
  retry_policy: @config.retry_policy
645
750
 
646
751
  @access_approval_stub.call_rpc :update_access_approval_settings, request, options: options do |response, operation|
@@ -685,6 +790,21 @@ module Google
685
790
  #
686
791
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
687
792
  #
793
+ # @example Basic example
794
+ # require "google/cloud/access_approval/v1"
795
+ #
796
+ # # Create a client object. The client can be reused for multiple calls.
797
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
798
+ #
799
+ # # Create a request. To set request fields, pass in keyword arguments.
800
+ # request = Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage.new
801
+ #
802
+ # # Call the delete_access_approval_settings method.
803
+ # result = client.delete_access_approval_settings request
804
+ #
805
+ # # The returned object is of type Google::Protobuf::Empty.
806
+ # p result
807
+ #
688
808
  def delete_access_approval_settings request, options = nil
689
809
  raise ::ArgumentError, "request must be provided" if request.nil?
690
810
 
@@ -702,16 +822,20 @@ module Google
702
822
  gapic_version: ::Google::Cloud::AccessApproval::V1::VERSION
703
823
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
704
824
 
705
- header_params = {
706
- "name" => request.name
707
- }
825
+ header_params = {}
826
+ if request.name
827
+ header_params["name"] = request.name
828
+ end
829
+
708
830
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
709
831
  metadata[:"x-goog-request-params"] ||= request_params_header
710
832
 
711
833
  options.apply_defaults timeout: @config.rpcs.delete_access_approval_settings.timeout,
712
834
  metadata: metadata,
713
835
  retry_policy: @config.rpcs.delete_access_approval_settings.retry_policy
714
- options.apply_defaults metadata: @config.metadata,
836
+
837
+ options.apply_defaults timeout: @config.timeout,
838
+ metadata: @config.metadata,
715
839
  retry_policy: @config.retry_policy
716
840
 
717
841
  @access_approval_stub.call_rpc :delete_access_approval_settings, request, options: options do |response, operation|
@@ -735,22 +859,21 @@ module Google
735
859
  # Configuration can be applied globally to all clients, or to a single client
736
860
  # on construction.
737
861
  #
738
- # # Examples
739
- #
740
- # To modify the global config, setting the timeout for list_approval_requests
741
- # to 20 seconds, and all remaining timeouts to 10 seconds:
742
- #
743
- # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
744
- # config.timeout = 10.0
745
- # config.rpcs.list_approval_requests.timeout = 20.0
746
- # end
747
- #
748
- # To apply the above configuration only to a new client:
749
- #
750
- # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
751
- # config.timeout = 10.0
752
- # config.rpcs.list_approval_requests.timeout = 20.0
753
- # end
862
+ # @example
863
+ #
864
+ # # Modify the global config, setting the timeout for
865
+ # # list_approval_requests to 20 seconds,
866
+ # # and all remaining timeouts to 10 seconds.
867
+ # ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.configure do |config|
868
+ # config.timeout = 10.0
869
+ # config.rpcs.list_approval_requests.timeout = 20.0
870
+ # end
871
+ #
872
+ # # Apply the above configuration only to a new client.
873
+ # client = ::Google::Cloud::AccessApproval::V1::AccessApproval::Client.new do |config|
874
+ # config.timeout = 10.0
875
+ # config.rpcs.list_approval_requests.timeout = 20.0
876
+ # end
754
877
  #
755
878
  # @!attribute [rw] endpoint
756
879
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AccessApproval
23
23
  module V1
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.5"
25
25
  end
26
26
  end
27
27
  end
@@ -1,14 +1,14 @@
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'
9
7
  require 'google/protobuf/empty_pb'
10
8
  require 'google/protobuf/field_mask_pb'
11
9
  require 'google/protobuf/timestamp_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/accessapproval/v1/accessapproval.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.accessapproval.v1.AccessLocations" do
@@ -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
@@ -60,6 +60,12 @@ module Google
60
60
  # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -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
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.1
4
+ version: 0.4.5
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-06-18 00:00:00.000000000 Z
11
+ date: 2022-01-11 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
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
- rubygems_version: 3.2.17
206
+ rubygems_version: 3.3.4
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: API Client library for the Access Approval V1 API