google-cloud-network_security-v1beta1 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,10 @@ module Google
27
27
  ##
28
28
  # Client for the NetworkSecurity service.
29
29
  #
30
+ # Network Security API provides resources to configure authentication and
31
+ # authorization policies. Refer to per API resource documentation for more
32
+ # information.
33
+ #
30
34
  class Client
31
35
  include Paths
32
36
 
@@ -135,6 +139,7 @@ module Google
135
139
 
136
140
  @operations_client = Operations.new do |config|
137
141
  config.credentials = credentials
142
+ config.quota_project = @quota_project_id
138
143
  config.endpoint = @config.endpoint
139
144
  end
140
145
 
@@ -194,6 +199,27 @@ module Google
194
199
  #
195
200
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
196
201
  #
202
+ # @example Basic example
203
+ # require "google/cloud/network_security/v1beta1"
204
+ #
205
+ # # Create a client object. The client can be reused for multiple calls.
206
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
207
+ #
208
+ # # Create a request. To set request fields, pass in keyword arguments.
209
+ # request = Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest.new
210
+ #
211
+ # # Call the list_authorization_policies method.
212
+ # result = client.list_authorization_policies request
213
+ #
214
+ # # The returned object is of type Gapic::PagedEnumerable. You can
215
+ # # iterate over all elements by calling #each, and the enumerable
216
+ # # will lazily make API calls to fetch subsequent pages. Other
217
+ # # methods are also available for managing paging directly.
218
+ # result.each do |response|
219
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy.
220
+ # p response
221
+ # end
222
+ #
197
223
  def list_authorization_policies request, options = nil
198
224
  raise ::ArgumentError, "request must be provided" if request.nil?
199
225
 
@@ -211,9 +237,11 @@ module Google
211
237
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
212
238
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
213
239
 
214
- header_params = {
215
- "parent" => request.parent
216
- }
240
+ header_params = {}
241
+ if request.parent
242
+ header_params["parent"] = request.parent
243
+ end
244
+
217
245
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
218
246
  metadata[:"x-goog-request-params"] ||= request_params_header
219
247
 
@@ -264,6 +292,21 @@ module Google
264
292
  #
265
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
266
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/network_security/v1beta1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest.new
303
+ #
304
+ # # Call the get_authorization_policy method.
305
+ # result = client.get_authorization_policy request
306
+ #
307
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy.
308
+ # p result
309
+ #
267
310
  def get_authorization_policy request, options = nil
268
311
  raise ::ArgumentError, "request must be provided" if request.nil?
269
312
 
@@ -281,9 +324,11 @@ module Google
281
324
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
282
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
283
326
 
284
- header_params = {
285
- "name" => request.name
286
- }
327
+ header_params = {}
328
+ if request.name
329
+ header_params["name"] = request.name
330
+ end
331
+
287
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
288
333
  metadata[:"x-goog-request-params"] ||= request_params_header
289
334
 
@@ -340,6 +385,28 @@ module Google
340
385
  #
341
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
342
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/network_security/v1beta1"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest.new
396
+ #
397
+ # # Call the create_authorization_policy method.
398
+ # result = client.create_authorization_policy request
399
+ #
400
+ # # The returned object is of type Gapic::Operation. You can use this
401
+ # # object to check the status of an operation, cancel it, or wait
402
+ # # for results. Here is how to block until completion:
403
+ # result.wait_until_done! timeout: 60
404
+ # if result.response?
405
+ # p result.response
406
+ # else
407
+ # puts "Error!"
408
+ # end
409
+ #
343
410
  def create_authorization_policy request, options = nil
344
411
  raise ::ArgumentError, "request must be provided" if request.nil?
345
412
 
@@ -357,9 +424,11 @@ module Google
357
424
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
358
425
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
426
 
360
- header_params = {
361
- "parent" => request.parent
362
- }
427
+ header_params = {}
428
+ if request.parent
429
+ header_params["parent"] = request.parent
430
+ end
431
+
363
432
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
364
433
  metadata[:"x-goog-request-params"] ||= request_params_header
365
434
 
@@ -415,6 +484,28 @@ module Google
415
484
  #
416
485
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
486
  #
487
+ # @example Basic example
488
+ # require "google/cloud/network_security/v1beta1"
489
+ #
490
+ # # Create a client object. The client can be reused for multiple calls.
491
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
492
+ #
493
+ # # Create a request. To set request fields, pass in keyword arguments.
494
+ # request = Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest.new
495
+ #
496
+ # # Call the update_authorization_policy method.
497
+ # result = client.update_authorization_policy request
498
+ #
499
+ # # The returned object is of type Gapic::Operation. You can use this
500
+ # # object to check the status of an operation, cancel it, or wait
501
+ # # for results. Here is how to block until completion:
502
+ # result.wait_until_done! timeout: 60
503
+ # if result.response?
504
+ # p result.response
505
+ # else
506
+ # puts "Error!"
507
+ # end
508
+ #
418
509
  def update_authorization_policy request, options = nil
419
510
  raise ::ArgumentError, "request must be provided" if request.nil?
420
511
 
@@ -432,9 +523,11 @@ module Google
432
523
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
433
524
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
525
 
435
- header_params = {
436
- "authorization_policy.name" => request.authorization_policy.name
437
- }
526
+ header_params = {}
527
+ if request.authorization_policy&.name
528
+ header_params["authorization_policy.name"] = request.authorization_policy.name
529
+ end
530
+
438
531
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
439
532
  metadata[:"x-goog-request-params"] ||= request_params_header
440
533
 
@@ -485,6 +578,28 @@ module Google
485
578
  #
486
579
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
487
580
  #
581
+ # @example Basic example
582
+ # require "google/cloud/network_security/v1beta1"
583
+ #
584
+ # # Create a client object. The client can be reused for multiple calls.
585
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
586
+ #
587
+ # # Create a request. To set request fields, pass in keyword arguments.
588
+ # request = Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest.new
589
+ #
590
+ # # Call the delete_authorization_policy method.
591
+ # result = client.delete_authorization_policy request
592
+ #
593
+ # # The returned object is of type Gapic::Operation. You can use this
594
+ # # object to check the status of an operation, cancel it, or wait
595
+ # # for results. Here is how to block until completion:
596
+ # result.wait_until_done! timeout: 60
597
+ # if result.response?
598
+ # p result.response
599
+ # else
600
+ # puts "Error!"
601
+ # end
602
+ #
488
603
  def delete_authorization_policy request, options = nil
489
604
  raise ::ArgumentError, "request must be provided" if request.nil?
490
605
 
@@ -502,9 +617,11 @@ module Google
502
617
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
503
618
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
504
619
 
505
- header_params = {
506
- "name" => request.name
507
- }
620
+ header_params = {}
621
+ if request.name
622
+ header_params["name"] = request.name
623
+ end
624
+
508
625
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
509
626
  metadata[:"x-goog-request-params"] ||= request_params_header
510
627
 
@@ -562,6 +679,27 @@ module Google
562
679
  #
563
680
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
564
681
  #
682
+ # @example Basic example
683
+ # require "google/cloud/network_security/v1beta1"
684
+ #
685
+ # # Create a client object. The client can be reused for multiple calls.
686
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
687
+ #
688
+ # # Create a request. To set request fields, pass in keyword arguments.
689
+ # request = Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest.new
690
+ #
691
+ # # Call the list_server_tls_policies method.
692
+ # result = client.list_server_tls_policies request
693
+ #
694
+ # # The returned object is of type Gapic::PagedEnumerable. You can
695
+ # # iterate over all elements by calling #each, and the enumerable
696
+ # # will lazily make API calls to fetch subsequent pages. Other
697
+ # # methods are also available for managing paging directly.
698
+ # result.each do |response|
699
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy.
700
+ # p response
701
+ # end
702
+ #
565
703
  def list_server_tls_policies request, options = nil
566
704
  raise ::ArgumentError, "request must be provided" if request.nil?
567
705
 
@@ -579,9 +717,11 @@ module Google
579
717
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
580
718
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
581
719
 
582
- header_params = {
583
- "parent" => request.parent
584
- }
720
+ header_params = {}
721
+ if request.parent
722
+ header_params["parent"] = request.parent
723
+ end
724
+
585
725
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
586
726
  metadata[:"x-goog-request-params"] ||= request_params_header
587
727
 
@@ -632,6 +772,21 @@ module Google
632
772
  #
633
773
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
634
774
  #
775
+ # @example Basic example
776
+ # require "google/cloud/network_security/v1beta1"
777
+ #
778
+ # # Create a client object. The client can be reused for multiple calls.
779
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
780
+ #
781
+ # # Create a request. To set request fields, pass in keyword arguments.
782
+ # request = Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest.new
783
+ #
784
+ # # Call the get_server_tls_policy method.
785
+ # result = client.get_server_tls_policy request
786
+ #
787
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy.
788
+ # p result
789
+ #
635
790
  def get_server_tls_policy request, options = nil
636
791
  raise ::ArgumentError, "request must be provided" if request.nil?
637
792
 
@@ -649,9 +804,11 @@ module Google
649
804
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
650
805
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
651
806
 
652
- header_params = {
653
- "name" => request.name
654
- }
807
+ header_params = {}
808
+ if request.name
809
+ header_params["name"] = request.name
810
+ end
811
+
655
812
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
656
813
  metadata[:"x-goog-request-params"] ||= request_params_header
657
814
 
@@ -707,6 +864,28 @@ module Google
707
864
  #
708
865
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
709
866
  #
867
+ # @example Basic example
868
+ # require "google/cloud/network_security/v1beta1"
869
+ #
870
+ # # Create a client object. The client can be reused for multiple calls.
871
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
872
+ #
873
+ # # Create a request. To set request fields, pass in keyword arguments.
874
+ # request = Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest.new
875
+ #
876
+ # # Call the create_server_tls_policy method.
877
+ # result = client.create_server_tls_policy request
878
+ #
879
+ # # The returned object is of type Gapic::Operation. You can use this
880
+ # # object to check the status of an operation, cancel it, or wait
881
+ # # for results. Here is how to block until completion:
882
+ # result.wait_until_done! timeout: 60
883
+ # if result.response?
884
+ # p result.response
885
+ # else
886
+ # puts "Error!"
887
+ # end
888
+ #
710
889
  def create_server_tls_policy request, options = nil
711
890
  raise ::ArgumentError, "request must be provided" if request.nil?
712
891
 
@@ -724,9 +903,11 @@ module Google
724
903
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
725
904
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
726
905
 
727
- header_params = {
728
- "parent" => request.parent
729
- }
906
+ header_params = {}
907
+ if request.parent
908
+ header_params["parent"] = request.parent
909
+ end
910
+
730
911
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
731
912
  metadata[:"x-goog-request-params"] ||= request_params_header
732
913
 
@@ -783,6 +964,28 @@ module Google
783
964
  #
784
965
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
785
966
  #
967
+ # @example Basic example
968
+ # require "google/cloud/network_security/v1beta1"
969
+ #
970
+ # # Create a client object. The client can be reused for multiple calls.
971
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
972
+ #
973
+ # # Create a request. To set request fields, pass in keyword arguments.
974
+ # request = Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest.new
975
+ #
976
+ # # Call the update_server_tls_policy method.
977
+ # result = client.update_server_tls_policy request
978
+ #
979
+ # # The returned object is of type Gapic::Operation. You can use this
980
+ # # object to check the status of an operation, cancel it, or wait
981
+ # # for results. Here is how to block until completion:
982
+ # result.wait_until_done! timeout: 60
983
+ # if result.response?
984
+ # p result.response
985
+ # else
986
+ # puts "Error!"
987
+ # end
988
+ #
786
989
  def update_server_tls_policy request, options = nil
787
990
  raise ::ArgumentError, "request must be provided" if request.nil?
788
991
 
@@ -800,9 +1003,11 @@ module Google
800
1003
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
801
1004
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
802
1005
 
803
- header_params = {
804
- "server_tls_policy.name" => request.server_tls_policy.name
805
- }
1006
+ header_params = {}
1007
+ if request.server_tls_policy&.name
1008
+ header_params["server_tls_policy.name"] = request.server_tls_policy.name
1009
+ end
1010
+
806
1011
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
807
1012
  metadata[:"x-goog-request-params"] ||= request_params_header
808
1013
 
@@ -853,6 +1058,28 @@ module Google
853
1058
  #
854
1059
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
855
1060
  #
1061
+ # @example Basic example
1062
+ # require "google/cloud/network_security/v1beta1"
1063
+ #
1064
+ # # Create a client object. The client can be reused for multiple calls.
1065
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1066
+ #
1067
+ # # Create a request. To set request fields, pass in keyword arguments.
1068
+ # request = Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest.new
1069
+ #
1070
+ # # Call the delete_server_tls_policy method.
1071
+ # result = client.delete_server_tls_policy request
1072
+ #
1073
+ # # The returned object is of type Gapic::Operation. You can use this
1074
+ # # object to check the status of an operation, cancel it, or wait
1075
+ # # for results. Here is how to block until completion:
1076
+ # result.wait_until_done! timeout: 60
1077
+ # if result.response?
1078
+ # p result.response
1079
+ # else
1080
+ # puts "Error!"
1081
+ # end
1082
+ #
856
1083
  def delete_server_tls_policy request, options = nil
857
1084
  raise ::ArgumentError, "request must be provided" if request.nil?
858
1085
 
@@ -870,9 +1097,11 @@ module Google
870
1097
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
871
1098
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
872
1099
 
873
- header_params = {
874
- "name" => request.name
875
- }
1100
+ header_params = {}
1101
+ if request.name
1102
+ header_params["name"] = request.name
1103
+ end
1104
+
876
1105
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
877
1106
  metadata[:"x-goog-request-params"] ||= request_params_header
878
1107
 
@@ -930,6 +1159,27 @@ module Google
930
1159
  #
931
1160
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
932
1161
  #
1162
+ # @example Basic example
1163
+ # require "google/cloud/network_security/v1beta1"
1164
+ #
1165
+ # # Create a client object. The client can be reused for multiple calls.
1166
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1167
+ #
1168
+ # # Create a request. To set request fields, pass in keyword arguments.
1169
+ # request = Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest.new
1170
+ #
1171
+ # # Call the list_client_tls_policies method.
1172
+ # result = client.list_client_tls_policies request
1173
+ #
1174
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1175
+ # # iterate over all elements by calling #each, and the enumerable
1176
+ # # will lazily make API calls to fetch subsequent pages. Other
1177
+ # # methods are also available for managing paging directly.
1178
+ # result.each do |response|
1179
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy.
1180
+ # p response
1181
+ # end
1182
+ #
933
1183
  def list_client_tls_policies request, options = nil
934
1184
  raise ::ArgumentError, "request must be provided" if request.nil?
935
1185
 
@@ -947,9 +1197,11 @@ module Google
947
1197
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
948
1198
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
1199
 
950
- header_params = {
951
- "parent" => request.parent
952
- }
1200
+ header_params = {}
1201
+ if request.parent
1202
+ header_params["parent"] = request.parent
1203
+ end
1204
+
953
1205
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
954
1206
  metadata[:"x-goog-request-params"] ||= request_params_header
955
1207
 
@@ -1000,6 +1252,21 @@ module Google
1000
1252
  #
1001
1253
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1002
1254
  #
1255
+ # @example Basic example
1256
+ # require "google/cloud/network_security/v1beta1"
1257
+ #
1258
+ # # Create a client object. The client can be reused for multiple calls.
1259
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1260
+ #
1261
+ # # Create a request. To set request fields, pass in keyword arguments.
1262
+ # request = Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest.new
1263
+ #
1264
+ # # Call the get_client_tls_policy method.
1265
+ # result = client.get_client_tls_policy request
1266
+ #
1267
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy.
1268
+ # p result
1269
+ #
1003
1270
  def get_client_tls_policy request, options = nil
1004
1271
  raise ::ArgumentError, "request must be provided" if request.nil?
1005
1272
 
@@ -1017,9 +1284,11 @@ module Google
1017
1284
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
1018
1285
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1019
1286
 
1020
- header_params = {
1021
- "name" => request.name
1022
- }
1287
+ header_params = {}
1288
+ if request.name
1289
+ header_params["name"] = request.name
1290
+ end
1291
+
1023
1292
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1024
1293
  metadata[:"x-goog-request-params"] ||= request_params_header
1025
1294
 
@@ -1075,6 +1344,28 @@ module Google
1075
1344
  #
1076
1345
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1077
1346
  #
1347
+ # @example Basic example
1348
+ # require "google/cloud/network_security/v1beta1"
1349
+ #
1350
+ # # Create a client object. The client can be reused for multiple calls.
1351
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1352
+ #
1353
+ # # Create a request. To set request fields, pass in keyword arguments.
1354
+ # request = Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest.new
1355
+ #
1356
+ # # Call the create_client_tls_policy method.
1357
+ # result = client.create_client_tls_policy request
1358
+ #
1359
+ # # The returned object is of type Gapic::Operation. You can use this
1360
+ # # object to check the status of an operation, cancel it, or wait
1361
+ # # for results. Here is how to block until completion:
1362
+ # result.wait_until_done! timeout: 60
1363
+ # if result.response?
1364
+ # p result.response
1365
+ # else
1366
+ # puts "Error!"
1367
+ # end
1368
+ #
1078
1369
  def create_client_tls_policy request, options = nil
1079
1370
  raise ::ArgumentError, "request must be provided" if request.nil?
1080
1371
 
@@ -1092,9 +1383,11 @@ module Google
1092
1383
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
1093
1384
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1094
1385
 
1095
- header_params = {
1096
- "parent" => request.parent
1097
- }
1386
+ header_params = {}
1387
+ if request.parent
1388
+ header_params["parent"] = request.parent
1389
+ end
1390
+
1098
1391
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1099
1392
  metadata[:"x-goog-request-params"] ||= request_params_header
1100
1393
 
@@ -1151,6 +1444,28 @@ module Google
1151
1444
  #
1152
1445
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1153
1446
  #
1447
+ # @example Basic example
1448
+ # require "google/cloud/network_security/v1beta1"
1449
+ #
1450
+ # # Create a client object. The client can be reused for multiple calls.
1451
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1452
+ #
1453
+ # # Create a request. To set request fields, pass in keyword arguments.
1454
+ # request = Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest.new
1455
+ #
1456
+ # # Call the update_client_tls_policy method.
1457
+ # result = client.update_client_tls_policy request
1458
+ #
1459
+ # # The returned object is of type Gapic::Operation. You can use this
1460
+ # # object to check the status of an operation, cancel it, or wait
1461
+ # # for results. Here is how to block until completion:
1462
+ # result.wait_until_done! timeout: 60
1463
+ # if result.response?
1464
+ # p result.response
1465
+ # else
1466
+ # puts "Error!"
1467
+ # end
1468
+ #
1154
1469
  def update_client_tls_policy request, options = nil
1155
1470
  raise ::ArgumentError, "request must be provided" if request.nil?
1156
1471
 
@@ -1168,9 +1483,11 @@ module Google
1168
1483
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
1169
1484
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1170
1485
 
1171
- header_params = {
1172
- "client_tls_policy.name" => request.client_tls_policy.name
1173
- }
1486
+ header_params = {}
1487
+ if request.client_tls_policy&.name
1488
+ header_params["client_tls_policy.name"] = request.client_tls_policy.name
1489
+ end
1490
+
1174
1491
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1175
1492
  metadata[:"x-goog-request-params"] ||= request_params_header
1176
1493
 
@@ -1221,6 +1538,28 @@ module Google
1221
1538
  #
1222
1539
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1223
1540
  #
1541
+ # @example Basic example
1542
+ # require "google/cloud/network_security/v1beta1"
1543
+ #
1544
+ # # Create a client object. The client can be reused for multiple calls.
1545
+ # client = Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new
1546
+ #
1547
+ # # Create a request. To set request fields, pass in keyword arguments.
1548
+ # request = Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest.new
1549
+ #
1550
+ # # Call the delete_client_tls_policy method.
1551
+ # result = client.delete_client_tls_policy request
1552
+ #
1553
+ # # The returned object is of type Gapic::Operation. You can use this
1554
+ # # object to check the status of an operation, cancel it, or wait
1555
+ # # for results. Here is how to block until completion:
1556
+ # result.wait_until_done! timeout: 60
1557
+ # if result.response?
1558
+ # p result.response
1559
+ # else
1560
+ # puts "Error!"
1561
+ # end
1562
+ #
1224
1563
  def delete_client_tls_policy request, options = nil
1225
1564
  raise ::ArgumentError, "request must be provided" if request.nil?
1226
1565
 
@@ -1238,9 +1577,11 @@ module Google
1238
1577
  gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
1239
1578
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1240
1579
 
1241
- header_params = {
1242
- "name" => request.name
1243
- }
1580
+ header_params = {}
1581
+ if request.name
1582
+ header_params["name"] = request.name
1583
+ end
1584
+
1244
1585
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1245
1586
  metadata[:"x-goog-request-params"] ||= request_params_header
1246
1587