google-cloud-compute-v1 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +181 -14
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +330 -20
  4. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +64 -0
  5. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  7. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  8. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  9. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +198 -23
  13. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  14. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/compute_pb.rb +281 -25
  16. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +390 -42
  23. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  24. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  25. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  26. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  27. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  28. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  29. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  32. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  33. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +217 -10
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +63 -0
  35. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  36. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  37. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  38. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  39. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  40. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  41. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  42. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  43. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  44. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +473 -40
  47. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +64 -0
  48. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  49. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  50. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1144 -99
  51. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +127 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  53. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  54. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  55. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  56. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  58. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  59. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  60. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  61. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  62. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  63. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  64. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  65. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  66. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  67. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  68. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  69. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  70. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  71. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  72. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  73. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  74. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  75. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  77. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  78. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  79. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  80. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  81. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  82. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  83. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  84. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  85. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  86. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  87. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  88. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  89. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  90. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1268 -0
  92. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +521 -0
  93. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  94. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  95. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  96. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +269 -29
  97. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  98. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  99. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  100. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  101. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  102. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  103. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  104. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  105. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  112. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +280 -14
  113. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +64 -0
  114. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  115. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  116. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  117. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  118. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  120. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  121. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  123. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  124. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  125. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  126. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  127. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  128. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  129. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  130. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  131. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  132. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  133. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  134. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  135. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  136. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  137. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  138. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  139. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  140. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  142. data/lib/google/cloud/compute/v1/rest.rb +10 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  144. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  145. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  146. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  147. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +234 -22
  148. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  149. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +130 -13
  150. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  151. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  152. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  153. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  154. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  155. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  156. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  157. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  158. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +320 -20
  159. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +64 -0
  160. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +387 -26
  161. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +64 -0
  162. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  163. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  164. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  165. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  166. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  167. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  168. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  169. data/lib/google/cloud/compute/v1/version.rb +1 -1
  170. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  171. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  172. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  173. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  174. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  175. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  176. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  177. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  178. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  179. data/lib/google/cloud/compute/v1.rb +10 -0
  180. data/proto_docs/google/api/client.rb +149 -29
  181. data/proto_docs/google/cloud/compute/v1/compute.rb +44226 -5514
  182. metadata +52 -2
@@ -0,0 +1,1268 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/region_composite_health_checks/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module RegionCompositeHealthChecks
29
+ module Rest
30
+ ##
31
+ # REST client for the RegionCompositeHealthChecks service.
32
+ #
33
+ # The RegionCompositeHealthChecks API.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
41
+
42
+ # @private
43
+ attr_reader :region_composite_health_checks_stub
44
+
45
+ ##
46
+ # Configure the RegionCompositeHealthChecks Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all RegionCompositeHealthChecks clients
54
+ # ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Compute", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.aggregated_list.timeout = 600.0
75
+ default_config.rpcs.aggregated_list.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
+ }
78
+
79
+ default_config.rpcs.delete.timeout = 600.0
80
+
81
+ default_config.rpcs.get.timeout = 600.0
82
+ default_config.rpcs.get.retry_policy = {
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
84
+ }
85
+
86
+ default_config.rpcs.insert.timeout = 600.0
87
+
88
+ default_config.rpcs.list.timeout = 600.0
89
+ default_config.rpcs.list.retry_policy = {
90
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
91
+ }
92
+
93
+ default_config.rpcs.patch.timeout = 600.0
94
+
95
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
96
+
97
+ default_config
98
+ end
99
+ yield @configure if block_given?
100
+ @configure
101
+ end
102
+
103
+ ##
104
+ # Configure the RegionCompositeHealthChecks Client instance.
105
+ #
106
+ # The configuration is set to the derived mode, meaning that values can be changed,
107
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
108
+ # should be made on {Client.configure}.
109
+ #
110
+ # See {::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client::Configuration}
111
+ # for a description of the configuration fields.
112
+ #
113
+ # @yield [config] Configure the Client client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ # @return [Client::Configuration]
117
+ #
118
+ def configure
119
+ yield @config if block_given?
120
+ @config
121
+ end
122
+
123
+ ##
124
+ # The effective universe domain
125
+ #
126
+ # @return [String]
127
+ #
128
+ def universe_domain
129
+ @region_composite_health_checks_stub.universe_domain
130
+ end
131
+
132
+ ##
133
+ # Create a new RegionCompositeHealthChecks REST client object.
134
+ #
135
+ # @example
136
+ #
137
+ # # Create a client using the default configuration
138
+ # client = ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
139
+ #
140
+ # # Create a client using a custom configuration
141
+ # client = ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new do |config|
142
+ # config.timeout = 10.0
143
+ # end
144
+ #
145
+ # @yield [config] Configure the RegionCompositeHealthChecks client.
146
+ # @yieldparam config [Client::Configuration]
147
+ #
148
+ def initialize
149
+ # Create the configuration object
150
+ @config = Configuration.new Client.configure
151
+
152
+ # Yield the configuration if needed
153
+ yield @config if block_given?
154
+
155
+ # Create credentials
156
+ credentials = @config.credentials
157
+ # Use self-signed JWT if the endpoint is unchanged from default,
158
+ # but only if the default endpoint does not have a region prefix.
159
+ enable_self_signed_jwt = @config.endpoint.nil? ||
160
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
161
+ !@config.endpoint.split(".").first.include?("-"))
162
+ credentials ||= Credentials.default scope: @config.scope,
163
+ enable_self_signed_jwt: enable_self_signed_jwt
164
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
165
+ credentials = Credentials.new credentials, scope: @config.scope
166
+ end
167
+
168
+ @quota_project_id = @config.quota_project
169
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
170
+
171
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
172
+ config.credentials = credentials
173
+ config.quota_project = @quota_project_id
174
+ config.endpoint = @config.endpoint
175
+ config.universe_domain = @config.universe_domain
176
+ end
177
+
178
+ @region_composite_health_checks_stub = ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::ServiceStub.new(
179
+ endpoint: @config.endpoint,
180
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
181
+ universe_domain: @config.universe_domain,
182
+ credentials: credentials,
183
+ logger: @config.logger
184
+ )
185
+
186
+ @region_composite_health_checks_stub.logger(stub: true)&.info do |entry|
187
+ entry.set_system_name
188
+ entry.set_service
189
+ entry.message = "Created client for #{entry.service}"
190
+ entry.set_credentials_fields credentials
191
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
192
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
193
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
194
+ end
195
+ end
196
+
197
+ ##
198
+ # Get the associated client for long-running operations via RegionOperations.
199
+ #
200
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
201
+ #
202
+ attr_reader :region_operations
203
+
204
+ ##
205
+ # The logger used for request/response debug logging.
206
+ #
207
+ # @return [Logger]
208
+ #
209
+ def logger
210
+ @region_composite_health_checks_stub.logger
211
+ end
212
+
213
+ # Service calls
214
+
215
+ ##
216
+ # Retrieves the list of all CompositeHealthCheck resources (all
217
+ # regional) available to the specified project.
218
+ #
219
+ # To prevent failure, it is recommended that you set the
220
+ # `returnPartialSuccess` parameter to `true`.
221
+ #
222
+ # @overload aggregated_list(request, options = nil)
223
+ # Pass arguments to `aggregated_list` via a request object, either of type
224
+ # {::Google::Cloud::Compute::V1::AggregatedListRegionCompositeHealthChecksRequest} or an equivalent Hash.
225
+ #
226
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListRegionCompositeHealthChecksRequest, ::Hash]
227
+ # A request object representing the call parameters. Required. To specify no
228
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
229
+ # @param options [::Gapic::CallOptions, ::Hash]
230
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
231
+ #
232
+ # @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)
233
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
234
+ # least one keyword argument is required. To specify no parameters, or to keep all
235
+ # the default parameter values, pass an empty Hash as a request object (see above).
236
+ #
237
+ # @param filter [::String]
238
+ # A filter expression that filters resources listed in the response. Most
239
+ # Compute resources support two types of filter expressions:
240
+ # expressions that support regular expressions and expressions that follow
241
+ # API improvement proposal AIP-160.
242
+ # These two types of filter expressions cannot be mixed in one request.
243
+ #
244
+ # If you want to use AIP-160, your expression must specify the field name, an
245
+ # operator, and the value that you want to use for filtering. The value
246
+ # must be a string, a number, or a boolean. The operator
247
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
248
+ #
249
+ # For example, if you are filtering Compute Engine instances, you can
250
+ # exclude instances named `example-instance` by specifying
251
+ # `name != example-instance`.
252
+ #
253
+ # The `:*` comparison can be used to test whether a key has been defined.
254
+ # For example, to find all objects with `owner` label use:
255
+ # ```
256
+ # labels.owner:*
257
+ # ```
258
+ #
259
+ # You can also filter nested fields. For example, you could specify
260
+ # `scheduling.automaticRestart = false` to include instances only
261
+ # if they are not scheduled for automatic restarts. You can use filtering
262
+ # on nested fields to filter based onresource labels.
263
+ #
264
+ # To filter on multiple expressions, provide each separate expression within
265
+ # parentheses. For example:
266
+ # ```
267
+ # (scheduling.automaticRestart = true)
268
+ # (cpuPlatform = "Intel Skylake")
269
+ # ```
270
+ # By default, each expression is an `AND` expression. However, you
271
+ # can include `AND` and `OR` expressions explicitly.
272
+ # For example:
273
+ # ```
274
+ # (cpuPlatform = "Intel Skylake") OR
275
+ # (cpuPlatform = "Intel Broadwell") AND
276
+ # (scheduling.automaticRestart = true)
277
+ # ```
278
+ #
279
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
280
+ # (not equal) operator against a single un-parenthesized expression with or
281
+ # without quotes or against multiple parenthesized expressions. Examples:
282
+ #
283
+ # `fieldname eq unquoted literal`
284
+ # `fieldname eq 'single quoted literal'`
285
+ # `fieldname eq "double quoted literal"`
286
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
287
+ #
288
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
289
+ # The literal value must match the entire field.
290
+ #
291
+ # For example, to filter for instances that do not end with name "instance",
292
+ # you would use `name ne .*instance`.
293
+ #
294
+ # You cannot combine constraints on multiple fields using regular
295
+ # expressions.
296
+ # @param include_all_scopes [::Boolean]
297
+ # Indicates whether every visible scope for each scope type (zone, region,
298
+ # global) should be included in the response. For new resource types added
299
+ # after this field, the flag has no effect as new resource types will always
300
+ # include every visible scope for each scope type in response. For resource
301
+ # types which predate this field, if this flag is omitted or false, only
302
+ # scopes of the scope types where the resource type is expected to be found
303
+ # will be included.
304
+ # @param max_results [::Integer]
305
+ # The maximum number of results per page that should be returned.
306
+ # If the number of available results is larger than `maxResults`,
307
+ # Compute Engine returns a `nextPageToken` that can be used to get
308
+ # the next page of results in subsequent list requests. Acceptable values are
309
+ # `0` to `500`, inclusive. (Default: `500`)
310
+ # @param order_by [::String]
311
+ # Sorts list results by a certain order. By default, results
312
+ # are returned in alphanumerical order based on the resource name.
313
+ #
314
+ # You can also sort results in descending order based on the creation
315
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
316
+ # results based on the `creationTimestamp` field in
317
+ # reverse chronological order (newest result first). Use this to sort
318
+ # resources like operations so that the newest operation is returned first.
319
+ #
320
+ # Currently, only sorting by `name` or
321
+ # `creationTimestamp desc` is supported.
322
+ # @param page_token [::String]
323
+ # Specifies a page token to use. Set `pageToken` to the
324
+ # `nextPageToken` returned by a previous list request to get
325
+ # the next page of results.
326
+ # @param project [::String]
327
+ # Name of the project scoping this request.
328
+ # @param return_partial_success [::Boolean]
329
+ # Opt-in for partial success behavior which provides partial results in case
330
+ # of failure. The default value is false.
331
+ #
332
+ # For example, when partial success behavior is enabled, aggregatedList for a
333
+ # single zone scope either returns all resources in the zone or no resources,
334
+ # with an error code.
335
+ # @param service_project_number [::Integer]
336
+ # The Shared VPC service project id or service project number for which
337
+ # aggregated list request is invoked for subnetworks list-usable api.
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::CompositeHealthChecksScopedList>]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::CompositeHealthChecksScopedList>]
343
+ #
344
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
345
+ #
346
+ # @example Basic example
347
+ # require "google/cloud/compute/v1"
348
+ #
349
+ # # Create a client object. The client can be reused for multiple calls.
350
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
351
+ #
352
+ # # Create a request. To set request fields, pass in keyword arguments.
353
+ # request = Google::Cloud::Compute::V1::AggregatedListRegionCompositeHealthChecksRequest.new
354
+ #
355
+ # # Call the aggregated_list method.
356
+ # result = client.aggregated_list request
357
+ #
358
+ # # The returned object is of type Google::Cloud::Compute::V1::CompositeHealthCheckAggregatedList.
359
+ # p result
360
+ #
361
+ def aggregated_list request, options = nil
362
+ raise ::ArgumentError, "request must be provided" if request.nil?
363
+
364
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListRegionCompositeHealthChecksRequest
365
+
366
+ # Converts hash and nil to an options object
367
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
368
+
369
+ # Customize the options with defaults
370
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
371
+
372
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
373
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
374
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
375
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
376
+ transports_version_send: [:rest]
377
+
378
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
379
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
380
+
381
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
382
+ metadata: call_metadata,
383
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
384
+
385
+ options.apply_defaults timeout: @config.timeout,
386
+ metadata: @config.metadata,
387
+ retry_policy: @config.retry_policy
388
+
389
+ @region_composite_health_checks_stub.aggregated_list request, options do |result, operation|
390
+ result = ::Gapic::Rest::PagedEnumerable.new @region_composite_health_checks_stub, :aggregated_list, "items", request, result, options
391
+ yield result, operation if block_given?
392
+ throw :response, result
393
+ end
394
+ rescue ::Gapic::Rest::Error => e
395
+ raise ::Google::Cloud::Error.from_error(e)
396
+ end
397
+
398
+ ##
399
+ # Deletes the specified CompositeHealthCheck in the given region
400
+ #
401
+ # @overload delete(request, options = nil)
402
+ # Pass arguments to `delete` via a request object, either of type
403
+ # {::Google::Cloud::Compute::V1::DeleteRegionCompositeHealthCheckRequest} or an equivalent Hash.
404
+ #
405
+ # @param request [::Google::Cloud::Compute::V1::DeleteRegionCompositeHealthCheckRequest, ::Hash]
406
+ # A request object representing the call parameters. Required. To specify no
407
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
408
+ # @param options [::Gapic::CallOptions, ::Hash]
409
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
410
+ #
411
+ # @overload delete(composite_health_check: nil, project: nil, region: nil, request_id: nil)
412
+ # Pass arguments to `delete` via keyword arguments. Note that at
413
+ # least one keyword argument is required. To specify no parameters, or to keep all
414
+ # the default parameter values, pass an empty Hash as a request object (see above).
415
+ #
416
+ # @param composite_health_check [::String]
417
+ # Name of the CompositeHealthCheck resource to delete.
418
+ # @param project [::String]
419
+ # Project ID for this request.
420
+ # @param region [::String]
421
+ # Name of the region scoping this request.
422
+ # @param request_id [::String]
423
+ # An optional request ID to identify requests. Specify a unique request ID so
424
+ # that if you must retry your request, the server will know to ignore the
425
+ # request if it has already been completed.
426
+ #
427
+ # For example, consider a situation where you make an initial request and
428
+ # the request times out. If you make the request again with the same
429
+ # request ID, the server can check if original operation with the same
430
+ # request ID was received, and if so, will ignore the second request. This
431
+ # prevents clients from accidentally creating duplicate commitments.
432
+ #
433
+ # The request ID must be
434
+ # a valid UUID with the exception that zero UUID is not supported
435
+ # (00000000-0000-0000-0000-000000000000).
436
+ # @yield [result, operation] Access the result along with the TransportOperation object
437
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
438
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
439
+ #
440
+ # @return [::Gapic::GenericLRO::Operation]
441
+ #
442
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
443
+ #
444
+ # @example Basic example
445
+ # require "google/cloud/compute/v1"
446
+ #
447
+ # # Create a client object. The client can be reused for multiple calls.
448
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
449
+ #
450
+ # # Create a request. To set request fields, pass in keyword arguments.
451
+ # request = Google::Cloud::Compute::V1::DeleteRegionCompositeHealthCheckRequest.new
452
+ #
453
+ # # Call the delete method.
454
+ # result = client.delete request
455
+ #
456
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
457
+ # p result
458
+ #
459
+ def delete request, options = nil
460
+ raise ::ArgumentError, "request must be provided" if request.nil?
461
+
462
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteRegionCompositeHealthCheckRequest
463
+
464
+ # Converts hash and nil to an options object
465
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
466
+
467
+ # Customize the options with defaults
468
+ call_metadata = @config.rpcs.delete.metadata.to_h
469
+
470
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
471
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
472
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
473
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
474
+ transports_version_send: [:rest]
475
+
476
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
477
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
478
+
479
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
480
+ metadata: call_metadata,
481
+ retry_policy: @config.rpcs.delete.retry_policy
482
+
483
+ options.apply_defaults timeout: @config.timeout,
484
+ metadata: @config.metadata,
485
+ retry_policy: @config.retry_policy
486
+
487
+ @region_composite_health_checks_stub.delete request, options do |result, response|
488
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
489
+ operation: result,
490
+ client: region_operations,
491
+ request_values: {
492
+ "project" => request.project,
493
+ "region" => request.region
494
+ },
495
+ options: options
496
+ )
497
+ yield result, response if block_given?
498
+ throw :response, result
499
+ end
500
+ rescue ::Gapic::Rest::Error => e
501
+ raise ::Google::Cloud::Error.from_error(e)
502
+ end
503
+
504
+ ##
505
+ # Returns the specified CompositeHealthCheck resource in the given region.
506
+ #
507
+ # @overload get(request, options = nil)
508
+ # Pass arguments to `get` via a request object, either of type
509
+ # {::Google::Cloud::Compute::V1::GetRegionCompositeHealthCheckRequest} or an equivalent Hash.
510
+ #
511
+ # @param request [::Google::Cloud::Compute::V1::GetRegionCompositeHealthCheckRequest, ::Hash]
512
+ # A request object representing the call parameters. Required. To specify no
513
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
514
+ # @param options [::Gapic::CallOptions, ::Hash]
515
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
516
+ #
517
+ # @overload get(composite_health_check: nil, project: nil, region: nil)
518
+ # Pass arguments to `get` via keyword arguments. Note that at
519
+ # least one keyword argument is required. To specify no parameters, or to keep all
520
+ # the default parameter values, pass an empty Hash as a request object (see above).
521
+ #
522
+ # @param composite_health_check [::String]
523
+ # Name of the CompositeHealthCheck resource to return.
524
+ # @param project [::String]
525
+ # Project ID for this request.
526
+ # @param region [::String]
527
+ # Name of the region scoping this request.
528
+ # @yield [result, operation] Access the result along with the TransportOperation object
529
+ # @yieldparam result [::Google::Cloud::Compute::V1::CompositeHealthCheck]
530
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
531
+ #
532
+ # @return [::Google::Cloud::Compute::V1::CompositeHealthCheck]
533
+ #
534
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
535
+ #
536
+ # @example Basic example
537
+ # require "google/cloud/compute/v1"
538
+ #
539
+ # # Create a client object. The client can be reused for multiple calls.
540
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
541
+ #
542
+ # # Create a request. To set request fields, pass in keyword arguments.
543
+ # request = Google::Cloud::Compute::V1::GetRegionCompositeHealthCheckRequest.new
544
+ #
545
+ # # Call the get method.
546
+ # result = client.get request
547
+ #
548
+ # # The returned object is of type Google::Cloud::Compute::V1::CompositeHealthCheck.
549
+ # p result
550
+ #
551
+ def get request, options = nil
552
+ raise ::ArgumentError, "request must be provided" if request.nil?
553
+
554
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetRegionCompositeHealthCheckRequest
555
+
556
+ # Converts hash and nil to an options object
557
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
558
+
559
+ # Customize the options with defaults
560
+ call_metadata = @config.rpcs.get.metadata.to_h
561
+
562
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
563
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
564
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
565
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
566
+ transports_version_send: [:rest]
567
+
568
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
569
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
570
+
571
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
572
+ metadata: call_metadata,
573
+ retry_policy: @config.rpcs.get.retry_policy
574
+
575
+ options.apply_defaults timeout: @config.timeout,
576
+ metadata: @config.metadata,
577
+ retry_policy: @config.retry_policy
578
+
579
+ @region_composite_health_checks_stub.get request, options do |result, operation|
580
+ yield result, operation if block_given?
581
+ end
582
+ rescue ::Gapic::Rest::Error => e
583
+ raise ::Google::Cloud::Error.from_error(e)
584
+ end
585
+
586
+ ##
587
+ # Create a CompositeHealthCheck in the specified project in the given region
588
+ # using the parameters that are included in the request.
589
+ #
590
+ # @overload insert(request, options = nil)
591
+ # Pass arguments to `insert` via a request object, either of type
592
+ # {::Google::Cloud::Compute::V1::InsertRegionCompositeHealthCheckRequest} or an equivalent Hash.
593
+ #
594
+ # @param request [::Google::Cloud::Compute::V1::InsertRegionCompositeHealthCheckRequest, ::Hash]
595
+ # A request object representing the call parameters. Required. To specify no
596
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
597
+ # @param options [::Gapic::CallOptions, ::Hash]
598
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
599
+ #
600
+ # @overload insert(composite_health_check_resource: nil, project: nil, region: nil, request_id: nil)
601
+ # Pass arguments to `insert` via keyword arguments. Note that at
602
+ # least one keyword argument is required. To specify no parameters, or to keep all
603
+ # the default parameter values, pass an empty Hash as a request object (see above).
604
+ #
605
+ # @param composite_health_check_resource [::Google::Cloud::Compute::V1::CompositeHealthCheck, ::Hash]
606
+ # The body resource for this request
607
+ # @param project [::String]
608
+ # Project ID for this request.
609
+ # @param region [::String]
610
+ # Name of the region scoping this request.
611
+ # @param request_id [::String]
612
+ # An optional request ID to identify requests. Specify a unique request ID so
613
+ # that if you must retry your request, the server will know to ignore the
614
+ # request if it has already been completed.
615
+ #
616
+ # For example, consider a situation where you make an initial request and
617
+ # the request times out. If you make the request again with the same
618
+ # request ID, the server can check if original operation with the same
619
+ # request ID was received, and if so, will ignore the second request. This
620
+ # prevents clients from accidentally creating duplicate commitments.
621
+ #
622
+ # The request ID must be
623
+ # a valid UUID with the exception that zero UUID is not supported
624
+ # (00000000-0000-0000-0000-000000000000).
625
+ # @yield [result, operation] Access the result along with the TransportOperation object
626
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
627
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
628
+ #
629
+ # @return [::Gapic::GenericLRO::Operation]
630
+ #
631
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
632
+ #
633
+ # @example Basic example
634
+ # require "google/cloud/compute/v1"
635
+ #
636
+ # # Create a client object. The client can be reused for multiple calls.
637
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
638
+ #
639
+ # # Create a request. To set request fields, pass in keyword arguments.
640
+ # request = Google::Cloud::Compute::V1::InsertRegionCompositeHealthCheckRequest.new
641
+ #
642
+ # # Call the insert method.
643
+ # result = client.insert request
644
+ #
645
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
646
+ # p result
647
+ #
648
+ def insert request, options = nil
649
+ raise ::ArgumentError, "request must be provided" if request.nil?
650
+
651
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertRegionCompositeHealthCheckRequest
652
+
653
+ # Converts hash and nil to an options object
654
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
655
+
656
+ # Customize the options with defaults
657
+ call_metadata = @config.rpcs.insert.metadata.to_h
658
+
659
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
660
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
661
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
662
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
663
+ transports_version_send: [:rest]
664
+
665
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
666
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
667
+
668
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
669
+ metadata: call_metadata,
670
+ retry_policy: @config.rpcs.insert.retry_policy
671
+
672
+ options.apply_defaults timeout: @config.timeout,
673
+ metadata: @config.metadata,
674
+ retry_policy: @config.retry_policy
675
+
676
+ @region_composite_health_checks_stub.insert request, options do |result, response|
677
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
678
+ operation: result,
679
+ client: region_operations,
680
+ request_values: {
681
+ "project" => request.project,
682
+ "region" => request.region
683
+ },
684
+ options: options
685
+ )
686
+ yield result, response if block_given?
687
+ throw :response, result
688
+ end
689
+ rescue ::Gapic::Rest::Error => e
690
+ raise ::Google::Cloud::Error.from_error(e)
691
+ end
692
+
693
+ ##
694
+ # Lists the CompositeHealthChecks for a project in the given region.
695
+ #
696
+ # @overload list(request, options = nil)
697
+ # Pass arguments to `list` via a request object, either of type
698
+ # {::Google::Cloud::Compute::V1::ListRegionCompositeHealthChecksRequest} or an equivalent Hash.
699
+ #
700
+ # @param request [::Google::Cloud::Compute::V1::ListRegionCompositeHealthChecksRequest, ::Hash]
701
+ # A request object representing the call parameters. Required. To specify no
702
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
703
+ # @param options [::Gapic::CallOptions, ::Hash]
704
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
705
+ #
706
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
707
+ # Pass arguments to `list` via keyword arguments. Note that at
708
+ # least one keyword argument is required. To specify no parameters, or to keep all
709
+ # the default parameter values, pass an empty Hash as a request object (see above).
710
+ #
711
+ # @param filter [::String]
712
+ # A filter expression that filters resources listed in the response. Most
713
+ # Compute resources support two types of filter expressions:
714
+ # expressions that support regular expressions and expressions that follow
715
+ # API improvement proposal AIP-160.
716
+ # These two types of filter expressions cannot be mixed in one request.
717
+ #
718
+ # If you want to use AIP-160, your expression must specify the field name, an
719
+ # operator, and the value that you want to use for filtering. The value
720
+ # must be a string, a number, or a boolean. The operator
721
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
722
+ #
723
+ # For example, if you are filtering Compute Engine instances, you can
724
+ # exclude instances named `example-instance` by specifying
725
+ # `name != example-instance`.
726
+ #
727
+ # The `:*` comparison can be used to test whether a key has been defined.
728
+ # For example, to find all objects with `owner` label use:
729
+ # ```
730
+ # labels.owner:*
731
+ # ```
732
+ #
733
+ # You can also filter nested fields. For example, you could specify
734
+ # `scheduling.automaticRestart = false` to include instances only
735
+ # if they are not scheduled for automatic restarts. You can use filtering
736
+ # on nested fields to filter based onresource labels.
737
+ #
738
+ # To filter on multiple expressions, provide each separate expression within
739
+ # parentheses. For example:
740
+ # ```
741
+ # (scheduling.automaticRestart = true)
742
+ # (cpuPlatform = "Intel Skylake")
743
+ # ```
744
+ # By default, each expression is an `AND` expression. However, you
745
+ # can include `AND` and `OR` expressions explicitly.
746
+ # For example:
747
+ # ```
748
+ # (cpuPlatform = "Intel Skylake") OR
749
+ # (cpuPlatform = "Intel Broadwell") AND
750
+ # (scheduling.automaticRestart = true)
751
+ # ```
752
+ #
753
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
754
+ # (not equal) operator against a single un-parenthesized expression with or
755
+ # without quotes or against multiple parenthesized expressions. Examples:
756
+ #
757
+ # `fieldname eq unquoted literal`
758
+ # `fieldname eq 'single quoted literal'`
759
+ # `fieldname eq "double quoted literal"`
760
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
761
+ #
762
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
763
+ # The literal value must match the entire field.
764
+ #
765
+ # For example, to filter for instances that do not end with name "instance",
766
+ # you would use `name ne .*instance`.
767
+ #
768
+ # You cannot combine constraints on multiple fields using regular
769
+ # expressions.
770
+ # @param max_results [::Integer]
771
+ # The maximum number of results per page that should be returned.
772
+ # If the number of available results is larger than `maxResults`,
773
+ # Compute Engine returns a `nextPageToken` that can be used to get
774
+ # the next page of results in subsequent list requests. Acceptable values are
775
+ # `0` to `500`, inclusive. (Default: `500`)
776
+ # @param order_by [::String]
777
+ # Sorts list results by a certain order. By default, results
778
+ # are returned in alphanumerical order based on the resource name.
779
+ #
780
+ # You can also sort results in descending order based on the creation
781
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
782
+ # results based on the `creationTimestamp` field in
783
+ # reverse chronological order (newest result first). Use this to sort
784
+ # resources like operations so that the newest operation is returned first.
785
+ #
786
+ # Currently, only sorting by `name` or
787
+ # `creationTimestamp desc` is supported.
788
+ # @param page_token [::String]
789
+ # Specifies a page token to use. Set `pageToken` to the
790
+ # `nextPageToken` returned by a previous list request to get
791
+ # the next page of results.
792
+ # @param project [::String]
793
+ # Project ID for this request.
794
+ # @param region [::String]
795
+ # Name of the region scoping this request.
796
+ # @param return_partial_success [::Boolean]
797
+ # Opt-in for partial success behavior which provides partial results in case
798
+ # of failure. The default value is false.
799
+ #
800
+ # For example, when partial success behavior is enabled, aggregatedList for a
801
+ # single zone scope either returns all resources in the zone or no resources,
802
+ # with an error code.
803
+ # @yield [result, operation] Access the result along with the TransportOperation object
804
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::CompositeHealthCheck>]
805
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
806
+ #
807
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::CompositeHealthCheck>]
808
+ #
809
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
810
+ #
811
+ # @example Basic example
812
+ # require "google/cloud/compute/v1"
813
+ #
814
+ # # Create a client object. The client can be reused for multiple calls.
815
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
816
+ #
817
+ # # Create a request. To set request fields, pass in keyword arguments.
818
+ # request = Google::Cloud::Compute::V1::ListRegionCompositeHealthChecksRequest.new
819
+ #
820
+ # # Call the list method.
821
+ # result = client.list request
822
+ #
823
+ # # The returned object is of type Google::Cloud::Compute::V1::CompositeHealthCheckList.
824
+ # p result
825
+ #
826
+ def list request, options = nil
827
+ raise ::ArgumentError, "request must be provided" if request.nil?
828
+
829
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListRegionCompositeHealthChecksRequest
830
+
831
+ # Converts hash and nil to an options object
832
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
833
+
834
+ # Customize the options with defaults
835
+ call_metadata = @config.rpcs.list.metadata.to_h
836
+
837
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
838
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
839
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
840
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
841
+ transports_version_send: [:rest]
842
+
843
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
844
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
845
+
846
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
847
+ metadata: call_metadata,
848
+ retry_policy: @config.rpcs.list.retry_policy
849
+
850
+ options.apply_defaults timeout: @config.timeout,
851
+ metadata: @config.metadata,
852
+ retry_policy: @config.retry_policy
853
+
854
+ @region_composite_health_checks_stub.list request, options do |result, operation|
855
+ result = ::Gapic::Rest::PagedEnumerable.new @region_composite_health_checks_stub, :list, "items", request, result, options
856
+ yield result, operation if block_given?
857
+ throw :response, result
858
+ end
859
+ rescue ::Gapic::Rest::Error => e
860
+ raise ::Google::Cloud::Error.from_error(e)
861
+ end
862
+
863
+ ##
864
+ # Updates the specified regional CompositeHealthCheck resource
865
+ # with the data included in the request. This method supportsPATCH
866
+ # semantics and uses theJSON merge
867
+ # patch format and processing rules.
868
+ #
869
+ # @overload patch(request, options = nil)
870
+ # Pass arguments to `patch` via a request object, either of type
871
+ # {::Google::Cloud::Compute::V1::PatchRegionCompositeHealthCheckRequest} or an equivalent Hash.
872
+ #
873
+ # @param request [::Google::Cloud::Compute::V1::PatchRegionCompositeHealthCheckRequest, ::Hash]
874
+ # A request object representing the call parameters. Required. To specify no
875
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
876
+ # @param options [::Gapic::CallOptions, ::Hash]
877
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
878
+ #
879
+ # @overload patch(composite_health_check: nil, composite_health_check_resource: nil, project: nil, region: nil, request_id: nil)
880
+ # Pass arguments to `patch` via keyword arguments. Note that at
881
+ # least one keyword argument is required. To specify no parameters, or to keep all
882
+ # the default parameter values, pass an empty Hash as a request object (see above).
883
+ #
884
+ # @param composite_health_check [::String]
885
+ # Name of the CompositeHealthCheck to update. The name
886
+ # must be 1-63 characters long, and comply with RFC1035.
887
+ # @param composite_health_check_resource [::Google::Cloud::Compute::V1::CompositeHealthCheck, ::Hash]
888
+ # The body resource for this request
889
+ # @param project [::String]
890
+ # Project ID for this request.
891
+ # @param region [::String]
892
+ # Name of the region scoping this request.
893
+ # @param request_id [::String]
894
+ # An optional request ID to identify requests. Specify a unique request ID so
895
+ # that if you must retry your request, the server will know to ignore the
896
+ # request if it has already been completed.
897
+ #
898
+ # For example, consider a situation where you make an initial request and
899
+ # the request times out. If you make the request again with the same
900
+ # request ID, the server can check if original operation with the same
901
+ # request ID was received, and if so, will ignore the second request. This
902
+ # prevents clients from accidentally creating duplicate commitments.
903
+ #
904
+ # The request ID must be
905
+ # a valid UUID with the exception that zero UUID is not supported
906
+ # (00000000-0000-0000-0000-000000000000).
907
+ # @yield [result, operation] Access the result along with the TransportOperation object
908
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
909
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
910
+ #
911
+ # @return [::Gapic::GenericLRO::Operation]
912
+ #
913
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
914
+ #
915
+ # @example Basic example
916
+ # require "google/cloud/compute/v1"
917
+ #
918
+ # # Create a client object. The client can be reused for multiple calls.
919
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
920
+ #
921
+ # # Create a request. To set request fields, pass in keyword arguments.
922
+ # request = Google::Cloud::Compute::V1::PatchRegionCompositeHealthCheckRequest.new
923
+ #
924
+ # # Call the patch method.
925
+ # result = client.patch request
926
+ #
927
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
928
+ # p result
929
+ #
930
+ def patch request, options = nil
931
+ raise ::ArgumentError, "request must be provided" if request.nil?
932
+
933
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionCompositeHealthCheckRequest
934
+
935
+ # Converts hash and nil to an options object
936
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
937
+
938
+ # Customize the options with defaults
939
+ call_metadata = @config.rpcs.patch.metadata.to_h
940
+
941
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
942
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
943
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
944
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
945
+ transports_version_send: [:rest]
946
+
947
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
948
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
+
950
+ options.apply_defaults timeout: @config.rpcs.patch.timeout,
951
+ metadata: call_metadata,
952
+ retry_policy: @config.rpcs.patch.retry_policy
953
+
954
+ options.apply_defaults timeout: @config.timeout,
955
+ metadata: @config.metadata,
956
+ retry_policy: @config.retry_policy
957
+
958
+ @region_composite_health_checks_stub.patch request, options do |result, response|
959
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
960
+ operation: result,
961
+ client: region_operations,
962
+ request_values: {
963
+ "project" => request.project,
964
+ "region" => request.region
965
+ },
966
+ options: options
967
+ )
968
+ yield result, response if block_given?
969
+ throw :response, result
970
+ end
971
+ rescue ::Gapic::Rest::Error => e
972
+ raise ::Google::Cloud::Error.from_error(e)
973
+ end
974
+
975
+ ##
976
+ # Returns permissions that a caller has on the specified resource.
977
+ #
978
+ # @overload test_iam_permissions(request, options = nil)
979
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
980
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsRegionCompositeHealthCheckRequest} or an equivalent Hash.
981
+ #
982
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsRegionCompositeHealthCheckRequest, ::Hash]
983
+ # A request object representing the call parameters. Required. To specify no
984
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
985
+ # @param options [::Gapic::CallOptions, ::Hash]
986
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
987
+ #
988
+ # @overload test_iam_permissions(project: nil, region: nil, resource: nil, test_permissions_request_resource: nil)
989
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
990
+ # least one keyword argument is required. To specify no parameters, or to keep all
991
+ # the default parameter values, pass an empty Hash as a request object (see above).
992
+ #
993
+ # @param project [::String]
994
+ # Project ID for this request.
995
+ # @param region [::String]
996
+ # The name of the region for this request.
997
+ # @param resource [::String]
998
+ # Name or id of the resource for this request.
999
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
1000
+ # The body resource for this request
1001
+ # @yield [result, operation] Access the result along with the TransportOperation object
1002
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1003
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1004
+ #
1005
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
1006
+ #
1007
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1008
+ #
1009
+ # @example Basic example
1010
+ # require "google/cloud/compute/v1"
1011
+ #
1012
+ # # Create a client object. The client can be reused for multiple calls.
1013
+ # client = Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new
1014
+ #
1015
+ # # Create a request. To set request fields, pass in keyword arguments.
1016
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsRegionCompositeHealthCheckRequest.new
1017
+ #
1018
+ # # Call the test_iam_permissions method.
1019
+ # result = client.test_iam_permissions request
1020
+ #
1021
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
1022
+ # p result
1023
+ #
1024
+ def test_iam_permissions request, options = nil
1025
+ raise ::ArgumentError, "request must be provided" if request.nil?
1026
+
1027
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsRegionCompositeHealthCheckRequest
1028
+
1029
+ # Converts hash and nil to an options object
1030
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1031
+
1032
+ # Customize the options with defaults
1033
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1034
+
1035
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1036
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1037
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1038
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1039
+ transports_version_send: [:rest]
1040
+
1041
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1042
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1043
+
1044
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1045
+ metadata: call_metadata,
1046
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1047
+
1048
+ options.apply_defaults timeout: @config.timeout,
1049
+ metadata: @config.metadata,
1050
+ retry_policy: @config.retry_policy
1051
+
1052
+ @region_composite_health_checks_stub.test_iam_permissions request, options do |result, operation|
1053
+ yield result, operation if block_given?
1054
+ end
1055
+ rescue ::Gapic::Rest::Error => e
1056
+ raise ::Google::Cloud::Error.from_error(e)
1057
+ end
1058
+
1059
+ ##
1060
+ # Configuration class for the RegionCompositeHealthChecks REST API.
1061
+ #
1062
+ # This class represents the configuration for RegionCompositeHealthChecks REST,
1063
+ # providing control over timeouts, retry behavior, logging, transport
1064
+ # parameters, and other low-level controls. Certain parameters can also be
1065
+ # applied individually to specific RPCs. See
1066
+ # {::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client::Configuration::Rpcs}
1067
+ # for a list of RPCs that can be configured independently.
1068
+ #
1069
+ # Configuration can be applied globally to all clients, or to a single client
1070
+ # on construction.
1071
+ #
1072
+ # @example
1073
+ #
1074
+ # # Modify the global config, setting the timeout for
1075
+ # # aggregated_list to 20 seconds,
1076
+ # # and all remaining timeouts to 10 seconds.
1077
+ # ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.configure do |config|
1078
+ # config.timeout = 10.0
1079
+ # config.rpcs.aggregated_list.timeout = 20.0
1080
+ # end
1081
+ #
1082
+ # # Apply the above configuration only to a new client.
1083
+ # client = ::Google::Cloud::Compute::V1::RegionCompositeHealthChecks::Rest::Client.new do |config|
1084
+ # config.timeout = 10.0
1085
+ # config.rpcs.aggregated_list.timeout = 20.0
1086
+ # end
1087
+ #
1088
+ # @!attribute [rw] endpoint
1089
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1090
+ # nil, indicating to use the default endpoint in the current universe domain.
1091
+ # @return [::String,nil]
1092
+ # @!attribute [rw] credentials
1093
+ # Credentials to send with calls. You may provide any of the following types:
1094
+ # * (`String`) The path to a service account key file in JSON format
1095
+ # * (`Hash`) A service account key as a Hash
1096
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1097
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1098
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1099
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1100
+ # * (`nil`) indicating no credentials
1101
+ #
1102
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1103
+ # external source for authentication to Google Cloud, you must validate it before
1104
+ # providing it to a Google API client library. Providing an unvalidated credential
1105
+ # configuration to Google APIs can compromise the security of your systems and data.
1106
+ # For more information, refer to [Validate credential configurations from external
1107
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1108
+ # @return [::Object]
1109
+ # @!attribute [rw] scope
1110
+ # The OAuth scopes
1111
+ # @return [::Array<::String>]
1112
+ # @!attribute [rw] lib_name
1113
+ # The library name as recorded in instrumentation and logging
1114
+ # @return [::String]
1115
+ # @!attribute [rw] lib_version
1116
+ # The library version as recorded in instrumentation and logging
1117
+ # @return [::String]
1118
+ # @!attribute [rw] timeout
1119
+ # The call timeout in seconds.
1120
+ # @return [::Numeric]
1121
+ # @!attribute [rw] metadata
1122
+ # Additional headers to be sent with the call.
1123
+ # @return [::Hash{::Symbol=>::String}]
1124
+ # @!attribute [rw] retry_policy
1125
+ # The retry policy. The value is a hash with the following keys:
1126
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1127
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1128
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1129
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1130
+ # trigger a retry.
1131
+ # @return [::Hash]
1132
+ # @!attribute [rw] quota_project
1133
+ # A separate project against which to charge quota.
1134
+ # @return [::String]
1135
+ # @!attribute [rw] universe_domain
1136
+ # The universe domain within which to make requests. This determines the
1137
+ # default endpoint URL. The default value of nil uses the environment
1138
+ # universe (usually the default "googleapis.com" universe).
1139
+ # @return [::String,nil]
1140
+ # @!attribute [rw] logger
1141
+ # A custom logger to use for request/response debug logging, or the value
1142
+ # `:default` (the default) to construct a default logger, or `nil` to
1143
+ # explicitly disable logging.
1144
+ # @return [::Logger,:default,nil]
1145
+ #
1146
+ class Configuration
1147
+ extend ::Gapic::Config
1148
+
1149
+ # @private
1150
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1151
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1152
+
1153
+ config_attr :endpoint, nil, ::String, nil
1154
+ config_attr :credentials, nil do |value|
1155
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1156
+ allowed.any? { |klass| klass === value }
1157
+ end
1158
+ config_attr :scope, nil, ::String, ::Array, nil
1159
+ config_attr :lib_name, nil, ::String, nil
1160
+ config_attr :lib_version, nil, ::String, nil
1161
+ config_attr :timeout, nil, ::Numeric, nil
1162
+ config_attr :metadata, nil, ::Hash, nil
1163
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1164
+ config_attr :quota_project, nil, ::String, nil
1165
+ config_attr :universe_domain, nil, ::String, nil
1166
+ config_attr :logger, :default, ::Logger, nil, :default
1167
+
1168
+ # @private
1169
+ def initialize parent_config = nil
1170
+ @parent_config = parent_config unless parent_config.nil?
1171
+
1172
+ yield self if block_given?
1173
+ end
1174
+
1175
+ ##
1176
+ # Configurations for individual RPCs
1177
+ # @return [Rpcs]
1178
+ #
1179
+ def rpcs
1180
+ @rpcs ||= begin
1181
+ parent_rpcs = nil
1182
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1183
+ Rpcs.new parent_rpcs
1184
+ end
1185
+ end
1186
+
1187
+ ##
1188
+ # Configuration RPC class for the RegionCompositeHealthChecks API.
1189
+ #
1190
+ # Includes fields providing the configuration for each RPC in this service.
1191
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1192
+ # the following configuration fields:
1193
+ #
1194
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1195
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1196
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1197
+ # include the following keys:
1198
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1199
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1200
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1201
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1202
+ # trigger a retry.
1203
+ #
1204
+ class Rpcs
1205
+ ##
1206
+ # RPC-specific configuration for `aggregated_list`
1207
+ # @return [::Gapic::Config::Method]
1208
+ #
1209
+ attr_reader :aggregated_list
1210
+ ##
1211
+ # RPC-specific configuration for `delete`
1212
+ # @return [::Gapic::Config::Method]
1213
+ #
1214
+ attr_reader :delete
1215
+ ##
1216
+ # RPC-specific configuration for `get`
1217
+ # @return [::Gapic::Config::Method]
1218
+ #
1219
+ attr_reader :get
1220
+ ##
1221
+ # RPC-specific configuration for `insert`
1222
+ # @return [::Gapic::Config::Method]
1223
+ #
1224
+ attr_reader :insert
1225
+ ##
1226
+ # RPC-specific configuration for `list`
1227
+ # @return [::Gapic::Config::Method]
1228
+ #
1229
+ attr_reader :list
1230
+ ##
1231
+ # RPC-specific configuration for `patch`
1232
+ # @return [::Gapic::Config::Method]
1233
+ #
1234
+ attr_reader :patch
1235
+ ##
1236
+ # RPC-specific configuration for `test_iam_permissions`
1237
+ # @return [::Gapic::Config::Method]
1238
+ #
1239
+ attr_reader :test_iam_permissions
1240
+
1241
+ # @private
1242
+ def initialize parent_rpcs = nil
1243
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1244
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1245
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
1246
+ @delete = ::Gapic::Config::Method.new delete_config
1247
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
1248
+ @get = ::Gapic::Config::Method.new get_config
1249
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
1250
+ @insert = ::Gapic::Config::Method.new insert_config
1251
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
1252
+ @list = ::Gapic::Config::Method.new list_config
1253
+ patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
1254
+ @patch = ::Gapic::Config::Method.new patch_config
1255
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1256
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1257
+
1258
+ yield self if block_given?
1259
+ end
1260
+ end
1261
+ end
1262
+ end
1263
+ end
1264
+ end
1265
+ end
1266
+ end
1267
+ end
1268
+ end