google-cloud-compute-v1 2.5.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +72 -101
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +37 -10
  4. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +14 -2
  5. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +38 -10
  6. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +14 -2
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +38 -10
  8. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +14 -2
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +311 -8
  10. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +196 -2
  11. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +230 -10
  12. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +134 -2
  13. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  14. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +37 -10
  15. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +14 -2
  16. data/lib/google/cloud/compute/v1/disks/rest/client.rb +38 -10
  17. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +14 -2
  18. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +35 -8
  19. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +14 -2
  20. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +35 -8
  21. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +14 -2
  22. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +35 -8
  23. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +14 -2
  24. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +38 -10
  25. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +14 -2
  26. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +35 -8
  27. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +14 -2
  28. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +35 -8
  29. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +14 -2
  30. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +36 -9
  31. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +14 -2
  32. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +37 -10
  33. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +14 -2
  34. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +34 -8
  35. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +14 -2
  36. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +35 -8
  37. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +14 -2
  38. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +38 -10
  39. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +14 -2
  40. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +33 -7
  41. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +14 -2
  42. data/lib/google/cloud/compute/v1/images/rest/client.rb +35 -8
  43. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +14 -2
  44. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +41 -13
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +14 -2
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +39 -11
  47. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +14 -2
  48. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +38 -10
  49. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +14 -2
  50. data/lib/google/cloud/compute/v1/instances/rest/client.rb +143 -11
  51. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +76 -2
  52. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +38 -10
  53. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +14 -2
  54. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +34 -8
  55. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +14 -2
  56. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +34 -8
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +14 -2
  58. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +128 -9
  59. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +74 -2
  60. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +33 -7
  61. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +14 -2
  62. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +35 -8
  63. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +14 -2
  64. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +35 -8
  65. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +14 -2
  66. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +37 -10
  67. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +14 -2
  68. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +142 -10
  69. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +76 -2
  70. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +37 -9
  71. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +14 -2
  72. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +39 -11
  73. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +14 -2
  74. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +35 -8
  75. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +14 -2
  76. data/lib/google/cloud/compute/v1/networks/rest/client.rb +36 -9
  77. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +14 -2
  78. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +39 -11
  79. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +14 -2
  80. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +38 -10
  81. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +14 -2
  82. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +37 -10
  83. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +14 -2
  84. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +38 -10
  85. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +14 -2
  86. data/lib/google/cloud/compute/v1/projects/rest/client.rb +36 -9
  87. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +14 -2
  88. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +236 -11
  89. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +134 -2
  90. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +242 -10
  91. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +136 -2
  92. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +35 -8
  93. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +14 -2
  94. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +335 -8
  95. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +198 -2
  96. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +38 -10
  97. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +14 -2
  98. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +34 -8
  99. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +14 -2
  100. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +35 -8
  101. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +14 -2
  102. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +35 -8
  103. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +14 -2
  104. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +35 -8
  105. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +14 -2
  106. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +38 -11
  107. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +14 -2
  108. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +36 -9
  109. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +14 -2
  110. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +35 -8
  111. data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +14 -2
  112. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +34 -7
  113. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +14 -2
  114. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +348 -11
  115. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +199 -2
  116. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +35 -8
  117. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +14 -2
  118. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -8
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +14 -2
  120. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +34 -8
  121. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +14 -2
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +451 -12
  123. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +260 -2
  124. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -8
  125. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +14 -2
  126. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +36 -9
  127. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +14 -2
  128. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +35 -8
  129. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +14 -2
  130. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +35 -8
  131. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +14 -2
  132. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +35 -8
  133. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +14 -2
  134. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +35 -8
  135. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +14 -2
  136. data/lib/google/cloud/compute/v1/regions/rest/client.rb +34 -8
  137. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +14 -2
  138. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +38 -10
  139. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +14 -2
  140. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +38 -10
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +14 -2
  142. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +135 -11
  144. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +75 -2
  145. data/lib/google/cloud/compute/v1/routes/rest/client.rb +35 -8
  146. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +14 -2
  147. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +45 -13
  148. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +14 -2
  149. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +38 -10
  150. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +14 -2
  151. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  152. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +507 -0
  153. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +179 -0
  154. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  155. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  156. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +35 -8
  157. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +14 -2
  158. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +38 -10
  159. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +14 -2
  160. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +39 -11
  161. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +14 -2
  162. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +39 -11
  163. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +14 -2
  164. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +35 -8
  165. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +14 -2
  166. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +38 -10
  167. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +14 -2
  168. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +38 -10
  169. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +14 -2
  170. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +142 -10
  171. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +76 -2
  172. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +142 -10
  173. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +76 -2
  174. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +35 -8
  175. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +14 -2
  176. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +38 -10
  177. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +14 -2
  178. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +38 -10
  179. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +14 -2
  180. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +38 -10
  181. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +14 -2
  182. data/lib/google/cloud/compute/v1/version.rb +1 -1
  183. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +38 -10
  184. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +14 -2
  185. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +38 -10
  186. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +14 -2
  187. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +34 -8
  188. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +14 -2
  189. data/lib/google/cloud/compute/v1/zones/rest/client.rb +34 -8
  190. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +14 -2
  191. data/lib/google/cloud/compute/v1.rb +1 -0
  192. data/proto_docs/google/api/client.rb +14 -0
  193. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  194. data/proto_docs/google/protobuf/any.rb +144 -0
  195. metadata +11 -5
@@ -33,6 +33,9 @@ module Google
33
33
  # The PublicDelegatedPrefixes API.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
36
39
  # @private
37
40
  attr_reader :public_delegated_prefixes_stub
38
41
 
@@ -70,6 +73,8 @@ module Google
70
73
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
71
74
  }
72
75
 
76
+ default_config.rpcs.announce.timeout = 600.0
77
+
73
78
  default_config.rpcs.delete.timeout = 600.0
74
79
 
75
80
  default_config.rpcs.get.timeout = 600.0
@@ -86,6 +91,8 @@ module Google
86
91
 
87
92
  default_config.rpcs.patch.timeout = 600.0
88
93
 
94
+ default_config.rpcs.withdraw.timeout = 600.0
95
+
89
96
  default_config
90
97
  end
91
98
  yield @configure if block_given?
@@ -112,6 +119,15 @@ module Google
112
119
  @config
113
120
  end
114
121
 
122
+ ##
123
+ # The effective universe domain
124
+ #
125
+ # @return [String]
126
+ #
127
+ def universe_domain
128
+ @public_delegated_prefixes_stub.universe_domain
129
+ end
130
+
115
131
  ##
116
132
  # Create a new PublicDelegatedPrefixes REST client object.
117
133
  #
@@ -139,8 +155,9 @@ module Google
139
155
  credentials = @config.credentials
140
156
  # Use self-signed JWT if the endpoint is unchanged from default,
141
157
  # but only if the default endpoint does not have a region prefix.
142
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
143
- !@config.endpoint.split(".").first.include?("-")
158
+ enable_self_signed_jwt = @config.endpoint.nil? ||
159
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
160
+ !@config.endpoint.split(".").first.include?("-"))
144
161
  credentials ||= Credentials.default scope: @config.scope,
145
162
  enable_self_signed_jwt: enable_self_signed_jwt
146
163
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -154,9 +171,15 @@ module Google
154
171
  config.credentials = credentials
155
172
  config.quota_project = @quota_project_id
156
173
  config.endpoint = @config.endpoint
174
+ config.universe_domain = @config.universe_domain
157
175
  end
158
176
 
159
- @public_delegated_prefixes_stub = ::Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
177
+ @public_delegated_prefixes_stub = ::Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::ServiceStub.new(
178
+ endpoint: @config.endpoint,
179
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
180
+ universe_domain: @config.universe_domain,
181
+ credentials: credentials
182
+ )
160
183
  end
161
184
 
162
185
  ##
@@ -181,13 +204,13 @@ module Google
181
204
  # @param options [::Gapic::CallOptions, ::Hash]
182
205
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
183
206
  #
184
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
207
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
185
208
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
186
209
  # least one keyword argument is required. To specify no parameters, or to keep all
187
210
  # the default parameter values, pass an empty Hash as a request object (see above).
188
211
  #
189
212
  # @param filter [::String]
190
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
213
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
191
214
  # @param include_all_scopes [::Boolean]
192
215
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
193
216
  # @param max_results [::Integer]
@@ -200,6 +223,7 @@ module Google
200
223
  # Name of the project scoping this request.
201
224
  # @param return_partial_success [::Boolean]
202
225
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
226
+ # @param service_project_number [::Integer]
203
227
  # @yield [result, operation] Access the result along with the TransportOperation object
204
228
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::PublicDelegatedPrefixesScopedList>]
205
229
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -259,6 +283,99 @@ module Google
259
283
  raise ::Google::Cloud::Error.from_error(e)
260
284
  end
261
285
 
286
+ ##
287
+ # Announces the specified PublicDelegatedPrefix in the given region.
288
+ #
289
+ # @overload announce(request, options = nil)
290
+ # Pass arguments to `announce` via a request object, either of type
291
+ # {::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest} or an equivalent Hash.
292
+ #
293
+ # @param request [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest, ::Hash]
294
+ # A request object representing the call parameters. Required. To specify no
295
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
296
+ # @param options [::Gapic::CallOptions, ::Hash]
297
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
298
+ #
299
+ # @overload announce(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
300
+ # Pass arguments to `announce` via keyword arguments. Note that at
301
+ # least one keyword argument is required. To specify no parameters, or to keep all
302
+ # the default parameter values, pass an empty Hash as a request object (see above).
303
+ #
304
+ # @param project [::String]
305
+ # Project ID for this request.
306
+ # @param public_delegated_prefix [::String]
307
+ # The name of the public delegated prefix. It should comply with RFC1035.
308
+ # @param region [::String]
309
+ # The name of the region where the public delegated prefix is located. It should comply with RFC1035.
310
+ # @param request_id [::String]
311
+ # 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).
312
+ # @yield [result, operation] Access the result along with the TransportOperation object
313
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
314
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
315
+ #
316
+ # @return [::Gapic::GenericLRO::Operation]
317
+ #
318
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
319
+ #
320
+ # @example Basic example
321
+ # require "google/cloud/compute/v1"
322
+ #
323
+ # # Create a client object. The client can be reused for multiple calls.
324
+ # client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
325
+ #
326
+ # # Create a request. To set request fields, pass in keyword arguments.
327
+ # request = Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest.new
328
+ #
329
+ # # Call the announce method.
330
+ # result = client.announce request
331
+ #
332
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
333
+ # p result
334
+ #
335
+ def announce request, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request.nil?
337
+
338
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest
339
+
340
+ # Converts hash and nil to an options object
341
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
342
+
343
+ # Customize the options with defaults
344
+ call_metadata = @config.rpcs.announce.metadata.to_h
345
+
346
+ # Set x-goog-api-client and x-goog-user-project headers
347
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
348
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
349
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
350
+ transports_version_send: [:rest]
351
+
352
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
353
+
354
+ options.apply_defaults timeout: @config.rpcs.announce.timeout,
355
+ metadata: call_metadata,
356
+ retry_policy: @config.rpcs.announce.retry_policy
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
360
+ retry_policy: @config.retry_policy
361
+
362
+ @public_delegated_prefixes_stub.announce request, options do |result, response|
363
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
364
+ operation: result,
365
+ client: region_operations,
366
+ request_values: {
367
+ "project" => request.project,
368
+ "region" => request.region
369
+ },
370
+ options: options
371
+ )
372
+ yield result, response if block_given?
373
+ return result
374
+ end
375
+ rescue ::Gapic::Rest::Error => e
376
+ raise ::Google::Cloud::Error.from_error(e)
377
+ end
378
+
262
379
  ##
263
380
  # Deletes the specified PublicDelegatedPrefix in the given region.
264
381
  #
@@ -546,7 +663,7 @@ module Google
546
663
  # the default parameter values, pass an empty Hash as a request object (see above).
547
664
  #
548
665
  # @param filter [::String]
549
- # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
666
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
550
667
  # @param max_results [::Integer]
551
668
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
552
669
  # @param order_by [::String]
@@ -713,6 +830,99 @@ module Google
713
830
  raise ::Google::Cloud::Error.from_error(e)
714
831
  end
715
832
 
833
+ ##
834
+ # Withdraws the specified PublicDelegatedPrefix in the given region.
835
+ #
836
+ # @overload withdraw(request, options = nil)
837
+ # Pass arguments to `withdraw` via a request object, either of type
838
+ # {::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest} or an equivalent Hash.
839
+ #
840
+ # @param request [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest, ::Hash]
841
+ # A request object representing the call parameters. Required. To specify no
842
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
843
+ # @param options [::Gapic::CallOptions, ::Hash]
844
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
845
+ #
846
+ # @overload withdraw(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
847
+ # Pass arguments to `withdraw` via keyword arguments. Note that at
848
+ # least one keyword argument is required. To specify no parameters, or to keep all
849
+ # the default parameter values, pass an empty Hash as a request object (see above).
850
+ #
851
+ # @param project [::String]
852
+ # Project ID for this request.
853
+ # @param public_delegated_prefix [::String]
854
+ # The name of the public delegated prefix. It should comply with RFC1035.
855
+ # @param region [::String]
856
+ # The name of the region where the public delegated prefix is located. It should comply with RFC1035.
857
+ # @param request_id [::String]
858
+ # 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).
859
+ # @yield [result, operation] Access the result along with the TransportOperation object
860
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
861
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
862
+ #
863
+ # @return [::Gapic::GenericLRO::Operation]
864
+ #
865
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
866
+ #
867
+ # @example Basic example
868
+ # require "google/cloud/compute/v1"
869
+ #
870
+ # # Create a client object. The client can be reused for multiple calls.
871
+ # client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
872
+ #
873
+ # # Create a request. To set request fields, pass in keyword arguments.
874
+ # request = Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest.new
875
+ #
876
+ # # Call the withdraw method.
877
+ # result = client.withdraw request
878
+ #
879
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
880
+ # p result
881
+ #
882
+ def withdraw request, options = nil
883
+ raise ::ArgumentError, "request must be provided" if request.nil?
884
+
885
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest
886
+
887
+ # Converts hash and nil to an options object
888
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
889
+
890
+ # Customize the options with defaults
891
+ call_metadata = @config.rpcs.withdraw.metadata.to_h
892
+
893
+ # Set x-goog-api-client and x-goog-user-project headers
894
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
895
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
896
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
897
+ transports_version_send: [:rest]
898
+
899
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
900
+
901
+ options.apply_defaults timeout: @config.rpcs.withdraw.timeout,
902
+ metadata: call_metadata,
903
+ retry_policy: @config.rpcs.withdraw.retry_policy
904
+
905
+ options.apply_defaults timeout: @config.timeout,
906
+ metadata: @config.metadata,
907
+ retry_policy: @config.retry_policy
908
+
909
+ @public_delegated_prefixes_stub.withdraw request, options do |result, response|
910
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
911
+ operation: result,
912
+ client: region_operations,
913
+ request_values: {
914
+ "project" => request.project,
915
+ "region" => request.region
916
+ },
917
+ options: options
918
+ )
919
+ yield result, response if block_given?
920
+ return result
921
+ end
922
+ rescue ::Gapic::Rest::Error => e
923
+ raise ::Google::Cloud::Error.from_error(e)
924
+ end
925
+
716
926
  ##
717
927
  # Configuration class for the PublicDelegatedPrefixes REST API.
718
928
  #
@@ -743,9 +953,9 @@ module Google
743
953
  # end
744
954
  #
745
955
  # @!attribute [rw] endpoint
746
- # The hostname or hostname:port of the service endpoint.
747
- # Defaults to `"compute.googleapis.com"`.
748
- # @return [::String]
956
+ # A custom service endpoint, as a hostname or hostname:port. The default is
957
+ # nil, indicating to use the default endpoint in the current universe domain.
958
+ # @return [::String,nil]
749
959
  # @!attribute [rw] credentials
750
960
  # Credentials to send with calls. You may provide any of the following types:
751
961
  # * (`String`) The path to a service account key file in JSON format
@@ -782,13 +992,20 @@ module Google
782
992
  # @!attribute [rw] quota_project
783
993
  # A separate project against which to charge quota.
784
994
  # @return [::String]
995
+ # @!attribute [rw] universe_domain
996
+ # The universe domain within which to make requests. This determines the
997
+ # default endpoint URL. The default value of nil uses the environment
998
+ # universe (usually the default "googleapis.com" universe).
999
+ # @return [::String,nil]
785
1000
  #
786
1001
  class Configuration
787
1002
  extend ::Gapic::Config
788
1003
 
1004
+ # @private
1005
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
789
1006
  DEFAULT_ENDPOINT = "compute.googleapis.com"
790
1007
 
791
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1008
+ config_attr :endpoint, nil, ::String, nil
792
1009
  config_attr :credentials, nil do |value|
793
1010
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
794
1011
  allowed.any? { |klass| klass === value }
@@ -800,6 +1017,7 @@ module Google
800
1017
  config_attr :metadata, nil, ::Hash, nil
801
1018
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
802
1019
  config_attr :quota_project, nil, ::String, nil
1020
+ config_attr :universe_domain, nil, ::String, nil
803
1021
 
804
1022
  # @private
805
1023
  def initialize parent_config = nil
@@ -844,6 +1062,11 @@ module Google
844
1062
  #
845
1063
  attr_reader :aggregated_list
846
1064
  ##
1065
+ # RPC-specific configuration for `announce`
1066
+ # @return [::Gapic::Config::Method]
1067
+ #
1068
+ attr_reader :announce
1069
+ ##
847
1070
  # RPC-specific configuration for `delete`
848
1071
  # @return [::Gapic::Config::Method]
849
1072
  #
@@ -868,11 +1091,18 @@ module Google
868
1091
  # @return [::Gapic::Config::Method]
869
1092
  #
870
1093
  attr_reader :patch
1094
+ ##
1095
+ # RPC-specific configuration for `withdraw`
1096
+ # @return [::Gapic::Config::Method]
1097
+ #
1098
+ attr_reader :withdraw
871
1099
 
872
1100
  # @private
873
1101
  def initialize parent_rpcs = nil
874
1102
  aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
875
1103
  @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1104
+ announce_config = parent_rpcs.announce if parent_rpcs.respond_to? :announce
1105
+ @announce = ::Gapic::Config::Method.new announce_config
876
1106
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
877
1107
  @delete = ::Gapic::Config::Method.new delete_config
878
1108
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
@@ -883,6 +1113,8 @@ module Google
883
1113
  @list = ::Gapic::Config::Method.new list_config
884
1114
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
885
1115
  @patch = ::Gapic::Config::Method.new patch_config
1116
+ withdraw_config = parent_rpcs.withdraw if parent_rpcs.respond_to? :withdraw
1117
+ @withdraw = ::Gapic::Config::Method.new withdraw_config
886
1118
 
887
1119
  yield self if block_given?
888
1120
  end
@@ -30,16 +30,28 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: false,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
43
55
  ##
44
56
  # Baseline implementation for the aggregated_list REST call
45
57
  #
@@ -78,6 +90,44 @@ module Google
78
90
  result
79
91
  end
80
92
 
93
+ ##
94
+ # Baseline implementation for the announce REST call
95
+ #
96
+ # @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
97
+ # A request object representing the call parameters. Required.
98
+ # @param options [::Gapic::CallOptions]
99
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
100
+ #
101
+ # @yield [result, operation] Access the result along with the TransportOperation object
102
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
103
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
104
+ #
105
+ # @return [::Google::Cloud::Compute::V1::Operation]
106
+ # A result object deserialized from the server's reply
107
+ def announce request_pb, options = nil
108
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
109
+
110
+ verb, uri, query_string_params, body = ServiceStub.transcode_announce_request request_pb
111
+ query_string_params = if query_string_params.any?
112
+ query_string_params.to_h { |p| p.split "=", 2 }
113
+ else
114
+ {}
115
+ end
116
+
117
+ response = @client_stub.make_http_request(
118
+ verb,
119
+ uri: uri,
120
+ body: body || "",
121
+ params: query_string_params,
122
+ options: options
123
+ )
124
+ operation = ::Gapic::Rest::TransportOperation.new response
125
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
126
+
127
+ yield result, operation if block_given?
128
+ result
129
+ end
130
+
81
131
  ##
82
132
  # Baseline implementation for the delete REST call
83
133
  #
@@ -268,6 +318,44 @@ module Google
268
318
  result
269
319
  end
270
320
 
321
+ ##
322
+ # Baseline implementation for the withdraw REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
325
+ # A request object representing the call parameters. Required.
326
+ # @param options [::Gapic::CallOptions]
327
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
328
+ #
329
+ # @yield [result, operation] Access the result along with the TransportOperation object
330
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::Compute::V1::Operation]
334
+ # A result object deserialized from the server's reply
335
+ def withdraw request_pb, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
337
+
338
+ verb, uri, query_string_params, body = ServiceStub.transcode_withdraw_request request_pb
339
+ query_string_params = if query_string_params.any?
340
+ query_string_params.to_h { |p| p.split "=", 2 }
341
+ else
342
+ {}
343
+ end
344
+
345
+ response = @client_stub.make_http_request(
346
+ verb,
347
+ uri: uri,
348
+ body: body || "",
349
+ params: query_string_params,
350
+ options: options
351
+ )
352
+ operation = ::Gapic::Rest::TransportOperation.new response
353
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
354
+
355
+ yield result, operation if block_given?
356
+ result
357
+ end
358
+
271
359
  ##
272
360
  # @private
273
361
  #
@@ -289,6 +377,29 @@ module Google
289
377
  transcoder.transcode request_pb
290
378
  end
291
379
 
380
+ ##
381
+ # @private
382
+ #
383
+ # GRPC transcoding helper method for the announce REST call
384
+ #
385
+ # @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
386
+ # A request object representing the call parameters. Required.
387
+ # @return [Array(String, [String, nil], Hash{String => String})]
388
+ # Uri, Body, Query string parameters
389
+ def self.transcode_announce_request request_pb
390
+ transcoder = Gapic::Rest::GrpcTranscoder.new
391
+ .with_bindings(
392
+ uri_method: :post,
393
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/announce",
394
+ matches: [
395
+ ["project", %r{^[^/]+/?$}, false],
396
+ ["region", %r{^[^/]+/?$}, false],
397
+ ["public_delegated_prefix", %r{^[^/]+/?$}, false]
398
+ ]
399
+ )
400
+ transcoder.transcode request_pb
401
+ end
402
+
292
403
  ##
293
404
  # @private
294
405
  #
@@ -403,6 +514,29 @@ module Google
403
514
  )
404
515
  transcoder.transcode request_pb
405
516
  end
517
+
518
+ ##
519
+ # @private
520
+ #
521
+ # GRPC transcoding helper method for the withdraw REST call
522
+ #
523
+ # @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
524
+ # A request object representing the call parameters. Required.
525
+ # @return [Array(String, [String, nil], Hash{String => String})]
526
+ # Uri, Body, Query string parameters
527
+ def self.transcode_withdraw_request request_pb
528
+ transcoder = Gapic::Rest::GrpcTranscoder.new
529
+ .with_bindings(
530
+ uri_method: :post,
531
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/withdraw",
532
+ matches: [
533
+ ["project", %r{^[^/]+/?$}, false],
534
+ ["region", %r{^[^/]+/?$}, false],
535
+ ["public_delegated_prefix", %r{^[^/]+/?$}, false]
536
+ ]
537
+ )
538
+ transcoder.transcode request_pb
539
+ end
406
540
  end
407
541
  end
408
542
  end