google-cloud-compute-v1 2.17.0 → 2.18.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.
@@ -113,6 +113,46 @@ module Google
113
113
  end
114
114
  end
115
115
 
116
+ ##
117
+ # Baseline implementation for the add_packet_mirroring_rule REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @param options [::Gapic::CallOptions]
122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
+ #
124
+ # @yield [result, operation] Access the result along with the TransportOperation object
125
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
+ #
128
+ # @return [::Google::Cloud::Compute::V1::Operation]
129
+ # A result object deserialized from the server's reply
130
+ def add_packet_mirroring_rule request_pb, options = nil
131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
+
133
+ verb, uri, query_string_params, body = ServiceStub.transcode_add_packet_mirroring_rule_request request_pb
134
+ query_string_params = if query_string_params.any?
135
+ query_string_params.to_h { |p| p.split "=", 2 }
136
+ else
137
+ {}
138
+ end
139
+
140
+ response = @client_stub.make_http_request(
141
+ verb,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "add_packet_mirroring_rule",
146
+ options: options
147
+ )
148
+ operation = ::Gapic::Rest::TransportOperation.new response
149
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
154
+ end
155
+
116
156
  ##
117
157
  # Baseline implementation for the add_rule REST call
118
158
  #
@@ -393,6 +433,46 @@ module Google
393
433
  end
394
434
  end
395
435
 
436
+ ##
437
+ # Baseline implementation for the get_packet_mirroring_rule REST call
438
+ #
439
+ # @param request_pb [::Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest]
440
+ # A request object representing the call parameters. Required.
441
+ # @param options [::Gapic::CallOptions]
442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
443
+ #
444
+ # @yield [result, operation] Access the result along with the TransportOperation object
445
+ # @yieldparam result [::Google::Cloud::Compute::V1::FirewallPolicyRule]
446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
+ #
448
+ # @return [::Google::Cloud::Compute::V1::FirewallPolicyRule]
449
+ # A result object deserialized from the server's reply
450
+ def get_packet_mirroring_rule request_pb, options = nil
451
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
452
+
453
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_packet_mirroring_rule_request request_pb
454
+ query_string_params = if query_string_params.any?
455
+ query_string_params.to_h { |p| p.split "=", 2 }
456
+ else
457
+ {}
458
+ end
459
+
460
+ response = @client_stub.make_http_request(
461
+ verb,
462
+ uri: uri,
463
+ body: body || "",
464
+ params: query_string_params,
465
+ method_name: "get_packet_mirroring_rule",
466
+ options: options
467
+ )
468
+ operation = ::Gapic::Rest::TransportOperation.new response
469
+ result = ::Google::Cloud::Compute::V1::FirewallPolicyRule.decode_json response.body, ignore_unknown_fields: true
470
+ catch :response do
471
+ yield result, operation if block_given?
472
+ result
473
+ end
474
+ end
475
+
396
476
  ##
397
477
  # Baseline implementation for the get_rule REST call
398
478
  #
@@ -553,6 +633,46 @@ module Google
553
633
  end
554
634
  end
555
635
 
636
+ ##
637
+ # Baseline implementation for the patch_packet_mirroring_rule REST call
638
+ #
639
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest]
640
+ # A request object representing the call parameters. Required.
641
+ # @param options [::Gapic::CallOptions]
642
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
643
+ #
644
+ # @yield [result, operation] Access the result along with the TransportOperation object
645
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
+ #
648
+ # @return [::Google::Cloud::Compute::V1::Operation]
649
+ # A result object deserialized from the server's reply
650
+ def patch_packet_mirroring_rule request_pb, options = nil
651
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
652
+
653
+ verb, uri, query_string_params, body = ServiceStub.transcode_patch_packet_mirroring_rule_request request_pb
654
+ query_string_params = if query_string_params.any?
655
+ query_string_params.to_h { |p| p.split "=", 2 }
656
+ else
657
+ {}
658
+ end
659
+
660
+ response = @client_stub.make_http_request(
661
+ verb,
662
+ uri: uri,
663
+ body: body || "",
664
+ params: query_string_params,
665
+ method_name: "patch_packet_mirroring_rule",
666
+ options: options
667
+ )
668
+ operation = ::Gapic::Rest::TransportOperation.new response
669
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
670
+ catch :response do
671
+ yield result, operation if block_given?
672
+ result
673
+ end
674
+ end
675
+
556
676
  ##
557
677
  # Baseline implementation for the patch_rule REST call
558
678
  #
@@ -633,6 +753,46 @@ module Google
633
753
  end
634
754
  end
635
755
 
756
+ ##
757
+ # Baseline implementation for the remove_packet_mirroring_rule REST call
758
+ #
759
+ # @param request_pb [::Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest]
760
+ # A request object representing the call parameters. Required.
761
+ # @param options [::Gapic::CallOptions]
762
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
763
+ #
764
+ # @yield [result, operation] Access the result along with the TransportOperation object
765
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
766
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
767
+ #
768
+ # @return [::Google::Cloud::Compute::V1::Operation]
769
+ # A result object deserialized from the server's reply
770
+ def remove_packet_mirroring_rule request_pb, options = nil
771
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
772
+
773
+ verb, uri, query_string_params, body = ServiceStub.transcode_remove_packet_mirroring_rule_request request_pb
774
+ query_string_params = if query_string_params.any?
775
+ query_string_params.to_h { |p| p.split "=", 2 }
776
+ else
777
+ {}
778
+ end
779
+
780
+ response = @client_stub.make_http_request(
781
+ verb,
782
+ uri: uri,
783
+ body: body || "",
784
+ params: query_string_params,
785
+ method_name: "remove_packet_mirroring_rule",
786
+ options: options
787
+ )
788
+ operation = ::Gapic::Rest::TransportOperation.new response
789
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
790
+ catch :response do
791
+ yield result, operation if block_given?
792
+ result
793
+ end
794
+ end
795
+
636
796
  ##
637
797
  # Baseline implementation for the remove_rule REST call
638
798
  #
@@ -776,6 +936,29 @@ module Google
776
936
  transcoder.transcode request_pb
777
937
  end
778
938
 
939
+ ##
940
+ # @private
941
+ #
942
+ # GRPC transcoding helper method for the add_packet_mirroring_rule REST call
943
+ #
944
+ # @param request_pb [::Google::Cloud::Compute::V1::AddPacketMirroringRuleNetworkFirewallPolicyRequest]
945
+ # A request object representing the call parameters. Required.
946
+ # @return [Array(String, [String, nil], Hash{String => String})]
947
+ # Uri, Body, Query string parameters
948
+ def self.transcode_add_packet_mirroring_rule_request request_pb
949
+ transcoder = Gapic::Rest::GrpcTranscoder.new
950
+ .with_bindings(
951
+ uri_method: :post,
952
+ uri_template: "/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/addPacketMirroringRule",
953
+ body: "firewall_policy_rule_resource",
954
+ matches: [
955
+ ["project", %r{^[^/]+/?$}, false],
956
+ ["firewall_policy", %r{^[^/]+/?$}, false]
957
+ ]
958
+ )
959
+ transcoder.transcode request_pb
960
+ end
961
+
779
962
  ##
780
963
  # @private
781
964
  #
@@ -930,6 +1113,28 @@ module Google
930
1113
  transcoder.transcode request_pb
931
1114
  end
932
1115
 
1116
+ ##
1117
+ # @private
1118
+ #
1119
+ # GRPC transcoding helper method for the get_packet_mirroring_rule REST call
1120
+ #
1121
+ # @param request_pb [::Google::Cloud::Compute::V1::GetPacketMirroringRuleNetworkFirewallPolicyRequest]
1122
+ # A request object representing the call parameters. Required.
1123
+ # @return [Array(String, [String, nil], Hash{String => String})]
1124
+ # Uri, Body, Query string parameters
1125
+ def self.transcode_get_packet_mirroring_rule_request request_pb
1126
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1127
+ .with_bindings(
1128
+ uri_method: :get,
1129
+ uri_template: "/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/getPacketMirroringRule",
1130
+ matches: [
1131
+ ["project", %r{^[^/]+/?$}, false],
1132
+ ["firewall_policy", %r{^[^/]+/?$}, false]
1133
+ ]
1134
+ )
1135
+ transcoder.transcode request_pb
1136
+ end
1137
+
933
1138
  ##
934
1139
  # @private
935
1140
  #
@@ -1018,6 +1223,29 @@ module Google
1018
1223
  transcoder.transcode request_pb
1019
1224
  end
1020
1225
 
1226
+ ##
1227
+ # @private
1228
+ #
1229
+ # GRPC transcoding helper method for the patch_packet_mirroring_rule REST call
1230
+ #
1231
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPacketMirroringRuleNetworkFirewallPolicyRequest]
1232
+ # A request object representing the call parameters. Required.
1233
+ # @return [Array(String, [String, nil], Hash{String => String})]
1234
+ # Uri, Body, Query string parameters
1235
+ def self.transcode_patch_packet_mirroring_rule_request request_pb
1236
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1237
+ .with_bindings(
1238
+ uri_method: :post,
1239
+ uri_template: "/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/patchPacketMirroringRule",
1240
+ body: "firewall_policy_rule_resource",
1241
+ matches: [
1242
+ ["project", %r{^[^/]+/?$}, false],
1243
+ ["firewall_policy", %r{^[^/]+/?$}, false]
1244
+ ]
1245
+ )
1246
+ transcoder.transcode request_pb
1247
+ end
1248
+
1021
1249
  ##
1022
1250
  # @private
1023
1251
  #
@@ -1063,6 +1291,28 @@ module Google
1063
1291
  transcoder.transcode request_pb
1064
1292
  end
1065
1293
 
1294
+ ##
1295
+ # @private
1296
+ #
1297
+ # GRPC transcoding helper method for the remove_packet_mirroring_rule REST call
1298
+ #
1299
+ # @param request_pb [::Google::Cloud::Compute::V1::RemovePacketMirroringRuleNetworkFirewallPolicyRequest]
1300
+ # A request object representing the call parameters. Required.
1301
+ # @return [Array(String, [String, nil], Hash{String => String})]
1302
+ # Uri, Body, Query string parameters
1303
+ def self.transcode_remove_packet_mirroring_rule_request request_pb
1304
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1305
+ .with_bindings(
1306
+ uri_method: :post,
1307
+ uri_template: "/compute/v1/projects/{project}/global/firewallPolicies/{firewall_policy}/removePacketMirroringRule",
1308
+ matches: [
1309
+ ["project", %r{^[^/]+/?$}, false],
1310
+ ["firewall_policy", %r{^[^/]+/?$}, false]
1311
+ ]
1312
+ )
1313
+ transcoder.transcode request_pb
1314
+ end
1315
+
1066
1316
  ##
1067
1317
  # @private
1068
1318
  #
@@ -571,7 +571,7 @@ module Google
571
571
  end
572
572
 
573
573
  ##
574
- # Updates the specified commitment with the data included in the request. Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: auto_renew.
574
+ # Updates the specified commitment with the data included in the request. Update is performed only on selected fields included as part of update-mask. Only the following fields can be updated: auto_renew and plan.
575
575
  #
576
576
  # @overload update(request, options = nil)
577
577
  # Pass arguments to `update` via a request object, either of type
@@ -589,7 +589,7 @@ module Google
589
589
  # the default parameter values, pass an empty Hash as a request object (see above).
590
590
  #
591
591
  # @param commitment [::String]
592
- # Name of the commitment for which auto renew is being updated.
592
+ # Name of the commitment that you want to update.
593
593
  # @param commitment_resource [::Google::Cloud::Compute::V1::Commitment, ::Hash]
594
594
  # The body resource for this request
595
595
  # @param paths [::String]