google-cloud-compute-v1 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +3 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +3 -3
  6. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +3 -3
  7. data/lib/google/cloud/compute/v1/compute_pb.rb +145 -0
  8. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +3 -3
  9. data/lib/google/cloud/compute/v1/disks/rest/client.rb +94 -3
  10. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +62 -0
  11. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +2 -2
  12. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +4 -4
  13. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +2 -2
  14. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +2 -2
  15. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +3 -3
  16. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +2 -2
  17. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +3 -3
  18. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  19. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +2 -2
  20. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +2 -2
  21. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +3 -3
  22. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -2
  23. data/lib/google/cloud/compute/v1/images/rest/client.rb +5 -5
  24. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +3 -3
  25. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +2 -2
  26. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +93 -6
  27. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +59 -0
  28. data/lib/google/cloud/compute/v1/instances/rest/client.rb +91 -3
  29. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  30. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +2 -2
  31. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +2 -2
  32. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +2 -2
  33. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +2 -2
  34. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +2 -2
  35. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +3 -3
  36. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +3 -3
  37. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +2 -2
  38. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +2 -2
  39. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
  40. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +2 -2
  41. data/lib/google/cloud/compute/v1/networks/rest/client.rb +3 -3
  42. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +90 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +62 -0
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +3 -3
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +3 -3
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +2 -2
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  48. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +2 -2
  49. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +2 -2
  50. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +2 -2
  51. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +2 -2
  52. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +3 -3
  53. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +3 -3
  54. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +93 -2
  55. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +62 -0
  56. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +2 -2
  57. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +3 -3
  58. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +2 -2
  59. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  60. data/lib/google/cloud/compute/v1/region_instance_templates/credentials.rb +52 -0
  61. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +624 -0
  62. data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +291 -0
  63. data/lib/google/cloud/compute/v1/region_instance_templates/rest.rb +51 -0
  64. data/lib/google/cloud/compute/v1/region_instance_templates.rb +47 -0
  65. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +2 -2
  66. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +3 -3
  67. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +2 -2
  68. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +2 -2
  69. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +2 -2
  70. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +2 -2
  71. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +2 -2
  72. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  73. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +3 -3
  74. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +3 -3
  75. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +2 -2
  76. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +3 -3
  77. data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
  78. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +2 -2
  79. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +2 -2
  80. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  81. data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -3
  82. data/lib/google/cloud/compute/v1/routes/rest/client.rb +3 -3
  83. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +2 -2
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +2 -2
  85. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +3 -3
  86. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +3 -3
  87. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +3 -3
  88. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -3
  89. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +2 -2
  90. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +3 -3
  91. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +3 -3
  92. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +3 -3
  93. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +3 -3
  94. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +3 -3
  95. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +3 -3
  96. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +3 -3
  97. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +3 -3
  98. data/lib/google/cloud/compute/v1/version.rb +1 -1
  99. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +3 -3
  100. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +3 -3
  101. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +2 -2
  102. data/lib/google/cloud/compute/v1/zones/rest/client.rb +3 -3
  103. data/lib/google/cloud/compute/v1.rb +1 -0
  104. data/proto_docs/google/api/client.rb +9 -3
  105. data/proto_docs/google/cloud/compute/v1/compute.rb +414 -29
  106. metadata +9 -4
@@ -332,7 +332,7 @@ module Google
332
332
  end
333
333
 
334
334
  ##
335
- # Returns the specified network. Gets a list of available networks by making a list() request.
335
+ # Returns the specified network.
336
336
  #
337
337
  # @overload get(request, options = nil)
338
338
  # Pass arguments to `get` via a request object, either of type
@@ -1028,9 +1028,9 @@ module Google
1028
1028
  # * (`String`) The path to a service account key file in JSON format
1029
1029
  # * (`Hash`) A service account key as a Hash
1030
1030
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1031
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1031
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1032
1032
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1033
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1033
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1034
1034
  # * (`nil`) indicating no credentials
1035
1035
  # @return [::Object]
1036
1036
  # @!attribute [rw] scope
@@ -101,6 +101,8 @@ module Google
101
101
 
102
102
  default_config.rpcs.set_node_template.timeout = 600.0
103
103
 
104
+ default_config.rpcs.simulate_maintenance_event.timeout = 600.0
105
+
104
106
  default_config.rpcs.test_iam_permissions.timeout = 600.0
105
107
 
106
108
  default_config
@@ -1086,6 +1088,85 @@ module Google
1086
1088
  raise ::Google::Cloud::Error.from_error(e)
1087
1089
  end
1088
1090
 
1091
+ ##
1092
+ # Simulates maintenance event on specified nodes from the node group.
1093
+ #
1094
+ # @overload simulate_maintenance_event(request, options = nil)
1095
+ # Pass arguments to `simulate_maintenance_event` via a request object, either of type
1096
+ # {::Google::Cloud::Compute::V1::SimulateMaintenanceEventNodeGroupRequest} or an equivalent Hash.
1097
+ #
1098
+ # @param request [::Google::Cloud::Compute::V1::SimulateMaintenanceEventNodeGroupRequest, ::Hash]
1099
+ # A request object representing the call parameters. Required. To specify no
1100
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1101
+ # @param options [::Gapic::CallOptions, ::Hash]
1102
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1103
+ #
1104
+ # @overload simulate_maintenance_event(node_group: nil, node_groups_simulate_maintenance_event_request_resource: nil, project: nil, request_id: nil, zone: nil)
1105
+ # Pass arguments to `simulate_maintenance_event` via keyword arguments. Note that at
1106
+ # least one keyword argument is required. To specify no parameters, or to keep all
1107
+ # the default parameter values, pass an empty Hash as a request object (see above).
1108
+ #
1109
+ # @param node_group [::String]
1110
+ # Name of the NodeGroup resource whose nodes will go under maintenance simulation.
1111
+ # @param node_groups_simulate_maintenance_event_request_resource [::Google::Cloud::Compute::V1::NodeGroupsSimulateMaintenanceEventRequest, ::Hash]
1112
+ # The body resource for this request
1113
+ # @param project [::String]
1114
+ # Project ID for this request.
1115
+ # @param request_id [::String]
1116
+ # 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).
1117
+ # @param zone [::String]
1118
+ # The name of the zone for this request.
1119
+ # @yield [result, operation] Access the result along with the TransportOperation object
1120
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1121
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1122
+ #
1123
+ # @return [::Gapic::GenericLRO::Operation]
1124
+ #
1125
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1126
+ def simulate_maintenance_event request, options = nil
1127
+ raise ::ArgumentError, "request must be provided" if request.nil?
1128
+
1129
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SimulateMaintenanceEventNodeGroupRequest
1130
+
1131
+ # Converts hash and nil to an options object
1132
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1133
+
1134
+ # Customize the options with defaults
1135
+ call_metadata = @config.rpcs.simulate_maintenance_event.metadata.to_h
1136
+
1137
+ # Set x-goog-api-client and x-goog-user-project headers
1138
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1139
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1140
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1141
+ transports_version_send: [:rest]
1142
+
1143
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1144
+
1145
+ options.apply_defaults timeout: @config.rpcs.simulate_maintenance_event.timeout,
1146
+ metadata: call_metadata,
1147
+ retry_policy: @config.rpcs.simulate_maintenance_event.retry_policy
1148
+
1149
+ options.apply_defaults timeout: @config.timeout,
1150
+ metadata: @config.metadata,
1151
+ retry_policy: @config.retry_policy
1152
+
1153
+ @node_groups_stub.simulate_maintenance_event request, options do |result, response|
1154
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
1155
+ operation: result,
1156
+ client: zone_operations,
1157
+ request_values: {
1158
+ "project" => request.project,
1159
+ "zone" => request.zone
1160
+ },
1161
+ options: options
1162
+ )
1163
+ yield result, response if block_given?
1164
+ return result
1165
+ end
1166
+ rescue ::Gapic::Rest::Error => e
1167
+ raise ::Google::Cloud::Error.from_error(e)
1168
+ end
1169
+
1089
1170
  ##
1090
1171
  # Returns permissions that a caller has on the specified resource.
1091
1172
  #
@@ -1192,9 +1273,9 @@ module Google
1192
1273
  # * (`String`) The path to a service account key file in JSON format
1193
1274
  # * (`Hash`) A service account key as a Hash
1194
1275
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1195
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1276
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1196
1277
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1197
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1278
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1198
1279
  # * (`nil`) indicating no credentials
1199
1280
  # @return [::Object]
1200
1281
  # @!attribute [rw] scope
@@ -1338,6 +1419,11 @@ module Google
1338
1419
  #
1339
1420
  attr_reader :set_node_template
1340
1421
  ##
1422
+ # RPC-specific configuration for `simulate_maintenance_event`
1423
+ # @return [::Gapic::Config::Method]
1424
+ #
1425
+ attr_reader :simulate_maintenance_event
1426
+ ##
1341
1427
  # RPC-specific configuration for `test_iam_permissions`
1342
1428
  # @return [::Gapic::Config::Method]
1343
1429
  #
@@ -1369,6 +1455,8 @@ module Google
1369
1455
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1370
1456
  set_node_template_config = parent_rpcs.set_node_template if parent_rpcs.respond_to? :set_node_template
1371
1457
  @set_node_template = ::Gapic::Config::Method.new set_node_template_config
1458
+ simulate_maintenance_event_config = parent_rpcs.simulate_maintenance_event if parent_rpcs.respond_to? :simulate_maintenance_event
1459
+ @simulate_maintenance_event = ::Gapic::Config::Method.new simulate_maintenance_event_config
1372
1460
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1373
1461
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1374
1462
 
@@ -496,6 +496,44 @@ module Google
496
496
  result
497
497
  end
498
498
 
499
+ ##
500
+ # Baseline implementation for the simulate_maintenance_event REST call
501
+ #
502
+ # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventNodeGroupRequest]
503
+ # A request object representing the call parameters. Required.
504
+ # @param options [::Gapic::CallOptions]
505
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
506
+ #
507
+ # @yield [result, operation] Access the result along with the TransportOperation object
508
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
510
+ #
511
+ # @return [::Google::Cloud::Compute::V1::Operation]
512
+ # A result object deserialized from the server's reply
513
+ def simulate_maintenance_event request_pb, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
515
+
516
+ verb, uri, query_string_params, body = ServiceStub.transcode_simulate_maintenance_event_request request_pb
517
+ query_string_params = if query_string_params.any?
518
+ query_string_params.to_h { |p| p.split("=", 2) }
519
+ else
520
+ {}
521
+ end
522
+
523
+ response = @client_stub.make_http_request(
524
+ verb,
525
+ uri: uri,
526
+ body: body || "",
527
+ params: query_string_params,
528
+ options: options
529
+ )
530
+ operation = ::Gapic::Rest::TransportOperation.new response
531
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
532
+
533
+ yield result, operation if block_given?
534
+ result
535
+ end
536
+
499
537
  ##
500
538
  # Baseline implementation for the test_iam_permissions REST call
501
539
  #
@@ -812,6 +850,30 @@ module Google
812
850
  transcoder.transcode request_pb
813
851
  end
814
852
 
853
+ ##
854
+ # @private
855
+ #
856
+ # GRPC transcoding helper method for the simulate_maintenance_event REST call
857
+ #
858
+ # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventNodeGroupRequest]
859
+ # A request object representing the call parameters. Required.
860
+ # @return [Array(String, [String, nil], Hash{String => String})]
861
+ # Uri, Body, Query string parameters
862
+ def self.transcode_simulate_maintenance_event_request request_pb
863
+ transcoder = Gapic::Rest::GrpcTranscoder.new
864
+ .with_bindings(
865
+ uri_method: :post,
866
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/simulateMaintenanceEvent",
867
+ body: "node_groups_simulate_maintenance_event_request_resource",
868
+ matches: [
869
+ ["project", %r{^[^/]+/?$}, false],
870
+ ["zone", %r{^[^/]+/?$}, false],
871
+ ["node_group", %r{^[^/]+/?$}, false]
872
+ ]
873
+ )
874
+ transcoder.transcode request_pb
875
+ end
876
+
815
877
  ##
816
878
  # @private
817
879
  #
@@ -328,7 +328,7 @@ module Google
328
328
  end
329
329
 
330
330
  ##
331
- # Returns the specified node template. Gets a list of available node templates by making a list() request.
331
+ # Returns the specified node template.
332
332
  #
333
333
  # @overload get(request, options = nil)
334
334
  # Pass arguments to `get` via a request object, either of type
@@ -787,9 +787,9 @@ module Google
787
787
  # * (`String`) The path to a service account key file in JSON format
788
788
  # * (`Hash`) A service account key as a Hash
789
789
  # * (`Google::Auth::Credentials`) A googleauth credentials object
790
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
790
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
791
791
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
792
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
792
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
793
793
  # * (`nil`) indicating no credentials
794
794
  # @return [::Object]
795
795
  # @!attribute [rw] scope
@@ -224,7 +224,7 @@ module Google
224
224
  end
225
225
 
226
226
  ##
227
- # Returns the specified node type. Gets a list of available node types by making a list() request.
227
+ # Returns the specified node type.
228
228
  #
229
229
  # @overload get(request, options = nil)
230
230
  # Pass arguments to `get` via a request object, either of type
@@ -402,9 +402,9 @@ module Google
402
402
  # * (`String`) The path to a service account key file in JSON format
403
403
  # * (`Hash`) A service account key as a Hash
404
404
  # * (`Google::Auth::Credentials`) A googleauth credentials object
405
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
405
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
406
406
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
407
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
407
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
408
408
  # * (`nil`) indicating no credentials
409
409
  # @return [::Object]
410
410
  # @!attribute [rw] scope
@@ -725,9 +725,9 @@ module Google
725
725
  # * (`String`) The path to a service account key file in JSON format
726
726
  # * (`Hash`) A service account key as a Hash
727
727
  # * (`Google::Auth::Credentials`) A googleauth credentials object
728
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
728
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
729
729
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
730
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
730
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
731
731
  # * (`nil`) indicating no credentials
732
732
  # @return [::Object]
733
733
  # @!attribute [rw] scope
@@ -1154,9 +1154,9 @@ module Google
1154
1154
  # * (`String`) The path to a service account key file in JSON format
1155
1155
  # * (`Hash`) A service account key as a Hash
1156
1156
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1157
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1157
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1158
1158
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1159
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1159
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1160
1160
  # * (`nil`) indicating no credentials
1161
1161
  # @return [::Object]
1162
1162
  # @!attribute [rw] scope
@@ -562,9 +562,9 @@ module Google
562
562
  # * (`String`) The path to a service account key file in JSON format
563
563
  # * (`Hash`) A service account key as a Hash
564
564
  # * (`Google::Auth::Credentials`) A googleauth credentials object
565
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
565
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
566
566
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
567
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
567
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
568
568
  # * (`nil`) indicating no credentials
569
569
  # @return [::Object]
570
570
  # @!attribute [rw] scope
@@ -655,9 +655,9 @@ module Google
655
655
  # * (`String`) The path to a service account key file in JSON format
656
656
  # * (`Hash`) A service account key as a Hash
657
657
  # * (`Google::Auth::Credentials`) A googleauth credentials object
658
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
658
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
659
659
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
660
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
660
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
661
661
  # * (`nil`) indicating no credentials
662
662
  # @return [::Object]
663
663
  # @!attribute [rw] scope
@@ -656,9 +656,9 @@ module Google
656
656
  # * (`String`) The path to a service account key file in JSON format
657
657
  # * (`Hash`) A service account key as a Hash
658
658
  # * (`Google::Auth::Credentials`) A googleauth credentials object
659
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
659
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
660
660
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
661
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
661
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
662
662
  # * (`nil`) indicating no credentials
663
663
  # @return [::Object]
664
664
  # @!attribute [rw] scope
@@ -868,9 +868,9 @@ module Google
868
868
  # * (`String`) The path to a service account key file in JSON format
869
869
  # * (`Hash`) A service account key as a Hash
870
870
  # * (`Google::Auth::Credentials`) A googleauth credentials object
871
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
871
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
872
872
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
873
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
873
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
874
874
  # * (`nil`) indicating no credentials
875
875
  # @return [::Object]
876
876
  # @!attribute [rw] scope
@@ -242,7 +242,7 @@ module Google
242
242
  end
243
243
 
244
244
  ##
245
- # Returns the specified commitment resource. Gets a list of available commitments by making a list() request.
245
+ # Returns the specified commitment resource.
246
246
  #
247
247
  # @overload get(request, options = nil)
248
248
  # Pass arguments to `get` via a request object, either of type
@@ -579,9 +579,9 @@ module Google
579
579
  # * (`String`) The path to a service account key file in JSON format
580
580
  # * (`Hash`) A service account key as a Hash
581
581
  # * (`Google::Auth::Credentials`) A googleauth credentials object
582
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
582
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
583
583
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
584
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
584
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
585
585
  # * (`nil`) indicating no credentials
586
586
  # @return [::Object]
587
587
  # @!attribute [rw] scope
@@ -144,7 +144,7 @@ module Google
144
144
  # Service calls
145
145
 
146
146
  ##
147
- # Returns the specified regional disk type. Gets a list of available disk types by making a list() request.
147
+ # Returns the specified regional disk type.
148
148
  #
149
149
  # @overload get(request, options = nil)
150
150
  # Pass arguments to `get` via a request object, either of type
@@ -322,9 +322,9 @@ module Google
322
322
  # * (`String`) The path to a service account key file in JSON format
323
323
  # * (`Hash`) A service account key as a Hash
324
324
  # * (`Google::Auth::Credentials`) A googleauth credentials object
325
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
325
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
326
326
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
327
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
327
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
328
328
  # * (`nil`) indicating no credentials
329
329
  # @return [::Object]
330
330
  # @!attribute [rw] scope
@@ -98,6 +98,8 @@ module Google
98
98
 
99
99
  default_config.rpcs.test_iam_permissions.timeout = 600.0
100
100
 
101
+ default_config.rpcs.update.timeout = 600.0
102
+
101
103
  default_config
102
104
  end
103
105
  yield @configure if block_given?
@@ -1076,6 +1078,88 @@ module Google
1076
1078
  raise ::Google::Cloud::Error.from_error(e)
1077
1079
  end
1078
1080
 
1081
+ ##
1082
+ # Update the specified disk 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: user_license.
1083
+ #
1084
+ # @overload update(request, options = nil)
1085
+ # Pass arguments to `update` via a request object, either of type
1086
+ # {::Google::Cloud::Compute::V1::UpdateRegionDiskRequest} or an equivalent Hash.
1087
+ #
1088
+ # @param request [::Google::Cloud::Compute::V1::UpdateRegionDiskRequest, ::Hash]
1089
+ # A request object representing the call parameters. Required. To specify no
1090
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1091
+ # @param options [::Gapic::CallOptions, ::Hash]
1092
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1093
+ #
1094
+ # @overload update(disk: nil, disk_resource: nil, paths: nil, project: nil, region: nil, request_id: nil, update_mask: nil)
1095
+ # Pass arguments to `update` via keyword arguments. Note that at
1096
+ # least one keyword argument is required. To specify no parameters, or to keep all
1097
+ # the default parameter values, pass an empty Hash as a request object (see above).
1098
+ #
1099
+ # @param disk [::String]
1100
+ # The disk name for this request.
1101
+ # @param disk_resource [::Google::Cloud::Compute::V1::Disk, ::Hash]
1102
+ # The body resource for this request
1103
+ # @param paths [::String]
1104
+ # @param project [::String]
1105
+ # Project ID for this request.
1106
+ # @param region [::String]
1107
+ # The name of the region for this request.
1108
+ # @param request_id [::String]
1109
+ # 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).
1110
+ # @param update_mask [::String]
1111
+ # update_mask indicates fields to be updated as part of this request.
1112
+ # @yield [result, operation] Access the result along with the TransportOperation object
1113
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1114
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1115
+ #
1116
+ # @return [::Gapic::GenericLRO::Operation]
1117
+ #
1118
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1119
+ def update request, options = nil
1120
+ raise ::ArgumentError, "request must be provided" if request.nil?
1121
+
1122
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateRegionDiskRequest
1123
+
1124
+ # Converts hash and nil to an options object
1125
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1126
+
1127
+ # Customize the options with defaults
1128
+ call_metadata = @config.rpcs.update.metadata.to_h
1129
+
1130
+ # Set x-goog-api-client and x-goog-user-project headers
1131
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1132
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1133
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1134
+ transports_version_send: [:rest]
1135
+
1136
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1137
+
1138
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
1139
+ metadata: call_metadata,
1140
+ retry_policy: @config.rpcs.update.retry_policy
1141
+
1142
+ options.apply_defaults timeout: @config.timeout,
1143
+ metadata: @config.metadata,
1144
+ retry_policy: @config.retry_policy
1145
+
1146
+ @region_disks_stub.update request, options do |result, response|
1147
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1148
+ operation: result,
1149
+ client: region_operations,
1150
+ request_values: {
1151
+ "project" => request.project,
1152
+ "region" => request.region
1153
+ },
1154
+ options: options
1155
+ )
1156
+ yield result, response if block_given?
1157
+ return result
1158
+ end
1159
+ rescue ::Gapic::Rest::Error => e
1160
+ raise ::Google::Cloud::Error.from_error(e)
1161
+ end
1162
+
1079
1163
  ##
1080
1164
  # Configuration class for the RegionDisks REST API.
1081
1165
  #
@@ -1114,9 +1198,9 @@ module Google
1114
1198
  # * (`String`) The path to a service account key file in JSON format
1115
1199
  # * (`Hash`) A service account key as a Hash
1116
1200
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1117
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1201
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1118
1202
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1119
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1203
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1120
1204
  # * (`nil`) indicating no credentials
1121
1205
  # @return [::Object]
1122
1206
  # @!attribute [rw] scope
@@ -1259,6 +1343,11 @@ module Google
1259
1343
  # @return [::Gapic::Config::Method]
1260
1344
  #
1261
1345
  attr_reader :test_iam_permissions
1346
+ ##
1347
+ # RPC-specific configuration for `update`
1348
+ # @return [::Gapic::Config::Method]
1349
+ #
1350
+ attr_reader :update
1262
1351
 
1263
1352
  # @private
1264
1353
  def initialize parent_rpcs = nil
@@ -1286,6 +1375,8 @@ module Google
1286
1375
  @set_labels = ::Gapic::Config::Method.new set_labels_config
1287
1376
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1288
1377
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1378
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1379
+ @update = ::Gapic::Config::Method.new update_config
1289
1380
 
1290
1381
  yield self if block_given?
1291
1382
  end
@@ -496,6 +496,44 @@ module Google
496
496
  result
497
497
  end
498
498
 
499
+ ##
500
+ # Baseline implementation for the update REST call
501
+ #
502
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateRegionDiskRequest]
503
+ # A request object representing the call parameters. Required.
504
+ # @param options [::Gapic::CallOptions]
505
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
506
+ #
507
+ # @yield [result, operation] Access the result along with the TransportOperation object
508
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
510
+ #
511
+ # @return [::Google::Cloud::Compute::V1::Operation]
512
+ # A result object deserialized from the server's reply
513
+ def update request_pb, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
515
+
516
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_request request_pb
517
+ query_string_params = if query_string_params.any?
518
+ query_string_params.to_h { |p| p.split("=", 2) }
519
+ else
520
+ {}
521
+ end
522
+
523
+ response = @client_stub.make_http_request(
524
+ verb,
525
+ uri: uri,
526
+ body: body || "",
527
+ params: query_string_params,
528
+ options: options
529
+ )
530
+ operation = ::Gapic::Rest::TransportOperation.new response
531
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
532
+
533
+ yield result, operation if block_given?
534
+ result
535
+ end
536
+
499
537
  ##
500
538
  # @private
501
539
  #
@@ -777,6 +815,30 @@ module Google
777
815
  )
778
816
  transcoder.transcode request_pb
779
817
  end
818
+
819
+ ##
820
+ # @private
821
+ #
822
+ # GRPC transcoding helper method for the update REST call
823
+ #
824
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateRegionDiskRequest]
825
+ # A request object representing the call parameters. Required.
826
+ # @return [Array(String, [String, nil], Hash{String => String})]
827
+ # Uri, Body, Query string parameters
828
+ def self.transcode_update_request request_pb
829
+ transcoder = Gapic::Rest::GrpcTranscoder.new
830
+ .with_bindings(
831
+ uri_method: :patch,
832
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/disks/{disk}",
833
+ body: "disk_resource",
834
+ matches: [
835
+ ["project", %r{^[^/]+/?$}, false],
836
+ ["region", %r{^[^/]+/?$}, false],
837
+ ["disk", %r{^[^/]+/?$}, false]
838
+ ]
839
+ )
840
+ transcoder.transcode request_pb
841
+ end
780
842
  end
781
843
  end
782
844
  end
@@ -575,9 +575,9 @@ module Google
575
575
  # * (`String`) The path to a service account key file in JSON format
576
576
  # * (`Hash`) A service account key as a Hash
577
577
  # * (`Google::Auth::Credentials`) A googleauth credentials object
578
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
578
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
579
579
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
580
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
580
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
581
581
  # * (`nil`) indicating no credentials
582
582
  # @return [::Object]
583
583
  # @!attribute [rw] scope
@@ -243,7 +243,7 @@ module Google
243
243
  end
244
244
 
245
245
  ##
246
- # Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.
246
+ # Returns the specified HealthCheck resource.
247
247
  #
248
248
  # @overload get(request, options = nil)
249
249
  # Pass arguments to `get` via a request object, either of type
@@ -656,9 +656,9 @@ module Google
656
656
  # * (`String`) The path to a service account key file in JSON format
657
657
  # * (`Hash`) A service account key as a Hash
658
658
  # * (`Google::Auth::Credentials`) A googleauth credentials object
659
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
659
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
660
660
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
661
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
661
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
662
662
  # * (`nil`) indicating no credentials
663
663
  # @return [::Object]
664
664
  # @!attribute [rw] scope