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
@@ -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
  #
@@ -33,6 +33,9 @@ module Google
33
33
  # The RegionSecurityPolicies API.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
36
39
  # @private
37
40
  attr_reader :region_security_policies_stub
38
41
 
@@ -65,6 +68,8 @@ module Google
65
68
  end
66
69
  default_config = Client::Configuration.new parent_config
67
70
 
71
+ default_config.rpcs.add_rule.timeout = 600.0
72
+
68
73
  default_config.rpcs.delete.timeout = 600.0
69
74
 
70
75
  default_config.rpcs.get.timeout = 600.0
@@ -72,6 +77,11 @@ module Google
72
77
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
78
  }
74
79
 
80
+ default_config.rpcs.get_rule.timeout = 600.0
81
+ default_config.rpcs.get_rule.retry_policy = {
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
83
+ }
84
+
75
85
  default_config.rpcs.insert.timeout = 600.0
76
86
 
77
87
  default_config.rpcs.list.timeout = 600.0
@@ -81,6 +91,10 @@ module Google
81
91
 
82
92
  default_config.rpcs.patch.timeout = 600.0
83
93
 
94
+ default_config.rpcs.patch_rule.timeout = 600.0
95
+
96
+ default_config.rpcs.remove_rule.timeout = 600.0
97
+
84
98
  default_config
85
99
  end
86
100
  yield @configure if block_given?
@@ -107,6 +121,15 @@ module Google
107
121
  @config
108
122
  end
109
123
 
124
+ ##
125
+ # The effective universe domain
126
+ #
127
+ # @return [String]
128
+ #
129
+ def universe_domain
130
+ @region_security_policies_stub.universe_domain
131
+ end
132
+
110
133
  ##
111
134
  # Create a new RegionSecurityPolicies REST client object.
112
135
  #
@@ -134,8 +157,9 @@ module Google
134
157
  credentials = @config.credentials
135
158
  # Use self-signed JWT if the endpoint is unchanged from default,
136
159
  # but only if the default endpoint does not have a region prefix.
137
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
138
- !@config.endpoint.split(".").first.include?("-")
160
+ enable_self_signed_jwt = @config.endpoint.nil? ||
161
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
162
+ !@config.endpoint.split(".").first.include?("-"))
139
163
  credentials ||= Credentials.default scope: @config.scope,
140
164
  enable_self_signed_jwt: enable_self_signed_jwt
141
165
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -149,9 +173,15 @@ module Google
149
173
  config.credentials = credentials
150
174
  config.quota_project = @quota_project_id
151
175
  config.endpoint = @config.endpoint
176
+ config.universe_domain = @config.universe_domain
152
177
  end
153
178
 
154
- @region_security_policies_stub = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
179
+ @region_security_policies_stub = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::ServiceStub.new(
180
+ endpoint: @config.endpoint,
181
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
182
+ universe_domain: @config.universe_domain,
183
+ credentials: credentials
184
+ )
155
185
  end
156
186
 
157
187
  ##
@@ -163,6 +193,101 @@ module Google
163
193
 
164
194
  # Service calls
165
195
 
196
+ ##
197
+ # Inserts a rule into a security policy.
198
+ #
199
+ # @overload add_rule(request, options = nil)
200
+ # Pass arguments to `add_rule` via a request object, either of type
201
+ # {::Google::Cloud::Compute::V1::AddRuleRegionSecurityPolicyRequest} or an equivalent Hash.
202
+ #
203
+ # @param request [::Google::Cloud::Compute::V1::AddRuleRegionSecurityPolicyRequest, ::Hash]
204
+ # A request object representing the call parameters. Required. To specify no
205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
206
+ # @param options [::Gapic::CallOptions, ::Hash]
207
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
208
+ #
209
+ # @overload add_rule(project: nil, region: nil, security_policy: nil, security_policy_rule_resource: nil, validate_only: nil)
210
+ # Pass arguments to `add_rule` via keyword arguments. Note that at
211
+ # least one keyword argument is required. To specify no parameters, or to keep all
212
+ # the default parameter values, pass an empty Hash as a request object (see above).
213
+ #
214
+ # @param project [::String]
215
+ # Project ID for this request.
216
+ # @param region [::String]
217
+ # Name of the region scoping this request.
218
+ # @param security_policy [::String]
219
+ # Name of the security policy to update.
220
+ # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
221
+ # The body resource for this request
222
+ # @param validate_only [::Boolean]
223
+ # If true, the request will not be committed.
224
+ # @yield [result, operation] Access the result along with the TransportOperation object
225
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
226
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
227
+ #
228
+ # @return [::Gapic::GenericLRO::Operation]
229
+ #
230
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
231
+ #
232
+ # @example Basic example
233
+ # require "google/cloud/compute/v1"
234
+ #
235
+ # # Create a client object. The client can be reused for multiple calls.
236
+ # client = Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
237
+ #
238
+ # # Create a request. To set request fields, pass in keyword arguments.
239
+ # request = Google::Cloud::Compute::V1::AddRuleRegionSecurityPolicyRequest.new
240
+ #
241
+ # # Call the add_rule method.
242
+ # result = client.add_rule request
243
+ #
244
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
245
+ # p result
246
+ #
247
+ def add_rule request, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request.nil?
249
+
250
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddRuleRegionSecurityPolicyRequest
251
+
252
+ # Converts hash and nil to an options object
253
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
254
+
255
+ # Customize the options with defaults
256
+ call_metadata = @config.rpcs.add_rule.metadata.to_h
257
+
258
+ # Set x-goog-api-client and x-goog-user-project headers
259
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
260
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
261
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
262
+ transports_version_send: [:rest]
263
+
264
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
+
266
+ options.apply_defaults timeout: @config.rpcs.add_rule.timeout,
267
+ metadata: call_metadata,
268
+ retry_policy: @config.rpcs.add_rule.retry_policy
269
+
270
+ options.apply_defaults timeout: @config.timeout,
271
+ metadata: @config.metadata,
272
+ retry_policy: @config.retry_policy
273
+
274
+ @region_security_policies_stub.add_rule request, options do |result, response|
275
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
276
+ operation: result,
277
+ client: region_operations,
278
+ request_values: {
279
+ "project" => request.project,
280
+ "region" => request.region
281
+ },
282
+ options: options
283
+ )
284
+ yield result, response if block_given?
285
+ return result
286
+ end
287
+ rescue ::Gapic::Rest::Error => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
166
291
  ##
167
292
  # Deletes the specified policy.
168
293
  #
@@ -338,6 +463,90 @@ module Google
338
463
  raise ::Google::Cloud::Error.from_error(e)
339
464
  end
340
465
 
466
+ ##
467
+ # Gets a rule at the specified priority.
468
+ #
469
+ # @overload get_rule(request, options = nil)
470
+ # Pass arguments to `get_rule` via a request object, either of type
471
+ # {::Google::Cloud::Compute::V1::GetRuleRegionSecurityPolicyRequest} or an equivalent Hash.
472
+ #
473
+ # @param request [::Google::Cloud::Compute::V1::GetRuleRegionSecurityPolicyRequest, ::Hash]
474
+ # A request object representing the call parameters. Required. To specify no
475
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
476
+ # @param options [::Gapic::CallOptions, ::Hash]
477
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
478
+ #
479
+ # @overload get_rule(priority: nil, project: nil, region: nil, security_policy: nil)
480
+ # Pass arguments to `get_rule` via keyword arguments. Note that at
481
+ # least one keyword argument is required. To specify no parameters, or to keep all
482
+ # the default parameter values, pass an empty Hash as a request object (see above).
483
+ #
484
+ # @param priority [::Integer]
485
+ # The priority of the rule to get from the security policy.
486
+ # @param project [::String]
487
+ # Project ID for this request.
488
+ # @param region [::String]
489
+ # Name of the region scoping this request.
490
+ # @param security_policy [::String]
491
+ # Name of the security policy to which the queried rule belongs.
492
+ # @yield [result, operation] Access the result along with the TransportOperation object
493
+ # @yieldparam result [::Google::Cloud::Compute::V1::SecurityPolicyRule]
494
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
495
+ #
496
+ # @return [::Google::Cloud::Compute::V1::SecurityPolicyRule]
497
+ #
498
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
499
+ #
500
+ # @example Basic example
501
+ # require "google/cloud/compute/v1"
502
+ #
503
+ # # Create a client object. The client can be reused for multiple calls.
504
+ # client = Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
505
+ #
506
+ # # Create a request. To set request fields, pass in keyword arguments.
507
+ # request = Google::Cloud::Compute::V1::GetRuleRegionSecurityPolicyRequest.new
508
+ #
509
+ # # Call the get_rule method.
510
+ # result = client.get_rule request
511
+ #
512
+ # # The returned object is of type Google::Cloud::Compute::V1::SecurityPolicyRule.
513
+ # p result
514
+ #
515
+ def get_rule request, options = nil
516
+ raise ::ArgumentError, "request must be provided" if request.nil?
517
+
518
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetRuleRegionSecurityPolicyRequest
519
+
520
+ # Converts hash and nil to an options object
521
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
522
+
523
+ # Customize the options with defaults
524
+ call_metadata = @config.rpcs.get_rule.metadata.to_h
525
+
526
+ # Set x-goog-api-client and x-goog-user-project headers
527
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
528
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
529
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
530
+ transports_version_send: [:rest]
531
+
532
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
+
534
+ options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
535
+ metadata: call_metadata,
536
+ retry_policy: @config.rpcs.get_rule.retry_policy
537
+
538
+ options.apply_defaults timeout: @config.timeout,
539
+ metadata: @config.metadata,
540
+ retry_policy: @config.retry_policy
541
+
542
+ @region_security_policies_stub.get_rule request, options do |result, operation|
543
+ yield result, operation if block_given?
544
+ return result
545
+ end
546
+ rescue ::Gapic::Rest::Error => e
547
+ raise ::Google::Cloud::Error.from_error(e)
548
+ end
549
+
341
550
  ##
342
551
  # Creates a new policy in the specified project using the data included in the request.
343
552
  #
@@ -452,7 +661,7 @@ module Google
452
661
  # the default parameter values, pass an empty Hash as a request object (see above).
453
662
  #
454
663
  # @param filter [::String]
455
- # 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`.
664
+ # 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.
456
665
  # @param max_results [::Integer]
457
666
  # 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`)
458
667
  # @param order_by [::String]
@@ -537,7 +746,7 @@ module Google
537
746
  # @param options [::Gapic::CallOptions, ::Hash]
538
747
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
539
748
  #
540
- # @overload patch(project: nil, region: nil, request_id: nil, security_policy: nil, security_policy_resource: nil)
749
+ # @overload patch(project: nil, region: nil, request_id: nil, security_policy: nil, security_policy_resource: nil, update_mask: nil)
541
750
  # Pass arguments to `patch` via keyword arguments. Note that at
542
751
  # least one keyword argument is required. To specify no parameters, or to keep all
543
752
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -552,6 +761,8 @@ module Google
552
761
  # Name of the security policy to update.
553
762
  # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
554
763
  # The body resource for this request
764
+ # @param update_mask [::String]
765
+ # Indicates fields to be cleared as part of this request.
555
766
  # @yield [result, operation] Access the result along with the TransportOperation object
556
767
  # @yieldparam result [::Gapic::GenericLRO::Operation]
557
768
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -619,6 +830,198 @@ module Google
619
830
  raise ::Google::Cloud::Error.from_error(e)
620
831
  end
621
832
 
833
+ ##
834
+ # Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
835
+ #
836
+ # @overload patch_rule(request, options = nil)
837
+ # Pass arguments to `patch_rule` via a request object, either of type
838
+ # {::Google::Cloud::Compute::V1::PatchRuleRegionSecurityPolicyRequest} or an equivalent Hash.
839
+ #
840
+ # @param request [::Google::Cloud::Compute::V1::PatchRuleRegionSecurityPolicyRequest, ::Hash]
841
+ # A request object representing the call parameters. Required. To specify no
842
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
843
+ # @param options [::Gapic::CallOptions, ::Hash]
844
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
845
+ #
846
+ # @overload patch_rule(priority: nil, project: nil, region: nil, security_policy: nil, security_policy_rule_resource: nil, update_mask: nil, validate_only: nil)
847
+ # Pass arguments to `patch_rule` via keyword arguments. Note that at
848
+ # least one keyword argument is required. To specify no parameters, or to keep all
849
+ # the default parameter values, pass an empty Hash as a request object (see above).
850
+ #
851
+ # @param priority [::Integer]
852
+ # The priority of the rule to patch.
853
+ # @param project [::String]
854
+ # Project ID for this request.
855
+ # @param region [::String]
856
+ # Name of the region scoping this request.
857
+ # @param security_policy [::String]
858
+ # Name of the security policy to update.
859
+ # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
860
+ # The body resource for this request
861
+ # @param update_mask [::String]
862
+ # Indicates fields to be cleared as part of this request.
863
+ # @param validate_only [::Boolean]
864
+ # If true, the request will not be committed.
865
+ # @yield [result, operation] Access the result along with the TransportOperation object
866
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
867
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
868
+ #
869
+ # @return [::Gapic::GenericLRO::Operation]
870
+ #
871
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
872
+ #
873
+ # @example Basic example
874
+ # require "google/cloud/compute/v1"
875
+ #
876
+ # # Create a client object. The client can be reused for multiple calls.
877
+ # client = Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
878
+ #
879
+ # # Create a request. To set request fields, pass in keyword arguments.
880
+ # request = Google::Cloud::Compute::V1::PatchRuleRegionSecurityPolicyRequest.new
881
+ #
882
+ # # Call the patch_rule method.
883
+ # result = client.patch_rule request
884
+ #
885
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
886
+ # p result
887
+ #
888
+ def patch_rule request, options = nil
889
+ raise ::ArgumentError, "request must be provided" if request.nil?
890
+
891
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRuleRegionSecurityPolicyRequest
892
+
893
+ # Converts hash and nil to an options object
894
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
895
+
896
+ # Customize the options with defaults
897
+ call_metadata = @config.rpcs.patch_rule.metadata.to_h
898
+
899
+ # Set x-goog-api-client and x-goog-user-project headers
900
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
901
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
902
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
903
+ transports_version_send: [:rest]
904
+
905
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
906
+
907
+ options.apply_defaults timeout: @config.rpcs.patch_rule.timeout,
908
+ metadata: call_metadata,
909
+ retry_policy: @config.rpcs.patch_rule.retry_policy
910
+
911
+ options.apply_defaults timeout: @config.timeout,
912
+ metadata: @config.metadata,
913
+ retry_policy: @config.retry_policy
914
+
915
+ @region_security_policies_stub.patch_rule request, options do |result, response|
916
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
917
+ operation: result,
918
+ client: region_operations,
919
+ request_values: {
920
+ "project" => request.project,
921
+ "region" => request.region
922
+ },
923
+ options: options
924
+ )
925
+ yield result, response if block_given?
926
+ return result
927
+ end
928
+ rescue ::Gapic::Rest::Error => e
929
+ raise ::Google::Cloud::Error.from_error(e)
930
+ end
931
+
932
+ ##
933
+ # Deletes a rule at the specified priority.
934
+ #
935
+ # @overload remove_rule(request, options = nil)
936
+ # Pass arguments to `remove_rule` via a request object, either of type
937
+ # {::Google::Cloud::Compute::V1::RemoveRuleRegionSecurityPolicyRequest} or an equivalent Hash.
938
+ #
939
+ # @param request [::Google::Cloud::Compute::V1::RemoveRuleRegionSecurityPolicyRequest, ::Hash]
940
+ # A request object representing the call parameters. Required. To specify no
941
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
942
+ # @param options [::Gapic::CallOptions, ::Hash]
943
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
944
+ #
945
+ # @overload remove_rule(priority: nil, project: nil, region: nil, security_policy: nil)
946
+ # Pass arguments to `remove_rule` via keyword arguments. Note that at
947
+ # least one keyword argument is required. To specify no parameters, or to keep all
948
+ # the default parameter values, pass an empty Hash as a request object (see above).
949
+ #
950
+ # @param priority [::Integer]
951
+ # The priority of the rule to remove from the security policy.
952
+ # @param project [::String]
953
+ # Project ID for this request.
954
+ # @param region [::String]
955
+ # Name of the region scoping this request.
956
+ # @param security_policy [::String]
957
+ # Name of the security policy to update.
958
+ # @yield [result, operation] Access the result along with the TransportOperation object
959
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
960
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
961
+ #
962
+ # @return [::Gapic::GenericLRO::Operation]
963
+ #
964
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
965
+ #
966
+ # @example Basic example
967
+ # require "google/cloud/compute/v1"
968
+ #
969
+ # # Create a client object. The client can be reused for multiple calls.
970
+ # client = Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
971
+ #
972
+ # # Create a request. To set request fields, pass in keyword arguments.
973
+ # request = Google::Cloud::Compute::V1::RemoveRuleRegionSecurityPolicyRequest.new
974
+ #
975
+ # # Call the remove_rule method.
976
+ # result = client.remove_rule request
977
+ #
978
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
979
+ # p result
980
+ #
981
+ def remove_rule request, options = nil
982
+ raise ::ArgumentError, "request must be provided" if request.nil?
983
+
984
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemoveRuleRegionSecurityPolicyRequest
985
+
986
+ # Converts hash and nil to an options object
987
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
988
+
989
+ # Customize the options with defaults
990
+ call_metadata = @config.rpcs.remove_rule.metadata.to_h
991
+
992
+ # Set x-goog-api-client and x-goog-user-project headers
993
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
994
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
995
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
996
+ transports_version_send: [:rest]
997
+
998
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
999
+
1000
+ options.apply_defaults timeout: @config.rpcs.remove_rule.timeout,
1001
+ metadata: call_metadata,
1002
+ retry_policy: @config.rpcs.remove_rule.retry_policy
1003
+
1004
+ options.apply_defaults timeout: @config.timeout,
1005
+ metadata: @config.metadata,
1006
+ retry_policy: @config.retry_policy
1007
+
1008
+ @region_security_policies_stub.remove_rule request, options do |result, response|
1009
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1010
+ operation: result,
1011
+ client: region_operations,
1012
+ request_values: {
1013
+ "project" => request.project,
1014
+ "region" => request.region
1015
+ },
1016
+ options: options
1017
+ )
1018
+ yield result, response if block_given?
1019
+ return result
1020
+ end
1021
+ rescue ::Gapic::Rest::Error => e
1022
+ raise ::Google::Cloud::Error.from_error(e)
1023
+ end
1024
+
622
1025
  ##
623
1026
  # Configuration class for the RegionSecurityPolicies REST API.
624
1027
  #
@@ -635,23 +1038,23 @@ module Google
635
1038
  # @example
636
1039
  #
637
1040
  # # Modify the global config, setting the timeout for
638
- # # delete to 20 seconds,
1041
+ # # add_rule to 20 seconds,
639
1042
  # # and all remaining timeouts to 10 seconds.
640
1043
  # ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.configure do |config|
641
1044
  # config.timeout = 10.0
642
- # config.rpcs.delete.timeout = 20.0
1045
+ # config.rpcs.add_rule.timeout = 20.0
643
1046
  # end
644
1047
  #
645
1048
  # # Apply the above configuration only to a new client.
646
1049
  # client = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new do |config|
647
1050
  # config.timeout = 10.0
648
- # config.rpcs.delete.timeout = 20.0
1051
+ # config.rpcs.add_rule.timeout = 20.0
649
1052
  # end
650
1053
  #
651
1054
  # @!attribute [rw] endpoint
652
- # The hostname or hostname:port of the service endpoint.
653
- # Defaults to `"compute.googleapis.com"`.
654
- # @return [::String]
1055
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1056
+ # nil, indicating to use the default endpoint in the current universe domain.
1057
+ # @return [::String,nil]
655
1058
  # @!attribute [rw] credentials
656
1059
  # Credentials to send with calls. You may provide any of the following types:
657
1060
  # * (`String`) The path to a service account key file in JSON format
@@ -688,13 +1091,20 @@ module Google
688
1091
  # @!attribute [rw] quota_project
689
1092
  # A separate project against which to charge quota.
690
1093
  # @return [::String]
1094
+ # @!attribute [rw] universe_domain
1095
+ # The universe domain within which to make requests. This determines the
1096
+ # default endpoint URL. The default value of nil uses the environment
1097
+ # universe (usually the default "googleapis.com" universe).
1098
+ # @return [::String,nil]
691
1099
  #
692
1100
  class Configuration
693
1101
  extend ::Gapic::Config
694
1102
 
1103
+ # @private
1104
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
695
1105
  DEFAULT_ENDPOINT = "compute.googleapis.com"
696
1106
 
697
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1107
+ config_attr :endpoint, nil, ::String, nil
698
1108
  config_attr :credentials, nil do |value|
699
1109
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
700
1110
  allowed.any? { |klass| klass === value }
@@ -706,6 +1116,7 @@ module Google
706
1116
  config_attr :metadata, nil, ::Hash, nil
707
1117
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
708
1118
  config_attr :quota_project, nil, ::String, nil
1119
+ config_attr :universe_domain, nil, ::String, nil
709
1120
 
710
1121
  # @private
711
1122
  def initialize parent_config = nil
@@ -744,6 +1155,11 @@ module Google
744
1155
  # trigger a retry.
745
1156
  #
746
1157
  class Rpcs
1158
+ ##
1159
+ # RPC-specific configuration for `add_rule`
1160
+ # @return [::Gapic::Config::Method]
1161
+ #
1162
+ attr_reader :add_rule
747
1163
  ##
748
1164
  # RPC-specific configuration for `delete`
749
1165
  # @return [::Gapic::Config::Method]
@@ -755,6 +1171,11 @@ module Google
755
1171
  #
756
1172
  attr_reader :get
757
1173
  ##
1174
+ # RPC-specific configuration for `get_rule`
1175
+ # @return [::Gapic::Config::Method]
1176
+ #
1177
+ attr_reader :get_rule
1178
+ ##
758
1179
  # RPC-specific configuration for `insert`
759
1180
  # @return [::Gapic::Config::Method]
760
1181
  #
@@ -769,19 +1190,37 @@ module Google
769
1190
  # @return [::Gapic::Config::Method]
770
1191
  #
771
1192
  attr_reader :patch
1193
+ ##
1194
+ # RPC-specific configuration for `patch_rule`
1195
+ # @return [::Gapic::Config::Method]
1196
+ #
1197
+ attr_reader :patch_rule
1198
+ ##
1199
+ # RPC-specific configuration for `remove_rule`
1200
+ # @return [::Gapic::Config::Method]
1201
+ #
1202
+ attr_reader :remove_rule
772
1203
 
773
1204
  # @private
774
1205
  def initialize parent_rpcs = nil
1206
+ add_rule_config = parent_rpcs.add_rule if parent_rpcs.respond_to? :add_rule
1207
+ @add_rule = ::Gapic::Config::Method.new add_rule_config
775
1208
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
776
1209
  @delete = ::Gapic::Config::Method.new delete_config
777
1210
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
778
1211
  @get = ::Gapic::Config::Method.new get_config
1212
+ get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule
1213
+ @get_rule = ::Gapic::Config::Method.new get_rule_config
779
1214
  insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
780
1215
  @insert = ::Gapic::Config::Method.new insert_config
781
1216
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
782
1217
  @list = ::Gapic::Config::Method.new list_config
783
1218
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
784
1219
  @patch = ::Gapic::Config::Method.new patch_config
1220
+ patch_rule_config = parent_rpcs.patch_rule if parent_rpcs.respond_to? :patch_rule
1221
+ @patch_rule = ::Gapic::Config::Method.new patch_rule_config
1222
+ remove_rule_config = parent_rpcs.remove_rule if parent_rpcs.respond_to? :remove_rule
1223
+ @remove_rule = ::Gapic::Config::Method.new remove_rule_config
785
1224
 
786
1225
  yield self if block_given?
787
1226
  end