google-cloud-compute-v1 2.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +6 -4
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +3 -3
  4. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +6 -4
  5. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +6 -6
  6. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +7 -5
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +7 -7
  8. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +7 -5
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +9 -9
  10. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +7 -5
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +14 -14
  12. data/lib/google/cloud/compute/v1/compute_pb.rb +42 -10746
  13. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +7 -5
  14. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +3 -3
  15. data/lib/google/cloud/compute/v1/disks/rest/client.rb +98 -5
  16. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +75 -13
  17. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +6 -4
  18. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +6 -6
  19. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +8 -6
  20. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +18 -18
  21. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +6 -4
  22. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +6 -6
  23. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +6 -4
  24. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +8 -8
  25. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +7 -5
  26. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +5 -5
  27. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +6 -4
  28. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +7 -7
  29. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +7 -5
  30. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +7 -7
  31. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +6 -4
  32. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +5 -5
  33. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +6 -4
  34. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +3 -3
  35. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +6 -4
  36. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +5 -5
  37. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +7 -5
  38. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +7 -7
  39. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +6 -4
  40. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +1 -1
  41. data/lib/google/cloud/compute/v1/images/rest/client.rb +9 -7
  42. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +11 -11
  43. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +7 -5
  44. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +20 -20
  45. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +6 -4
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +9 -9
  47. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +97 -8
  48. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +66 -7
  49. data/lib/google/cloud/compute/v1/instances/rest/client.rb +95 -5
  50. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +107 -45
  51. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +6 -4
  52. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +7 -7
  53. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +6 -4
  54. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +2 -2
  55. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +6 -4
  56. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +7 -7
  57. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +6 -4
  58. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +2 -2
  59. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +6 -4
  60. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +7 -7
  61. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +7 -5
  62. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +7 -7
  63. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +7 -5
  64. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +3 -3
  65. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +6 -4
  66. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +8 -8
  67. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +6 -4
  68. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +5 -5
  69. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +7 -5
  70. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +9 -9
  71. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +6 -4
  72. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +16 -16
  73. data/lib/google/cloud/compute/v1/networks/rest/client.rb +7 -5
  74. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +11 -11
  75. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +94 -4
  76. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +75 -13
  77. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +7 -5
  78. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +8 -8
  79. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +7 -5
  80. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +3 -3
  81. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +6 -4
  82. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +7 -7
  83. data/lib/google/cloud/compute/v1/projects/rest/client.rb +6 -4
  84. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +13 -13
  85. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +6 -4
  86. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +5 -5
  87. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +6 -4
  88. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +6 -6
  89. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +6 -4
  90. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +6 -6
  91. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +6 -4
  92. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +9 -9
  93. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +7 -5
  94. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +5 -5
  95. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +7 -5
  96. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +2 -2
  97. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +97 -4
  98. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +74 -12
  99. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +6 -4
  100. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +5 -5
  101. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +7 -5
  102. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +6 -6
  103. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +6 -4
  104. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +19 -19
  105. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +6 -4
  106. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +4 -4
  107. data/lib/google/cloud/compute/v1/region_instance_templates/credentials.rb +52 -0
  108. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +626 -0
  109. data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +291 -0
  110. data/lib/google/cloud/compute/v1/region_instance_templates/rest.rb +51 -0
  111. data/lib/google/cloud/compute/v1/region_instance_templates.rb +47 -0
  112. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +6 -4
  113. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +1 -1
  114. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +7 -5
  115. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +4 -4
  116. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +6 -4
  117. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +17 -17
  118. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +6 -4
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +4 -4
  120. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +6 -4
  121. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +4 -4
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +6 -4
  123. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +5 -5
  124. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +6 -4
  125. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +4 -4
  126. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +6 -4
  127. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +6 -6
  128. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +7 -5
  129. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +5 -5
  130. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +7 -5
  131. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +7 -7
  132. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +6 -4
  133. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +4 -4
  134. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +7 -5
  135. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +7 -7
  136. data/lib/google/cloud/compute/v1/regions/rest/client.rb +7 -5
  137. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +2 -2
  138. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +6 -4
  139. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +10 -10
  140. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +6 -4
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +8 -8
  142. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +7 -5
  144. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +10 -10
  145. data/lib/google/cloud/compute/v1/routes/rest/client.rb +7 -5
  146. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +4 -4
  147. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +6 -4
  148. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +12 -12
  149. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +6 -4
  150. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +9 -9
  151. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +7 -5
  152. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +8 -8
  153. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +7 -5
  154. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +5 -5
  155. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +7 -5
  156. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +7 -7
  157. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +7 -5
  158. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +12 -12
  159. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +6 -4
  160. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +5 -5
  161. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +7 -5
  162. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +7 -7
  163. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +7 -5
  164. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +11 -11
  165. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +7 -5
  166. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +5 -5
  167. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +7 -5
  168. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +11 -11
  169. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +7 -5
  170. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +9 -9
  171. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +7 -5
  172. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +7 -7
  173. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +7 -5
  174. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +6 -6
  175. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +7 -5
  176. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +9 -9
  177. data/lib/google/cloud/compute/v1/version.rb +1 -1
  178. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +7 -5
  179. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +8 -8
  180. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +7 -5
  181. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +6 -6
  182. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +6 -4
  183. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +4 -4
  184. data/lib/google/cloud/compute/v1/zones/rest/client.rb +7 -5
  185. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +2 -2
  186. data/lib/google/cloud/compute/v1.rb +1 -0
  187. data/proto_docs/google/api/client.rb +67 -4
  188. data/proto_docs/google/cloud/compute/v1/compute.rb +414 -29
  189. metadata +9 -4
@@ -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?
@@ -151,7 +153,7 @@ module Google
151
153
  credentials = @config.credentials
152
154
  # Use self-signed JWT if the endpoint is unchanged from default,
153
155
  # but only if the default endpoint does not have a region prefix.
154
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
156
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
155
157
  !@config.endpoint.split(".").first.include?("-")
156
158
  credentials ||= Credentials.default scope: @config.scope,
157
159
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -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
@@ -1149,7 +1233,9 @@ module Google
1149
1233
  class Configuration
1150
1234
  extend ::Gapic::Config
1151
1235
 
1152
- config_attr :endpoint, "compute.googleapis.com", ::String
1236
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1237
+
1238
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1153
1239
  config_attr :credentials, nil do |value|
1154
1240
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1155
1241
  allowed.any? { |klass| klass === value }
@@ -1259,6 +1345,11 @@ module Google
1259
1345
  # @return [::Gapic::Config::Method]
1260
1346
  #
1261
1347
  attr_reader :test_iam_permissions
1348
+ ##
1349
+ # RPC-specific configuration for `update`
1350
+ # @return [::Gapic::Config::Method]
1351
+ #
1352
+ attr_reader :update
1262
1353
 
1263
1354
  # @private
1264
1355
  def initialize parent_rpcs = nil
@@ -1286,6 +1377,8 @@ module Google
1286
1377
  @set_labels = ::Gapic::Config::Method.new set_labels_config
1287
1378
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1288
1379
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1380
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1381
+ @update = ::Gapic::Config::Method.new update_config
1289
1382
 
1290
1383
  yield self if block_given?
1291
1384
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_add_resource_policies_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_create_snapshot_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -287,7 +287,7 @@ module Google
287
287
 
288
288
  verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_remove_resource_policies_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_resize_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -439,7 +439,7 @@ module Google
439
439
 
440
440
  verb, uri, query_string_params, body = ServiceStub.transcode_set_labels_request request_pb
441
441
  query_string_params = if query_string_params.any?
442
- query_string_params.to_h { |p| p.split("=", 2) }
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
443
  else
444
444
  {}
445
445
  end
@@ -477,7 +477,7 @@ module Google
477
477
 
478
478
  verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
479
479
  query_string_params = if query_string_params.any?
480
- query_string_params.to_h { |p| p.split("=", 2) }
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
481
  else
482
482
  {}
483
483
  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
@@ -134,7 +134,7 @@ module Google
134
134
  credentials = @config.credentials
135
135
  # Use self-signed JWT if the endpoint is unchanged from default,
136
136
  # but only if the default endpoint does not have a region prefix.
137
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
137
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
138
138
  !@config.endpoint.split(".").first.include?("-")
139
139
  credentials ||= Credentials.default scope: @config.scope,
140
140
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -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
@@ -610,7 +610,9 @@ module Google
610
610
  class Configuration
611
611
  extend ::Gapic::Config
612
612
 
613
- config_attr :endpoint, "compute.googleapis.com", ::String
613
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
614
+
615
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
614
616
  config_attr :credentials, nil do |value|
615
617
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
616
618
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_patch_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -136,7 +136,7 @@ module Google
136
136
  credentials = @config.credentials
137
137
  # Use self-signed JWT if the endpoint is unchanged from default,
138
138
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
139
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
140
140
  !@config.endpoint.split(".").first.include?("-")
141
141
  credentials ||= Credentials.default scope: @config.scope,
142
142
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -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
@@ -691,7 +691,9 @@ module Google
691
691
  class Configuration
692
692
  extend ::Gapic::Config
693
693
 
694
- config_attr :endpoint, "compute.googleapis.com", ::String
694
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
695
+
696
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
695
697
  config_attr :credentials, nil do |value|
696
698
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
697
699
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_patch_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_update_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -165,7 +165,7 @@ module Google
165
165
  credentials = @config.credentials
166
166
  # Use self-signed JWT if the endpoint is unchanged from default,
167
167
  # but only if the default endpoint does not have a region prefix.
168
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
168
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
169
169
  !@config.endpoint.split(".").first.include?("-")
170
170
  credentials ||= Credentials.default scope: @config.scope,
171
171
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -1702,9 +1702,9 @@ module Google
1702
1702
  # * (`String`) The path to a service account key file in JSON format
1703
1703
  # * (`Hash`) A service account key as a Hash
1704
1704
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1705
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1705
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1706
1706
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1707
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1707
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1708
1708
  # * (`nil`) indicating no credentials
1709
1709
  # @return [::Object]
1710
1710
  # @!attribute [rw] scope
@@ -1737,7 +1737,9 @@ module Google
1737
1737
  class Configuration
1738
1738
  extend ::Gapic::Config
1739
1739
 
1740
- config_attr :endpoint, "compute.googleapis.com", ::String
1740
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1741
+
1742
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1741
1743
  config_attr :credentials, nil do |value|
1742
1744
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1743
1745
  allowed.any? { |klass| klass === value }