google-cloud-compute-v1 2.22.0 → 3.0.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/compute_pb.rb +125 -2
  3. data/lib/google/cloud/compute/v1/disks/rest/client.rb +105 -0
  4. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +63 -0
  5. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +2 -2
  6. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/credentials.rb +52 -0
  7. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +1218 -0
  8. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/service_stub.rb +641 -0
  9. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb +51 -0
  10. data/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb +47 -0
  11. data/lib/google/cloud/compute/v1/interconnect_groups/credentials.rb +52 -0
  12. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +1318 -0
  13. data/lib/google/cloud/compute/v1/interconnect_groups/rest/service_stub.rb +704 -0
  14. data/lib/google/cloud/compute/v1/interconnect_groups/rest.rb +51 -0
  15. data/lib/google/cloud/compute/v1/interconnect_groups.rb +47 -0
  16. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +104 -0
  17. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +63 -0
  18. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +4 -2
  19. data/lib/google/cloud/compute/v1/networks/rest/client.rb +102 -0
  20. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +63 -0
  21. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +4 -1
  22. data/lib/google/cloud/compute/v1/reservation_sub_blocks/credentials.rb +52 -0
  23. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +659 -0
  24. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +272 -0
  25. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb +51 -0
  26. data/lib/google/cloud/compute/v1/reservation_sub_blocks.rb +47 -0
  27. data/lib/google/cloud/compute/v1/rest.rb +3 -0
  28. data/lib/google/cloud/compute/v1/routers/rest/client.rb +8 -4
  29. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +8 -4
  30. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -1
  31. data/lib/google/cloud/compute/v1/version.rb +1 -1
  32. data/lib/google/cloud/compute/v1.rb +3 -0
  33. data/proto_docs/google/cloud/compute/v1/compute.rb +2265 -64
  34. metadata +19 -4
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/compute/v1/version"
24
+
25
+ require "google/cloud/compute/v1/interconnect_groups/credentials"
26
+ require "google/cloud/compute/v1/interconnect_groups/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Compute
31
+ module V1
32
+ ##
33
+ # The InterconnectGroups API.
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/cloud/compute/v1/interconnect_groups/rest"
38
+ # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new
39
+ #
40
+ module InterconnectGroups
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/cloud/compute/v1/interconnect_groups/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+ require "gapic/config/method"
21
+
22
+ require "google/cloud/compute/v1/version"
23
+
24
+ require "google/cloud/compute/v1/interconnect_groups/credentials"
25
+ require "google/cloud/compute/v1/interconnect_groups/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ ##
32
+ # The InterconnectGroups API.
33
+ #
34
+ # @example Load this service and instantiate a REST client
35
+ #
36
+ # require "google/cloud/compute/v1/interconnect_groups/rest"
37
+ # client = ::Google::Cloud::Compute::V1::InterconnectGroups::Rest::Client.new
38
+ #
39
+ module InterconnectGroups
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+
46
+ helper_path = ::File.join __dir__, "interconnect_groups", "helpers.rb"
47
+ require "google/cloud/compute/v1/interconnect_groups/helpers" if ::File.file? helper_path
@@ -94,6 +94,8 @@ module Google
94
94
 
95
95
  default_config.rpcs.test_iam_permissions.timeout = 600.0
96
96
 
97
+ default_config.rpcs.update.timeout = 600.0
98
+
97
99
  default_config
98
100
  end
99
101
  yield @configure if block_given?
@@ -810,6 +812,101 @@ module Google
810
812
  raise ::Google::Cloud::Error.from_error(e)
811
813
  end
812
814
 
815
+ ##
816
+ # Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
817
+ #
818
+ # @overload update(request, options = nil)
819
+ # Pass arguments to `update` via a request object, either of type
820
+ # {::Google::Cloud::Compute::V1::UpdateLicenseRequest} or an equivalent Hash.
821
+ #
822
+ # @param request [::Google::Cloud::Compute::V1::UpdateLicenseRequest, ::Hash]
823
+ # A request object representing the call parameters. Required. To specify no
824
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
825
+ # @param options [::Gapic::CallOptions, ::Hash]
826
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
827
+ #
828
+ # @overload update(license: nil, license_resource: nil, project: nil, request_id: nil, update_mask: nil)
829
+ # Pass arguments to `update` via keyword arguments. Note that at
830
+ # least one keyword argument is required. To specify no parameters, or to keep all
831
+ # the default parameter values, pass an empty Hash as a request object (see above).
832
+ #
833
+ # @param license [::String]
834
+ # The license name for this request.
835
+ # @param license_resource [::Google::Cloud::Compute::V1::License, ::Hash]
836
+ # The body resource for this request
837
+ # @param project [::String]
838
+ # Project ID for this request.
839
+ # @param request_id [::String]
840
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
841
+ # @param update_mask [::String]
842
+ # update_mask indicates fields to be updated as part of this request.
843
+ # @yield [result, operation] Access the result along with the TransportOperation object
844
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
845
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
846
+ #
847
+ # @return [::Gapic::GenericLRO::Operation]
848
+ #
849
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
850
+ #
851
+ # @example Basic example
852
+ # require "google/cloud/compute/v1"
853
+ #
854
+ # # Create a client object. The client can be reused for multiple calls.
855
+ # client = Google::Cloud::Compute::V1::Licenses::Rest::Client.new
856
+ #
857
+ # # Create a request. To set request fields, pass in keyword arguments.
858
+ # request = Google::Cloud::Compute::V1::UpdateLicenseRequest.new
859
+ #
860
+ # # Call the update method.
861
+ # result = client.update request
862
+ #
863
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
864
+ # p result
865
+ #
866
+ def update request, options = nil
867
+ raise ::ArgumentError, "request must be provided" if request.nil?
868
+
869
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateLicenseRequest
870
+
871
+ # Converts hash and nil to an options object
872
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
873
+
874
+ # Customize the options with defaults
875
+ call_metadata = @config.rpcs.update.metadata.to_h
876
+
877
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
878
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
879
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
880
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
881
+ transports_version_send: [:rest]
882
+
883
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
884
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
885
+
886
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
887
+ metadata: call_metadata,
888
+ retry_policy: @config.rpcs.update.retry_policy
889
+
890
+ options.apply_defaults timeout: @config.timeout,
891
+ metadata: @config.metadata,
892
+ retry_policy: @config.retry_policy
893
+
894
+ @licenses_stub.update request, options do |result, response|
895
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
896
+ operation: result,
897
+ client: global_operations,
898
+ request_values: {
899
+ "project" => request.project
900
+ },
901
+ options: options
902
+ )
903
+ yield result, response if block_given?
904
+ throw :response, result
905
+ end
906
+ rescue ::Gapic::Rest::Error => e
907
+ raise ::Google::Cloud::Error.from_error(e)
908
+ end
909
+
813
910
  ##
814
911
  # Configuration class for the Licenses REST API.
815
912
  #
@@ -991,6 +1088,11 @@ module Google
991
1088
  # @return [::Gapic::Config::Method]
992
1089
  #
993
1090
  attr_reader :test_iam_permissions
1091
+ ##
1092
+ # RPC-specific configuration for `update`
1093
+ # @return [::Gapic::Config::Method]
1094
+ #
1095
+ attr_reader :update
994
1096
 
995
1097
  # @private
996
1098
  def initialize parent_rpcs = nil
@@ -1008,6 +1110,8 @@ module Google
1008
1110
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1009
1111
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1010
1112
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1113
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1114
+ @update = ::Gapic::Config::Method.new update_config
1011
1115
 
1012
1116
  yield self if block_given?
1013
1117
  end
@@ -353,6 +353,46 @@ module Google
353
353
  end
354
354
  end
355
355
 
356
+ ##
357
+ # Baseline implementation for the update REST call
358
+ #
359
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateLicenseRequest]
360
+ # A request object representing the call parameters. Required.
361
+ # @param options [::Gapic::CallOptions]
362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
363
+ #
364
+ # @yield [result, operation] Access the result along with the TransportOperation object
365
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
367
+ #
368
+ # @return [::Google::Cloud::Compute::V1::Operation]
369
+ # A result object deserialized from the server's reply
370
+ def update request_pb, options = nil
371
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
372
+
373
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_request request_pb
374
+ query_string_params = if query_string_params.any?
375
+ query_string_params.to_h { |p| p.split "=", 2 }
376
+ else
377
+ {}
378
+ end
379
+
380
+ response = @client_stub.make_http_request(
381
+ verb,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "update",
386
+ options: options
387
+ )
388
+ operation = ::Gapic::Rest::TransportOperation.new response
389
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
394
+ end
395
+
356
396
  ##
357
397
  # @private
358
398
  #
@@ -507,6 +547,29 @@ module Google
507
547
  )
508
548
  transcoder.transcode request_pb
509
549
  end
550
+
551
+ ##
552
+ # @private
553
+ #
554
+ # GRPC transcoding helper method for the update REST call
555
+ #
556
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateLicenseRequest]
557
+ # A request object representing the call parameters. Required.
558
+ # @return [Array(String, [String, nil], Hash{String => String})]
559
+ # Uri, Body, Query string parameters
560
+ def self.transcode_update_request request_pb
561
+ transcoder = Gapic::Rest::GrpcTranscoder.new
562
+ .with_bindings(
563
+ uri_method: :patch,
564
+ uri_template: "/compute/v1/projects/{project}/global/licenses/{license}",
565
+ body: "license_resource",
566
+ matches: [
567
+ ["project", %r{^[^/]+/?$}, false],
568
+ ["license", %r{^[^/]+/?$}, false]
569
+ ]
570
+ )
571
+ transcoder.transcode request_pb
572
+ end
510
573
  end
511
574
  end
512
575
  end
@@ -295,10 +295,10 @@ module Google
295
295
  # @param return_partial_success [::Boolean]
296
296
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
297
297
  # @yield [result, operation] Access the result along with the TransportOperation object
298
- # @yieldparam result [::Google::Cloud::Compute::V1::NetworkProfilesListResponse]
298
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkProfile>]
299
299
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
300
300
  #
301
- # @return [::Google::Cloud::Compute::V1::NetworkProfilesListResponse]
301
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NetworkProfile>]
302
302
  #
303
303
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
304
304
  #
@@ -346,7 +346,9 @@ module Google
346
346
  retry_policy: @config.retry_policy
347
347
 
348
348
  @network_profiles_stub.list request, options do |result, operation|
349
+ result = ::Gapic::Rest::PagedEnumerable.new @network_profiles_stub, :list, "items", request, result, options
349
350
  yield result, operation if block_given?
351
+ throw :response, result
350
352
  end
351
353
  rescue ::Gapic::Rest::Error => e
352
354
  raise ::Google::Cloud::Error.from_error(e)
@@ -101,6 +101,8 @@ module Google
101
101
 
102
102
  default_config.rpcs.remove_peering.timeout = 600.0
103
103
 
104
+ default_config.rpcs.request_remove_peering.timeout = 600.0
105
+
104
106
  default_config.rpcs.switch_to_custom_mode.timeout = 600.0
105
107
 
106
108
  default_config.rpcs.update_peering.timeout = 600.0
@@ -1033,6 +1035,99 @@ module Google
1033
1035
  raise ::Google::Cloud::Error.from_error(e)
1034
1036
  end
1035
1037
 
1038
+ ##
1039
+ # Requests to remove a peering from the specified network. Applicable only for PeeringConnection with update_strategy=CONSENSUS.
1040
+ #
1041
+ # @overload request_remove_peering(request, options = nil)
1042
+ # Pass arguments to `request_remove_peering` via a request object, either of type
1043
+ # {::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest} or an equivalent Hash.
1044
+ #
1045
+ # @param request [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest, ::Hash]
1046
+ # A request object representing the call parameters. Required. To specify no
1047
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1048
+ # @param options [::Gapic::CallOptions, ::Hash]
1049
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1050
+ #
1051
+ # @overload request_remove_peering(network: nil, networks_request_remove_peering_request_resource: nil, project: nil, request_id: nil)
1052
+ # Pass arguments to `request_remove_peering` via keyword arguments. Note that at
1053
+ # least one keyword argument is required. To specify no parameters, or to keep all
1054
+ # the default parameter values, pass an empty Hash as a request object (see above).
1055
+ #
1056
+ # @param network [::String]
1057
+ # Name of the network resource to remove peering from.
1058
+ # @param networks_request_remove_peering_request_resource [::Google::Cloud::Compute::V1::NetworksRequestRemovePeeringRequest, ::Hash]
1059
+ # The body resource for this request
1060
+ # @param project [::String]
1061
+ # Project ID for this request.
1062
+ # @param request_id [::String]
1063
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1064
+ # @yield [result, operation] Access the result along with the TransportOperation object
1065
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1066
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1067
+ #
1068
+ # @return [::Gapic::GenericLRO::Operation]
1069
+ #
1070
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1071
+ #
1072
+ # @example Basic example
1073
+ # require "google/cloud/compute/v1"
1074
+ #
1075
+ # # Create a client object. The client can be reused for multiple calls.
1076
+ # client = Google::Cloud::Compute::V1::Networks::Rest::Client.new
1077
+ #
1078
+ # # Create a request. To set request fields, pass in keyword arguments.
1079
+ # request = Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest.new
1080
+ #
1081
+ # # Call the request_remove_peering method.
1082
+ # result = client.request_remove_peering request
1083
+ #
1084
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1085
+ # p result
1086
+ #
1087
+ def request_remove_peering request, options = nil
1088
+ raise ::ArgumentError, "request must be provided" if request.nil?
1089
+
1090
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest
1091
+
1092
+ # Converts hash and nil to an options object
1093
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1094
+
1095
+ # Customize the options with defaults
1096
+ call_metadata = @config.rpcs.request_remove_peering.metadata.to_h
1097
+
1098
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1099
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1100
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1101
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1102
+ transports_version_send: [:rest]
1103
+
1104
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1105
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1106
+
1107
+ options.apply_defaults timeout: @config.rpcs.request_remove_peering.timeout,
1108
+ metadata: call_metadata,
1109
+ retry_policy: @config.rpcs.request_remove_peering.retry_policy
1110
+
1111
+ options.apply_defaults timeout: @config.timeout,
1112
+ metadata: @config.metadata,
1113
+ retry_policy: @config.retry_policy
1114
+
1115
+ @networks_stub.request_remove_peering request, options do |result, response|
1116
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
1117
+ operation: result,
1118
+ client: global_operations,
1119
+ request_values: {
1120
+ "project" => request.project
1121
+ },
1122
+ options: options
1123
+ )
1124
+ yield result, response if block_given?
1125
+ throw :response, result
1126
+ end
1127
+ rescue ::Gapic::Rest::Error => e
1128
+ raise ::Google::Cloud::Error.from_error(e)
1129
+ end
1130
+
1036
1131
  ##
1037
1132
  # Switches the network mode from auto subnet mode to custom subnet mode.
1038
1133
  #
@@ -1409,6 +1504,11 @@ module Google
1409
1504
  #
1410
1505
  attr_reader :remove_peering
1411
1506
  ##
1507
+ # RPC-specific configuration for `request_remove_peering`
1508
+ # @return [::Gapic::Config::Method]
1509
+ #
1510
+ attr_reader :request_remove_peering
1511
+ ##
1412
1512
  # RPC-specific configuration for `switch_to_custom_mode`
1413
1513
  # @return [::Gapic::Config::Method]
1414
1514
  #
@@ -1439,6 +1539,8 @@ module Google
1439
1539
  @patch = ::Gapic::Config::Method.new patch_config
1440
1540
  remove_peering_config = parent_rpcs.remove_peering if parent_rpcs.respond_to? :remove_peering
1441
1541
  @remove_peering = ::Gapic::Config::Method.new remove_peering_config
1542
+ request_remove_peering_config = parent_rpcs.request_remove_peering if parent_rpcs.respond_to? :request_remove_peering
1543
+ @request_remove_peering = ::Gapic::Config::Method.new request_remove_peering_config
1442
1544
  switch_to_custom_mode_config = parent_rpcs.switch_to_custom_mode if parent_rpcs.respond_to? :switch_to_custom_mode
1443
1545
  @switch_to_custom_mode = ::Gapic::Config::Method.new switch_to_custom_mode_config
1444
1546
  update_peering_config = parent_rpcs.update_peering if parent_rpcs.respond_to? :update_peering
@@ -433,6 +433,46 @@ module Google
433
433
  end
434
434
  end
435
435
 
436
+ ##
437
+ # Baseline implementation for the request_remove_peering REST call
438
+ #
439
+ # @param request_pb [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest]
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::Operation]
446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
+ #
448
+ # @return [::Google::Cloud::Compute::V1::Operation]
449
+ # A result object deserialized from the server's reply
450
+ def request_remove_peering 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_request_remove_peering_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: "request_remove_peering",
466
+ options: options
467
+ )
468
+ operation = ::Gapic::Rest::TransportOperation.new response
469
+ result = ::Google::Cloud::Compute::V1::Operation.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
+
436
476
  ##
437
477
  # Baseline implementation for the switch_to_custom_mode REST call
438
478
  #
@@ -713,6 +753,29 @@ module Google
713
753
  transcoder.transcode request_pb
714
754
  end
715
755
 
756
+ ##
757
+ # @private
758
+ #
759
+ # GRPC transcoding helper method for the request_remove_peering REST call
760
+ #
761
+ # @param request_pb [::Google::Cloud::Compute::V1::RequestRemovePeeringNetworkRequest]
762
+ # A request object representing the call parameters. Required.
763
+ # @return [Array(String, [String, nil], Hash{String => String})]
764
+ # Uri, Body, Query string parameters
765
+ def self.transcode_request_remove_peering_request request_pb
766
+ transcoder = Gapic::Rest::GrpcTranscoder.new
767
+ .with_bindings(
768
+ uri_method: :post,
769
+ uri_template: "/compute/v1/projects/{project}/global/networks/{network}/requestRemovePeering",
770
+ body: "networks_request_remove_peering_request_resource",
771
+ matches: [
772
+ ["project", %r{^[^/]+/?$}, false],
773
+ ["network", %r{^[^/]+/?$}, false]
774
+ ]
775
+ )
776
+ transcoder.transcode request_pb
777
+ end
778
+
716
779
  ##
717
780
  # @private
718
781
  #
@@ -214,7 +214,7 @@ module Google
214
214
  # @param options [::Gapic::CallOptions, ::Hash]
215
215
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
216
216
  #
217
- # @overload get(project: nil, reservation: nil, reservation_block: nil, zone: nil)
217
+ # @overload get(project: nil, reservation: nil, reservation_block: nil, view: nil, zone: nil)
218
218
  # Pass arguments to `get` via keyword arguments. Note that at
219
219
  # least one keyword argument is required. To specify no parameters, or to keep all
220
220
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -225,6 +225,9 @@ module Google
225
225
  # The name of the reservation. Name should conform to RFC1035 or be a resource ID.
226
226
  # @param reservation_block [::String]
227
227
  # The name of the reservation block. Name should conform to RFC1035 or be a resource ID.
228
+ # @param view [::String]
229
+ # View of the Block.
230
+ # Check the View enum for the list of possible values.
228
231
  # @param zone [::String]
229
232
  # Name of the zone for this request. Zone name should conform to RFC1035.
230
233
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module ReservationSubBlocks
26
+ # Credentials for the ReservationSubBlocks API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end