google-identity-access_context_manager-v1 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -147,6 +147,7 @@ module Google
147
147
 
148
148
  @operations_client = Operations.new do |config|
149
149
  config.credentials = credentials
150
+ config.quota_project = @quota_project_id
150
151
  config.endpoint = @config.endpoint
151
152
  end
152
153
 
@@ -208,6 +209,27 @@ module Google
208
209
  #
209
210
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
210
211
  #
212
+ # @example Basic example
213
+ # require "google/identity/access_context_manager/v1"
214
+ #
215
+ # # Create a client object. The client can be reused for multiple calls.
216
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
217
+ #
218
+ # # Create a request. To set request fields, pass in keyword arguments.
219
+ # request = Google::Identity::AccessContextManager::V1::ListAccessPoliciesRequest.new
220
+ #
221
+ # # Call the list_access_policies method.
222
+ # result = client.list_access_policies request
223
+ #
224
+ # # The returned object is of type Gapic::PagedEnumerable. You can
225
+ # # iterate over all elements by calling #each, and the enumerable
226
+ # # will lazily make API calls to fetch subsequent pages. Other
227
+ # # methods are also available for managing paging directly.
228
+ # result.each do |response|
229
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessPolicy.
230
+ # p response
231
+ # end
232
+ #
211
233
  def list_access_policies request, options = nil
212
234
  raise ::ArgumentError, "request must be provided" if request.nil?
213
235
 
@@ -274,6 +296,21 @@ module Google
274
296
  #
275
297
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
276
298
  #
299
+ # @example Basic example
300
+ # require "google/identity/access_context_manager/v1"
301
+ #
302
+ # # Create a client object. The client can be reused for multiple calls.
303
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
304
+ #
305
+ # # Create a request. To set request fields, pass in keyword arguments.
306
+ # request = Google::Identity::AccessContextManager::V1::GetAccessPolicyRequest.new
307
+ #
308
+ # # Call the get_access_policy method.
309
+ # result = client.get_access_policy request
310
+ #
311
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessPolicy.
312
+ # p result
313
+ #
277
314
  def get_access_policy request, options = nil
278
315
  raise ::ArgumentError, "request must be provided" if request.nil?
279
316
 
@@ -291,9 +328,11 @@ module Google
291
328
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
292
329
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
293
330
 
294
- header_params = {
295
- "name" => request.name
296
- }
331
+ header_params = {}
332
+ if request.name
333
+ header_params["name"] = request.name
334
+ end
335
+
297
336
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
298
337
  metadata[:"x-goog-request-params"] ||= request_params_header
299
338
 
@@ -362,6 +401,28 @@ module Google
362
401
  #
363
402
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
364
403
  #
404
+ # @example Basic example
405
+ # require "google/identity/access_context_manager/v1"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Identity::AccessContextManager::V1::AccessPolicy.new
412
+ #
413
+ # # Call the create_access_policy method.
414
+ # result = client.create_access_policy request
415
+ #
416
+ # # The returned object is of type Gapic::Operation. You can use this
417
+ # # object to check the status of an operation, cancel it, or wait
418
+ # # for results. Here is how to block until completion:
419
+ # result.wait_until_done! timeout: 60
420
+ # if result.response?
421
+ # p result.response
422
+ # else
423
+ # puts "Error!"
424
+ # end
425
+ #
365
426
  def create_access_policy request, options = nil
366
427
  raise ::ArgumentError, "request must be provided" if request.nil?
367
428
 
@@ -433,6 +494,28 @@ module Google
433
494
  #
434
495
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
435
496
  #
497
+ # @example Basic example
498
+ # require "google/identity/access_context_manager/v1"
499
+ #
500
+ # # Create a client object. The client can be reused for multiple calls.
501
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
502
+ #
503
+ # # Create a request. To set request fields, pass in keyword arguments.
504
+ # request = Google::Identity::AccessContextManager::V1::UpdateAccessPolicyRequest.new
505
+ #
506
+ # # Call the update_access_policy method.
507
+ # result = client.update_access_policy request
508
+ #
509
+ # # The returned object is of type Gapic::Operation. You can use this
510
+ # # object to check the status of an operation, cancel it, or wait
511
+ # # for results. Here is how to block until completion:
512
+ # result.wait_until_done! timeout: 60
513
+ # if result.response?
514
+ # p result.response
515
+ # else
516
+ # puts "Error!"
517
+ # end
518
+ #
436
519
  def update_access_policy request, options = nil
437
520
  raise ::ArgumentError, "request must be provided" if request.nil?
438
521
 
@@ -450,9 +533,11 @@ module Google
450
533
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
451
534
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
535
 
453
- header_params = {
454
- "policy.name" => request.policy.name
455
- }
536
+ header_params = {}
537
+ if request.policy&.name
538
+ header_params["policy.name"] = request.policy.name
539
+ end
540
+
456
541
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
457
542
  metadata[:"x-goog-request-params"] ||= request_params_header
458
543
 
@@ -508,6 +593,28 @@ module Google
508
593
  #
509
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
510
595
  #
596
+ # @example Basic example
597
+ # require "google/identity/access_context_manager/v1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Identity::AccessContextManager::V1::DeleteAccessPolicyRequest.new
604
+ #
605
+ # # Call the delete_access_policy method.
606
+ # result = client.delete_access_policy request
607
+ #
608
+ # # The returned object is of type Gapic::Operation. You can use this
609
+ # # object to check the status of an operation, cancel it, or wait
610
+ # # for results. Here is how to block until completion:
611
+ # result.wait_until_done! timeout: 60
612
+ # if result.response?
613
+ # p result.response
614
+ # else
615
+ # puts "Error!"
616
+ # end
617
+ #
511
618
  def delete_access_policy request, options = nil
512
619
  raise ::ArgumentError, "request must be provided" if request.nil?
513
620
 
@@ -525,9 +632,11 @@ module Google
525
632
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
526
633
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
527
634
 
528
- header_params = {
529
- "name" => request.name
530
- }
635
+ header_params = {}
636
+ if request.name
637
+ header_params["name"] = request.name
638
+ end
639
+
531
640
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
532
641
  metadata[:"x-goog-request-params"] ||= request_params_header
533
642
 
@@ -595,6 +704,27 @@ module Google
595
704
  #
596
705
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
597
706
  #
707
+ # @example Basic example
708
+ # require "google/identity/access_context_manager/v1"
709
+ #
710
+ # # Create a client object. The client can be reused for multiple calls.
711
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
712
+ #
713
+ # # Create a request. To set request fields, pass in keyword arguments.
714
+ # request = Google::Identity::AccessContextManager::V1::ListAccessLevelsRequest.new
715
+ #
716
+ # # Call the list_access_levels method.
717
+ # result = client.list_access_levels request
718
+ #
719
+ # # The returned object is of type Gapic::PagedEnumerable. You can
720
+ # # iterate over all elements by calling #each, and the enumerable
721
+ # # will lazily make API calls to fetch subsequent pages. Other
722
+ # # methods are also available for managing paging directly.
723
+ # result.each do |response|
724
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::AccessLevel.
725
+ # p response
726
+ # end
727
+ #
598
728
  def list_access_levels request, options = nil
599
729
  raise ::ArgumentError, "request must be provided" if request.nil?
600
730
 
@@ -612,9 +742,11 @@ module Google
612
742
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
613
743
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
614
744
 
615
- header_params = {
616
- "parent" => request.parent
617
- }
745
+ header_params = {}
746
+ if request.parent
747
+ header_params["parent"] = request.parent
748
+ end
749
+
618
750
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
751
  metadata[:"x-goog-request-params"] ||= request_params_header
620
752
 
@@ -679,6 +811,21 @@ module Google
679
811
  #
680
812
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
681
813
  #
814
+ # @example Basic example
815
+ # require "google/identity/access_context_manager/v1"
816
+ #
817
+ # # Create a client object. The client can be reused for multiple calls.
818
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
819
+ #
820
+ # # Create a request. To set request fields, pass in keyword arguments.
821
+ # request = Google::Identity::AccessContextManager::V1::GetAccessLevelRequest.new
822
+ #
823
+ # # Call the get_access_level method.
824
+ # result = client.get_access_level request
825
+ #
826
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::AccessLevel.
827
+ # p result
828
+ #
682
829
  def get_access_level request, options = nil
683
830
  raise ::ArgumentError, "request must be provided" if request.nil?
684
831
 
@@ -696,9 +843,11 @@ module Google
696
843
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
697
844
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
698
845
 
699
- header_params = {
700
- "name" => request.name
701
- }
846
+ header_params = {}
847
+ if request.name
848
+ header_params["name"] = request.name
849
+ end
850
+
702
851
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
703
852
  metadata[:"x-goog-request-params"] ||= request_params_header
704
853
 
@@ -762,6 +911,28 @@ module Google
762
911
  #
763
912
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
764
913
  #
914
+ # @example Basic example
915
+ # require "google/identity/access_context_manager/v1"
916
+ #
917
+ # # Create a client object. The client can be reused for multiple calls.
918
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
919
+ #
920
+ # # Create a request. To set request fields, pass in keyword arguments.
921
+ # request = Google::Identity::AccessContextManager::V1::CreateAccessLevelRequest.new
922
+ #
923
+ # # Call the create_access_level method.
924
+ # result = client.create_access_level request
925
+ #
926
+ # # The returned object is of type Gapic::Operation. You can use this
927
+ # # object to check the status of an operation, cancel it, or wait
928
+ # # for results. Here is how to block until completion:
929
+ # result.wait_until_done! timeout: 60
930
+ # if result.response?
931
+ # p result.response
932
+ # else
933
+ # puts "Error!"
934
+ # end
935
+ #
765
936
  def create_access_level request, options = nil
766
937
  raise ::ArgumentError, "request must be provided" if request.nil?
767
938
 
@@ -779,9 +950,11 @@ module Google
779
950
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
780
951
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
781
952
 
782
- header_params = {
783
- "parent" => request.parent
784
- }
953
+ header_params = {}
954
+ if request.parent
955
+ header_params["parent"] = request.parent
956
+ end
957
+
785
958
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
786
959
  metadata[:"x-goog-request-params"] ||= request_params_header
787
960
 
@@ -844,6 +1017,28 @@ module Google
844
1017
  #
845
1018
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
846
1019
  #
1020
+ # @example Basic example
1021
+ # require "google/identity/access_context_manager/v1"
1022
+ #
1023
+ # # Create a client object. The client can be reused for multiple calls.
1024
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1025
+ #
1026
+ # # Create a request. To set request fields, pass in keyword arguments.
1027
+ # request = Google::Identity::AccessContextManager::V1::UpdateAccessLevelRequest.new
1028
+ #
1029
+ # # Call the update_access_level method.
1030
+ # result = client.update_access_level request
1031
+ #
1032
+ # # The returned object is of type Gapic::Operation. You can use this
1033
+ # # object to check the status of an operation, cancel it, or wait
1034
+ # # for results. Here is how to block until completion:
1035
+ # result.wait_until_done! timeout: 60
1036
+ # if result.response?
1037
+ # p result.response
1038
+ # else
1039
+ # puts "Error!"
1040
+ # end
1041
+ #
847
1042
  def update_access_level request, options = nil
848
1043
  raise ::ArgumentError, "request must be provided" if request.nil?
849
1044
 
@@ -861,9 +1056,11 @@ module Google
861
1056
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
862
1057
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
863
1058
 
864
- header_params = {
865
- "access_level.name" => request.access_level.name
866
- }
1059
+ header_params = {}
1060
+ if request.access_level&.name
1061
+ header_params["access_level.name"] = request.access_level.name
1062
+ end
1063
+
867
1064
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
868
1065
  metadata[:"x-goog-request-params"] ||= request_params_header
869
1066
 
@@ -922,6 +1119,28 @@ module Google
922
1119
  #
923
1120
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
924
1121
  #
1122
+ # @example Basic example
1123
+ # require "google/identity/access_context_manager/v1"
1124
+ #
1125
+ # # Create a client object. The client can be reused for multiple calls.
1126
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1127
+ #
1128
+ # # Create a request. To set request fields, pass in keyword arguments.
1129
+ # request = Google::Identity::AccessContextManager::V1::DeleteAccessLevelRequest.new
1130
+ #
1131
+ # # Call the delete_access_level method.
1132
+ # result = client.delete_access_level request
1133
+ #
1134
+ # # The returned object is of type Gapic::Operation. You can use this
1135
+ # # object to check the status of an operation, cancel it, or wait
1136
+ # # for results. Here is how to block until completion:
1137
+ # result.wait_until_done! timeout: 60
1138
+ # if result.response?
1139
+ # p result.response
1140
+ # else
1141
+ # puts "Error!"
1142
+ # end
1143
+ #
925
1144
  def delete_access_level request, options = nil
926
1145
  raise ::ArgumentError, "request must be provided" if request.nil?
927
1146
 
@@ -939,9 +1158,11 @@ module Google
939
1158
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
940
1159
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
941
1160
 
942
- header_params = {
943
- "name" => request.name
944
- }
1161
+ header_params = {}
1162
+ if request.name
1163
+ header_params["name"] = request.name
1164
+ end
1165
+
945
1166
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
946
1167
  metadata[:"x-goog-request-params"] ||= request_params_header
947
1168
 
@@ -1026,6 +1247,28 @@ module Google
1026
1247
  #
1027
1248
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1028
1249
  #
1250
+ # @example Basic example
1251
+ # require "google/identity/access_context_manager/v1"
1252
+ #
1253
+ # # Create a client object. The client can be reused for multiple calls.
1254
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1255
+ #
1256
+ # # Create a request. To set request fields, pass in keyword arguments.
1257
+ # request = Google::Identity::AccessContextManager::V1::ReplaceAccessLevelsRequest.new
1258
+ #
1259
+ # # Call the replace_access_levels method.
1260
+ # result = client.replace_access_levels request
1261
+ #
1262
+ # # The returned object is of type Gapic::Operation. You can use this
1263
+ # # object to check the status of an operation, cancel it, or wait
1264
+ # # for results. Here is how to block until completion:
1265
+ # result.wait_until_done! timeout: 60
1266
+ # if result.response?
1267
+ # p result.response
1268
+ # else
1269
+ # puts "Error!"
1270
+ # end
1271
+ #
1029
1272
  def replace_access_levels request, options = nil
1030
1273
  raise ::ArgumentError, "request must be provided" if request.nil?
1031
1274
 
@@ -1043,9 +1286,11 @@ module Google
1043
1286
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1044
1287
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1045
1288
 
1046
- header_params = {
1047
- "parent" => request.parent
1048
- }
1289
+ header_params = {}
1290
+ if request.parent
1291
+ header_params["parent"] = request.parent
1292
+ end
1293
+
1049
1294
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1050
1295
  metadata[:"x-goog-request-params"] ||= request_params_header
1051
1296
 
@@ -1109,6 +1354,27 @@ module Google
1109
1354
  #
1110
1355
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1111
1356
  #
1357
+ # @example Basic example
1358
+ # require "google/identity/access_context_manager/v1"
1359
+ #
1360
+ # # Create a client object. The client can be reused for multiple calls.
1361
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1362
+ #
1363
+ # # Create a request. To set request fields, pass in keyword arguments.
1364
+ # request = Google::Identity::AccessContextManager::V1::ListServicePerimetersRequest.new
1365
+ #
1366
+ # # Call the list_service_perimeters method.
1367
+ # result = client.list_service_perimeters request
1368
+ #
1369
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1370
+ # # iterate over all elements by calling #each, and the enumerable
1371
+ # # will lazily make API calls to fetch subsequent pages. Other
1372
+ # # methods are also available for managing paging directly.
1373
+ # result.each do |response|
1374
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::ServicePerimeter.
1375
+ # p response
1376
+ # end
1377
+ #
1112
1378
  def list_service_perimeters request, options = nil
1113
1379
  raise ::ArgumentError, "request must be provided" if request.nil?
1114
1380
 
@@ -1126,9 +1392,11 @@ module Google
1126
1392
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1127
1393
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1128
1394
 
1129
- header_params = {
1130
- "parent" => request.parent
1131
- }
1395
+ header_params = {}
1396
+ if request.parent
1397
+ header_params["parent"] = request.parent
1398
+ end
1399
+
1132
1400
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1133
1401
  metadata[:"x-goog-request-params"] ||= request_params_header
1134
1402
 
@@ -1184,6 +1452,21 @@ module Google
1184
1452
  #
1185
1453
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1186
1454
  #
1455
+ # @example Basic example
1456
+ # require "google/identity/access_context_manager/v1"
1457
+ #
1458
+ # # Create a client object. The client can be reused for multiple calls.
1459
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1460
+ #
1461
+ # # Create a request. To set request fields, pass in keyword arguments.
1462
+ # request = Google::Identity::AccessContextManager::V1::GetServicePerimeterRequest.new
1463
+ #
1464
+ # # Call the get_service_perimeter method.
1465
+ # result = client.get_service_perimeter request
1466
+ #
1467
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::ServicePerimeter.
1468
+ # p result
1469
+ #
1187
1470
  def get_service_perimeter request, options = nil
1188
1471
  raise ::ArgumentError, "request must be provided" if request.nil?
1189
1472
 
@@ -1201,9 +1484,11 @@ module Google
1201
1484
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1202
1485
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1203
1486
 
1204
- header_params = {
1205
- "name" => request.name
1206
- }
1487
+ header_params = {}
1488
+ if request.name
1489
+ header_params["name"] = request.name
1490
+ end
1491
+
1207
1492
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1208
1493
  metadata[:"x-goog-request-params"] ||= request_params_header
1209
1494
 
@@ -1268,6 +1553,28 @@ module Google
1268
1553
  #
1269
1554
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1270
1555
  #
1556
+ # @example Basic example
1557
+ # require "google/identity/access_context_manager/v1"
1558
+ #
1559
+ # # Create a client object. The client can be reused for multiple calls.
1560
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1561
+ #
1562
+ # # Create a request. To set request fields, pass in keyword arguments.
1563
+ # request = Google::Identity::AccessContextManager::V1::CreateServicePerimeterRequest.new
1564
+ #
1565
+ # # Call the create_service_perimeter method.
1566
+ # result = client.create_service_perimeter request
1567
+ #
1568
+ # # The returned object is of type Gapic::Operation. You can use this
1569
+ # # object to check the status of an operation, cancel it, or wait
1570
+ # # for results. Here is how to block until completion:
1571
+ # result.wait_until_done! timeout: 60
1572
+ # if result.response?
1573
+ # p result.response
1574
+ # else
1575
+ # puts "Error!"
1576
+ # end
1577
+ #
1271
1578
  def create_service_perimeter request, options = nil
1272
1579
  raise ::ArgumentError, "request must be provided" if request.nil?
1273
1580
 
@@ -1285,9 +1592,11 @@ module Google
1285
1592
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1286
1593
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1287
1594
 
1288
- header_params = {
1289
- "parent" => request.parent
1290
- }
1595
+ header_params = {}
1596
+ if request.parent
1597
+ header_params["parent"] = request.parent
1598
+ end
1599
+
1291
1600
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1292
1601
  metadata[:"x-goog-request-params"] ||= request_params_header
1293
1602
 
@@ -1347,6 +1656,28 @@ module Google
1347
1656
  #
1348
1657
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1349
1658
  #
1659
+ # @example Basic example
1660
+ # require "google/identity/access_context_manager/v1"
1661
+ #
1662
+ # # Create a client object. The client can be reused for multiple calls.
1663
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1664
+ #
1665
+ # # Create a request. To set request fields, pass in keyword arguments.
1666
+ # request = Google::Identity::AccessContextManager::V1::UpdateServicePerimeterRequest.new
1667
+ #
1668
+ # # Call the update_service_perimeter method.
1669
+ # result = client.update_service_perimeter request
1670
+ #
1671
+ # # The returned object is of type Gapic::Operation. You can use this
1672
+ # # object to check the status of an operation, cancel it, or wait
1673
+ # # for results. Here is how to block until completion:
1674
+ # result.wait_until_done! timeout: 60
1675
+ # if result.response?
1676
+ # p result.response
1677
+ # else
1678
+ # puts "Error!"
1679
+ # end
1680
+ #
1350
1681
  def update_service_perimeter request, options = nil
1351
1682
  raise ::ArgumentError, "request must be provided" if request.nil?
1352
1683
 
@@ -1364,9 +1695,11 @@ module Google
1364
1695
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1365
1696
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1366
1697
 
1367
- header_params = {
1368
- "service_perimeter.name" => request.service_perimeter.name
1369
- }
1698
+ header_params = {}
1699
+ if request.service_perimeter&.name
1700
+ header_params["service_perimeter.name"] = request.service_perimeter.name
1701
+ end
1702
+
1370
1703
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1371
1704
  metadata[:"x-goog-request-params"] ||= request_params_header
1372
1705
 
@@ -1425,6 +1758,28 @@ module Google
1425
1758
  #
1426
1759
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1427
1760
  #
1761
+ # @example Basic example
1762
+ # require "google/identity/access_context_manager/v1"
1763
+ #
1764
+ # # Create a client object. The client can be reused for multiple calls.
1765
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1766
+ #
1767
+ # # Create a request. To set request fields, pass in keyword arguments.
1768
+ # request = Google::Identity::AccessContextManager::V1::DeleteServicePerimeterRequest.new
1769
+ #
1770
+ # # Call the delete_service_perimeter method.
1771
+ # result = client.delete_service_perimeter request
1772
+ #
1773
+ # # The returned object is of type Gapic::Operation. You can use this
1774
+ # # object to check the status of an operation, cancel it, or wait
1775
+ # # for results. Here is how to block until completion:
1776
+ # result.wait_until_done! timeout: 60
1777
+ # if result.response?
1778
+ # p result.response
1779
+ # else
1780
+ # puts "Error!"
1781
+ # end
1782
+ #
1428
1783
  def delete_service_perimeter request, options = nil
1429
1784
  raise ::ArgumentError, "request must be provided" if request.nil?
1430
1785
 
@@ -1442,9 +1797,11 @@ module Google
1442
1797
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1443
1798
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1444
1799
 
1445
- header_params = {
1446
- "name" => request.name
1447
- }
1800
+ header_params = {}
1801
+ if request.name
1802
+ header_params["name"] = request.name
1803
+ end
1804
+
1448
1805
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1449
1806
  metadata[:"x-goog-request-params"] ||= request_params_header
1450
1807
 
@@ -1525,6 +1882,28 @@ module Google
1525
1882
  #
1526
1883
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1527
1884
  #
1885
+ # @example Basic example
1886
+ # require "google/identity/access_context_manager/v1"
1887
+ #
1888
+ # # Create a client object. The client can be reused for multiple calls.
1889
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
1890
+ #
1891
+ # # Create a request. To set request fields, pass in keyword arguments.
1892
+ # request = Google::Identity::AccessContextManager::V1::ReplaceServicePerimetersRequest.new
1893
+ #
1894
+ # # Call the replace_service_perimeters method.
1895
+ # result = client.replace_service_perimeters request
1896
+ #
1897
+ # # The returned object is of type Gapic::Operation. You can use this
1898
+ # # object to check the status of an operation, cancel it, or wait
1899
+ # # for results. Here is how to block until completion:
1900
+ # result.wait_until_done! timeout: 60
1901
+ # if result.response?
1902
+ # p result.response
1903
+ # else
1904
+ # puts "Error!"
1905
+ # end
1906
+ #
1528
1907
  def replace_service_perimeters request, options = nil
1529
1908
  raise ::ArgumentError, "request must be provided" if request.nil?
1530
1909
 
@@ -1542,9 +1921,11 @@ module Google
1542
1921
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1543
1922
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1544
1923
 
1545
- header_params = {
1546
- "parent" => request.parent
1547
- }
1924
+ header_params = {}
1925
+ if request.parent
1926
+ header_params["parent"] = request.parent
1927
+ end
1928
+
1548
1929
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1549
1930
  metadata[:"x-goog-request-params"] ||= request_params_header
1550
1931
 
@@ -1622,6 +2003,28 @@ module Google
1622
2003
  #
1623
2004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1624
2005
  #
2006
+ # @example Basic example
2007
+ # require "google/identity/access_context_manager/v1"
2008
+ #
2009
+ # # Create a client object. The client can be reused for multiple calls.
2010
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2011
+ #
2012
+ # # Create a request. To set request fields, pass in keyword arguments.
2013
+ # request = Google::Identity::AccessContextManager::V1::CommitServicePerimetersRequest.new
2014
+ #
2015
+ # # Call the commit_service_perimeters method.
2016
+ # result = client.commit_service_perimeters request
2017
+ #
2018
+ # # The returned object is of type Gapic::Operation. You can use this
2019
+ # # object to check the status of an operation, cancel it, or wait
2020
+ # # for results. Here is how to block until completion:
2021
+ # result.wait_until_done! timeout: 60
2022
+ # if result.response?
2023
+ # p result.response
2024
+ # else
2025
+ # puts "Error!"
2026
+ # end
2027
+ #
1625
2028
  def commit_service_perimeters request, options = nil
1626
2029
  raise ::ArgumentError, "request must be provided" if request.nil?
1627
2030
 
@@ -1639,9 +2042,11 @@ module Google
1639
2042
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1640
2043
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1641
2044
 
1642
- header_params = {
1643
- "parent" => request.parent
1644
- }
2045
+ header_params = {}
2046
+ if request.parent
2047
+ header_params["parent"] = request.parent
2048
+ end
2049
+
1645
2050
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1646
2051
  metadata[:"x-goog-request-params"] ||= request_params_header
1647
2052
 
@@ -1701,6 +2106,27 @@ module Google
1701
2106
  #
1702
2107
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1703
2108
  #
2109
+ # @example Basic example
2110
+ # require "google/identity/access_context_manager/v1"
2111
+ #
2112
+ # # Create a client object. The client can be reused for multiple calls.
2113
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2114
+ #
2115
+ # # Create a request. To set request fields, pass in keyword arguments.
2116
+ # request = Google::Identity::AccessContextManager::V1::ListGcpUserAccessBindingsRequest.new
2117
+ #
2118
+ # # Call the list_gcp_user_access_bindings method.
2119
+ # result = client.list_gcp_user_access_bindings request
2120
+ #
2121
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2122
+ # # iterate over all elements by calling #each, and the enumerable
2123
+ # # will lazily make API calls to fetch subsequent pages. Other
2124
+ # # methods are also available for managing paging directly.
2125
+ # result.each do |response|
2126
+ # # Each element is of type ::Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.
2127
+ # p response
2128
+ # end
2129
+ #
1704
2130
  def list_gcp_user_access_bindings request, options = nil
1705
2131
  raise ::ArgumentError, "request must be provided" if request.nil?
1706
2132
 
@@ -1718,9 +2144,11 @@ module Google
1718
2144
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1719
2145
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1720
2146
 
1721
- header_params = {
1722
- "parent" => request.parent
1723
- }
2147
+ header_params = {}
2148
+ if request.parent
2149
+ header_params["parent"] = request.parent
2150
+ end
2151
+
1724
2152
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1725
2153
  metadata[:"x-goog-request-params"] ||= request_params_header
1726
2154
 
@@ -1772,6 +2200,21 @@ module Google
1772
2200
  #
1773
2201
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1774
2202
  #
2203
+ # @example Basic example
2204
+ # require "google/identity/access_context_manager/v1"
2205
+ #
2206
+ # # Create a client object. The client can be reused for multiple calls.
2207
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2208
+ #
2209
+ # # Create a request. To set request fields, pass in keyword arguments.
2210
+ # request = Google::Identity::AccessContextManager::V1::GetGcpUserAccessBindingRequest.new
2211
+ #
2212
+ # # Call the get_gcp_user_access_binding method.
2213
+ # result = client.get_gcp_user_access_binding request
2214
+ #
2215
+ # # The returned object is of type Google::Identity::AccessContextManager::V1::GcpUserAccessBinding.
2216
+ # p result
2217
+ #
1775
2218
  def get_gcp_user_access_binding request, options = nil
1776
2219
  raise ::ArgumentError, "request must be provided" if request.nil?
1777
2220
 
@@ -1789,9 +2232,11 @@ module Google
1789
2232
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1790
2233
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1791
2234
 
1792
- header_params = {
1793
- "name" => request.name
1794
- }
2235
+ header_params = {}
2236
+ if request.name
2237
+ header_params["name"] = request.name
2238
+ end
2239
+
1795
2240
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1796
2241
  metadata[:"x-goog-request-params"] ||= request_params_header
1797
2242
 
@@ -1852,6 +2297,28 @@ module Google
1852
2297
  #
1853
2298
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1854
2299
  #
2300
+ # @example Basic example
2301
+ # require "google/identity/access_context_manager/v1"
2302
+ #
2303
+ # # Create a client object. The client can be reused for multiple calls.
2304
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2305
+ #
2306
+ # # Create a request. To set request fields, pass in keyword arguments.
2307
+ # request = Google::Identity::AccessContextManager::V1::CreateGcpUserAccessBindingRequest.new
2308
+ #
2309
+ # # Call the create_gcp_user_access_binding method.
2310
+ # result = client.create_gcp_user_access_binding request
2311
+ #
2312
+ # # The returned object is of type Gapic::Operation. You can use this
2313
+ # # object to check the status of an operation, cancel it, or wait
2314
+ # # for results. Here is how to block until completion:
2315
+ # result.wait_until_done! timeout: 60
2316
+ # if result.response?
2317
+ # p result.response
2318
+ # else
2319
+ # puts "Error!"
2320
+ # end
2321
+ #
1855
2322
  def create_gcp_user_access_binding request, options = nil
1856
2323
  raise ::ArgumentError, "request must be provided" if request.nil?
1857
2324
 
@@ -1869,9 +2336,11 @@ module Google
1869
2336
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1870
2337
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1871
2338
 
1872
- header_params = {
1873
- "parent" => request.parent
1874
- }
2339
+ header_params = {}
2340
+ if request.parent
2341
+ header_params["parent"] = request.parent
2342
+ end
2343
+
1875
2344
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1876
2345
  metadata[:"x-goog-request-params"] ||= request_params_header
1877
2346
 
@@ -1933,6 +2402,28 @@ module Google
1933
2402
  #
1934
2403
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1935
2404
  #
2405
+ # @example Basic example
2406
+ # require "google/identity/access_context_manager/v1"
2407
+ #
2408
+ # # Create a client object. The client can be reused for multiple calls.
2409
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2410
+ #
2411
+ # # Create a request. To set request fields, pass in keyword arguments.
2412
+ # request = Google::Identity::AccessContextManager::V1::UpdateGcpUserAccessBindingRequest.new
2413
+ #
2414
+ # # Call the update_gcp_user_access_binding method.
2415
+ # result = client.update_gcp_user_access_binding request
2416
+ #
2417
+ # # The returned object is of type Gapic::Operation. You can use this
2418
+ # # object to check the status of an operation, cancel it, or wait
2419
+ # # for results. Here is how to block until completion:
2420
+ # result.wait_until_done! timeout: 60
2421
+ # if result.response?
2422
+ # p result.response
2423
+ # else
2424
+ # puts "Error!"
2425
+ # end
2426
+ #
1936
2427
  def update_gcp_user_access_binding request, options = nil
1937
2428
  raise ::ArgumentError, "request must be provided" if request.nil?
1938
2429
 
@@ -1950,9 +2441,11 @@ module Google
1950
2441
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
1951
2442
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1952
2443
 
1953
- header_params = {
1954
- "gcp_user_access_binding.name" => request.gcp_user_access_binding.name
1955
- }
2444
+ header_params = {}
2445
+ if request.gcp_user_access_binding&.name
2446
+ header_params["gcp_user_access_binding.name"] = request.gcp_user_access_binding.name
2447
+ end
2448
+
1956
2449
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1957
2450
  metadata[:"x-goog-request-params"] ||= request_params_header
1958
2451
 
@@ -2006,6 +2499,28 @@ module Google
2006
2499
  #
2007
2500
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2008
2501
  #
2502
+ # @example Basic example
2503
+ # require "google/identity/access_context_manager/v1"
2504
+ #
2505
+ # # Create a client object. The client can be reused for multiple calls.
2506
+ # client = Google::Identity::AccessContextManager::V1::AccessContextManager::Client.new
2507
+ #
2508
+ # # Create a request. To set request fields, pass in keyword arguments.
2509
+ # request = Google::Identity::AccessContextManager::V1::DeleteGcpUserAccessBindingRequest.new
2510
+ #
2511
+ # # Call the delete_gcp_user_access_binding method.
2512
+ # result = client.delete_gcp_user_access_binding request
2513
+ #
2514
+ # # The returned object is of type Gapic::Operation. You can use this
2515
+ # # object to check the status of an operation, cancel it, or wait
2516
+ # # for results. Here is how to block until completion:
2517
+ # result.wait_until_done! timeout: 60
2518
+ # if result.response?
2519
+ # p result.response
2520
+ # else
2521
+ # puts "Error!"
2522
+ # end
2523
+ #
2009
2524
  def delete_gcp_user_access_binding request, options = nil
2010
2525
  raise ::ArgumentError, "request must be provided" if request.nil?
2011
2526
 
@@ -2023,9 +2538,11 @@ module Google
2023
2538
  gapic_version: ::Google::Identity::AccessContextManager::V1::VERSION
2024
2539
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2025
2540
 
2026
- header_params = {
2027
- "name" => request.name
2028
- }
2541
+ header_params = {}
2542
+ if request.name
2543
+ header_params["name"] = request.name
2544
+ end
2545
+
2029
2546
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2030
2547
  metadata[:"x-goog-request-params"] ||= request_params_header
2031
2548