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 TargetPools API.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
36
39
  # @private
37
40
  attr_reader :target_pools_stub
38
41
 
@@ -96,6 +99,8 @@ module Google
96
99
 
97
100
  default_config.rpcs.set_backup.timeout = 600.0
98
101
 
102
+ default_config.rpcs.set_security_policy.timeout = 600.0
103
+
99
104
  default_config
100
105
  end
101
106
  yield @configure if block_given?
@@ -122,6 +127,15 @@ module Google
122
127
  @config
123
128
  end
124
129
 
130
+ ##
131
+ # The effective universe domain
132
+ #
133
+ # @return [String]
134
+ #
135
+ def universe_domain
136
+ @target_pools_stub.universe_domain
137
+ end
138
+
125
139
  ##
126
140
  # Create a new TargetPools REST client object.
127
141
  #
@@ -149,8 +163,9 @@ module Google
149
163
  credentials = @config.credentials
150
164
  # Use self-signed JWT if the endpoint is unchanged from default,
151
165
  # but only if the default endpoint does not have a region prefix.
152
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
153
- !@config.endpoint.split(".").first.include?("-")
166
+ enable_self_signed_jwt = @config.endpoint.nil? ||
167
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
168
+ !@config.endpoint.split(".").first.include?("-"))
154
169
  credentials ||= Credentials.default scope: @config.scope,
155
170
  enable_self_signed_jwt: enable_self_signed_jwt
156
171
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -164,9 +179,15 @@ module Google
164
179
  config.credentials = credentials
165
180
  config.quota_project = @quota_project_id
166
181
  config.endpoint = @config.endpoint
182
+ config.universe_domain = @config.universe_domain
167
183
  end
168
184
 
169
- @target_pools_stub = ::Google::Cloud::Compute::V1::TargetPools::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
185
+ @target_pools_stub = ::Google::Cloud::Compute::V1::TargetPools::Rest::ServiceStub.new(
186
+ endpoint: @config.endpoint,
187
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
188
+ universe_domain: @config.universe_domain,
189
+ credentials: credentials
190
+ )
170
191
  end
171
192
 
172
193
  ##
@@ -381,13 +402,13 @@ module Google
381
402
  # @param options [::Gapic::CallOptions, ::Hash]
382
403
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
383
404
  #
384
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
405
+ # @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)
385
406
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
386
407
  # least one keyword argument is required. To specify no parameters, or to keep all
387
408
  # the default parameter values, pass an empty Hash as a request object (see above).
388
409
  #
389
410
  # @param filter [::String]
390
- # 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`.
411
+ # 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.
391
412
  # @param include_all_scopes [::Boolean]
392
413
  # 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.
393
414
  # @param max_results [::Integer]
@@ -400,6 +421,7 @@ module Google
400
421
  # Project ID for this request.
401
422
  # @param return_partial_success [::Boolean]
402
423
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
424
+ # @param service_project_number [::Integer]
403
425
  # @yield [result, operation] Access the result along with the TransportOperation object
404
426
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
405
427
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -830,7 +852,7 @@ module Google
830
852
  # the default parameter values, pass an empty Hash as a request object (see above).
831
853
  #
832
854
  # @param filter [::String]
833
- # 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`.
855
+ # 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.
834
856
  # @param max_results [::Integer]
835
857
  # 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`)
836
858
  # @param order_by [::String]
@@ -1189,6 +1211,101 @@ module Google
1189
1211
  raise ::Google::Cloud::Error.from_error(e)
1190
1212
  end
1191
1213
 
1214
+ ##
1215
+ # Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview
1216
+ #
1217
+ # @overload set_security_policy(request, options = nil)
1218
+ # Pass arguments to `set_security_policy` via a request object, either of type
1219
+ # {::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest} or an equivalent Hash.
1220
+ #
1221
+ # @param request [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest, ::Hash]
1222
+ # A request object representing the call parameters. Required. To specify no
1223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1224
+ # @param options [::Gapic::CallOptions, ::Hash]
1225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1226
+ #
1227
+ # @overload set_security_policy(project: nil, region: nil, request_id: nil, security_policy_reference_resource: nil, target_pool: nil)
1228
+ # Pass arguments to `set_security_policy` via keyword arguments. Note that at
1229
+ # least one keyword argument is required. To specify no parameters, or to keep all
1230
+ # the default parameter values, pass an empty Hash as a request object (see above).
1231
+ #
1232
+ # @param project [::String]
1233
+ # Project ID for this request.
1234
+ # @param region [::String]
1235
+ # Name of the region scoping this request.
1236
+ # @param request_id [::String]
1237
+ # 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).
1238
+ # @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
1239
+ # The body resource for this request
1240
+ # @param target_pool [::String]
1241
+ # Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.
1242
+ # @yield [result, operation] Access the result along with the TransportOperation object
1243
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1245
+ #
1246
+ # @return [::Gapic::GenericLRO::Operation]
1247
+ #
1248
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1249
+ #
1250
+ # @example Basic example
1251
+ # require "google/cloud/compute/v1"
1252
+ #
1253
+ # # Create a client object. The client can be reused for multiple calls.
1254
+ # client = Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
1255
+ #
1256
+ # # Create a request. To set request fields, pass in keyword arguments.
1257
+ # request = Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest.new
1258
+ #
1259
+ # # Call the set_security_policy method.
1260
+ # result = client.set_security_policy request
1261
+ #
1262
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1263
+ # p result
1264
+ #
1265
+ def set_security_policy request, options = nil
1266
+ raise ::ArgumentError, "request must be provided" if request.nil?
1267
+
1268
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest
1269
+
1270
+ # Converts hash and nil to an options object
1271
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1272
+
1273
+ # Customize the options with defaults
1274
+ call_metadata = @config.rpcs.set_security_policy.metadata.to_h
1275
+
1276
+ # Set x-goog-api-client and x-goog-user-project headers
1277
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1278
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1279
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1280
+ transports_version_send: [:rest]
1281
+
1282
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1283
+
1284
+ options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
1285
+ metadata: call_metadata,
1286
+ retry_policy: @config.rpcs.set_security_policy.retry_policy
1287
+
1288
+ options.apply_defaults timeout: @config.timeout,
1289
+ metadata: @config.metadata,
1290
+ retry_policy: @config.retry_policy
1291
+
1292
+ @target_pools_stub.set_security_policy request, options do |result, response|
1293
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1294
+ operation: result,
1295
+ client: region_operations,
1296
+ request_values: {
1297
+ "project" => request.project,
1298
+ "region" => request.region
1299
+ },
1300
+ options: options
1301
+ )
1302
+ yield result, response if block_given?
1303
+ return result
1304
+ end
1305
+ rescue ::Gapic::Rest::Error => e
1306
+ raise ::Google::Cloud::Error.from_error(e)
1307
+ end
1308
+
1192
1309
  ##
1193
1310
  # Configuration class for the TargetPools REST API.
1194
1311
  #
@@ -1219,9 +1336,9 @@ module Google
1219
1336
  # end
1220
1337
  #
1221
1338
  # @!attribute [rw] endpoint
1222
- # The hostname or hostname:port of the service endpoint.
1223
- # Defaults to `"compute.googleapis.com"`.
1224
- # @return [::String]
1339
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1340
+ # nil, indicating to use the default endpoint in the current universe domain.
1341
+ # @return [::String,nil]
1225
1342
  # @!attribute [rw] credentials
1226
1343
  # Credentials to send with calls. You may provide any of the following types:
1227
1344
  # * (`String`) The path to a service account key file in JSON format
@@ -1258,13 +1375,20 @@ module Google
1258
1375
  # @!attribute [rw] quota_project
1259
1376
  # A separate project against which to charge quota.
1260
1377
  # @return [::String]
1378
+ # @!attribute [rw] universe_domain
1379
+ # The universe domain within which to make requests. This determines the
1380
+ # default endpoint URL. The default value of nil uses the environment
1381
+ # universe (usually the default "googleapis.com" universe).
1382
+ # @return [::String,nil]
1261
1383
  #
1262
1384
  class Configuration
1263
1385
  extend ::Gapic::Config
1264
1386
 
1387
+ # @private
1388
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1265
1389
  DEFAULT_ENDPOINT = "compute.googleapis.com"
1266
1390
 
1267
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1391
+ config_attr :endpoint, nil, ::String, nil
1268
1392
  config_attr :credentials, nil do |value|
1269
1393
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1270
1394
  allowed.any? { |klass| klass === value }
@@ -1276,6 +1400,7 @@ module Google
1276
1400
  config_attr :metadata, nil, ::Hash, nil
1277
1401
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1278
1402
  config_attr :quota_project, nil, ::String, nil
1403
+ config_attr :universe_domain, nil, ::String, nil
1279
1404
 
1280
1405
  # @private
1281
1406
  def initialize parent_config = nil
@@ -1369,6 +1494,11 @@ module Google
1369
1494
  # @return [::Gapic::Config::Method]
1370
1495
  #
1371
1496
  attr_reader :set_backup
1497
+ ##
1498
+ # RPC-specific configuration for `set_security_policy`
1499
+ # @return [::Gapic::Config::Method]
1500
+ #
1501
+ attr_reader :set_security_policy
1372
1502
 
1373
1503
  # @private
1374
1504
  def initialize parent_rpcs = nil
@@ -1394,6 +1524,8 @@ module Google
1394
1524
  @remove_instance = ::Gapic::Config::Method.new remove_instance_config
1395
1525
  set_backup_config = parent_rpcs.set_backup if parent_rpcs.respond_to? :set_backup
1396
1526
  @set_backup = ::Gapic::Config::Method.new set_backup_config
1527
+ set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
1528
+ @set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
1397
1529
 
1398
1530
  yield self if block_given?
1399
1531
  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 add_health_check REST call
45
57
  #
@@ -458,6 +470,44 @@ module Google
458
470
  result
459
471
  end
460
472
 
473
+ ##
474
+ # Baseline implementation for the set_security_policy REST call
475
+ #
476
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
477
+ # A request object representing the call parameters. Required.
478
+ # @param options [::Gapic::CallOptions]
479
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
480
+ #
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Google::Cloud::Compute::V1::Operation]
486
+ # A result object deserialized from the server's reply
487
+ def set_security_policy request_pb, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
489
+
490
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_security_policy_request request_pb
491
+ query_string_params = if query_string_params.any?
492
+ query_string_params.to_h { |p| p.split "=", 2 }
493
+ else
494
+ {}
495
+ end
496
+
497
+ response = @client_stub.make_http_request(
498
+ verb,
499
+ uri: uri,
500
+ body: body || "",
501
+ params: query_string_params,
502
+ options: options
503
+ )
504
+ operation = ::Gapic::Rest::TransportOperation.new response
505
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
506
+
507
+ yield result, operation if block_given?
508
+ result
509
+ end
510
+
461
511
  ##
462
512
  # @private
463
513
  #
@@ -713,6 +763,30 @@ module Google
713
763
  )
714
764
  transcoder.transcode request_pb
715
765
  end
766
+
767
+ ##
768
+ # @private
769
+ #
770
+ # GRPC transcoding helper method for the set_security_policy REST call
771
+ #
772
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSecurityPolicyTargetPoolRequest]
773
+ # A request object representing the call parameters. Required.
774
+ # @return [Array(String, [String, nil], Hash{String => String})]
775
+ # Uri, Body, Query string parameters
776
+ def self.transcode_set_security_policy_request request_pb
777
+ transcoder = Gapic::Rest::GrpcTranscoder.new
778
+ .with_bindings(
779
+ uri_method: :post,
780
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/targetPools/{target_pool}/setSecurityPolicy",
781
+ body: "security_policy_reference_resource",
782
+ matches: [
783
+ ["project", %r{^[^/]+/?$}, false],
784
+ ["region", %r{^[^/]+/?$}, false],
785
+ ["target_pool", %r{^[^/]+/?$}, false]
786
+ ]
787
+ )
788
+ transcoder.transcode request_pb
789
+ end
716
790
  end
717
791
  end
718
792
  end
@@ -33,6 +33,9 @@ module Google
33
33
  # The TargetSslProxies API.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
36
39
  # @private
37
40
  attr_reader :target_ssl_proxies_stub
38
41
 
@@ -115,6 +118,15 @@ module Google
115
118
  @config
116
119
  end
117
120
 
121
+ ##
122
+ # The effective universe domain
123
+ #
124
+ # @return [String]
125
+ #
126
+ def universe_domain
127
+ @target_ssl_proxies_stub.universe_domain
128
+ end
129
+
118
130
  ##
119
131
  # Create a new TargetSslProxies REST client object.
120
132
  #
@@ -142,8 +154,9 @@ module Google
142
154
  credentials = @config.credentials
143
155
  # Use self-signed JWT if the endpoint is unchanged from default,
144
156
  # but only if the default endpoint does not have a region prefix.
145
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
146
- !@config.endpoint.split(".").first.include?("-")
157
+ enable_self_signed_jwt = @config.endpoint.nil? ||
158
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
159
+ !@config.endpoint.split(".").first.include?("-"))
147
160
  credentials ||= Credentials.default scope: @config.scope,
148
161
  enable_self_signed_jwt: enable_self_signed_jwt
149
162
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -157,9 +170,15 @@ module Google
157
170
  config.credentials = credentials
158
171
  config.quota_project = @quota_project_id
159
172
  config.endpoint = @config.endpoint
173
+ config.universe_domain = @config.universe_domain
160
174
  end
161
175
 
162
- @target_ssl_proxies_stub = ::Google::Cloud::Compute::V1::TargetSslProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
176
+ @target_ssl_proxies_stub = ::Google::Cloud::Compute::V1::TargetSslProxies::Rest::ServiceStub.new(
177
+ endpoint: @config.endpoint,
178
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
179
+ universe_domain: @config.universe_domain,
180
+ credentials: credentials
181
+ )
163
182
  end
164
183
 
165
184
  ##
@@ -450,7 +469,7 @@ module Google
450
469
  # the default parameter values, pass an empty Hash as a request object (see above).
451
470
  #
452
471
  # @param filter [::String]
453
- # 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`.
472
+ # 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.
454
473
  # @param max_results [::Integer]
455
474
  # 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`)
456
475
  # @param order_by [::String]
@@ -1010,9 +1029,9 @@ module Google
1010
1029
  # end
1011
1030
  #
1012
1031
  # @!attribute [rw] endpoint
1013
- # The hostname or hostname:port of the service endpoint.
1014
- # Defaults to `"compute.googleapis.com"`.
1015
- # @return [::String]
1032
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1033
+ # nil, indicating to use the default endpoint in the current universe domain.
1034
+ # @return [::String,nil]
1016
1035
  # @!attribute [rw] credentials
1017
1036
  # Credentials to send with calls. You may provide any of the following types:
1018
1037
  # * (`String`) The path to a service account key file in JSON format
@@ -1049,13 +1068,20 @@ module Google
1049
1068
  # @!attribute [rw] quota_project
1050
1069
  # A separate project against which to charge quota.
1051
1070
  # @return [::String]
1071
+ # @!attribute [rw] universe_domain
1072
+ # The universe domain within which to make requests. This determines the
1073
+ # default endpoint URL. The default value of nil uses the environment
1074
+ # universe (usually the default "googleapis.com" universe).
1075
+ # @return [::String,nil]
1052
1076
  #
1053
1077
  class Configuration
1054
1078
  extend ::Gapic::Config
1055
1079
 
1080
+ # @private
1081
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1056
1082
  DEFAULT_ENDPOINT = "compute.googleapis.com"
1057
1083
 
1058
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1084
+ config_attr :endpoint, nil, ::String, nil
1059
1085
  config_attr :credentials, nil do |value|
1060
1086
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1061
1087
  allowed.any? { |klass| klass === value }
@@ -1067,6 +1093,7 @@ module Google
1067
1093
  config_attr :metadata, nil, ::Hash, nil
1068
1094
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1069
1095
  config_attr :quota_project, nil, ::String, nil
1096
+ config_attr :universe_domain, nil, ::String, nil
1070
1097
 
1071
1098
  # @private
1072
1099
  def initialize parent_config = nil
@@ -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 delete REST call
45
57
  #