google-cloud-network_security-v1 0.a → 0.1.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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/network_security/v1/address_group_service/client.rb +1457 -0
  6. data/lib/google/cloud/network_security/v1/address_group_service/credentials.rb +47 -0
  7. data/lib/google/cloud/network_security/v1/address_group_service/operations.rb +843 -0
  8. data/lib/google/cloud/network_security/v1/address_group_service/paths.rb +110 -0
  9. data/lib/google/cloud/network_security/v1/address_group_service.rb +52 -0
  10. data/lib/google/cloud/network_security/v1/dns_threat_detector_service/client.rb +900 -0
  11. data/lib/google/cloud/network_security/v1/dns_threat_detector_service/credentials.rb +47 -0
  12. data/lib/google/cloud/network_security/v1/dns_threat_detector_service/paths.rb +86 -0
  13. data/lib/google/cloud/network_security/v1/dns_threat_detector_service.rb +49 -0
  14. data/lib/google/cloud/network_security/v1/firewall_activation/client.rb +2098 -0
  15. data/lib/google/cloud/network_security/v1/firewall_activation/credentials.rb +47 -0
  16. data/lib/google/cloud/network_security/v1/firewall_activation/operations.rb +843 -0
  17. data/lib/google/cloud/network_security/v1/firewall_activation/paths.rb +165 -0
  18. data/lib/google/cloud/network_security/v1/firewall_activation.rb +50 -0
  19. data/lib/google/cloud/network_security/v1/intercept/client.rb +2599 -0
  20. data/lib/google/cloud/network_security/v1/intercept/credentials.rb +47 -0
  21. data/lib/google/cloud/network_security/v1/intercept/operations.rb +843 -0
  22. data/lib/google/cloud/network_security/v1/intercept/paths.rb +160 -0
  23. data/lib/google/cloud/network_security/v1/intercept.rb +51 -0
  24. data/lib/google/cloud/network_security/v1/mirroring/client.rb +2598 -0
  25. data/lib/google/cloud/network_security/v1/mirroring/credentials.rb +47 -0
  26. data/lib/google/cloud/network_security/v1/mirroring/operations.rb +843 -0
  27. data/lib/google/cloud/network_security/v1/mirroring/paths.rb +160 -0
  28. data/lib/google/cloud/network_security/v1/mirroring.rb +50 -0
  29. data/lib/google/cloud/network_security/v1/network_security/client.rb +5161 -0
  30. data/lib/google/cloud/network_security/v1/network_security/credentials.rb +47 -0
  31. data/lib/google/cloud/network_security/v1/network_security/operations.rb +843 -0
  32. data/lib/google/cloud/network_security/v1/network_security/paths.rb +280 -0
  33. data/lib/google/cloud/network_security/v1/network_security.rb +52 -0
  34. data/lib/google/cloud/network_security/v1/organization_address_group_service/client.rb +1457 -0
  35. data/lib/google/cloud/network_security/v1/organization_address_group_service/credentials.rb +47 -0
  36. data/lib/google/cloud/network_security/v1/organization_address_group_service/operations.rb +843 -0
  37. data/lib/google/cloud/network_security/v1/organization_address_group_service/paths.rb +110 -0
  38. data/lib/google/cloud/network_security/v1/organization_address_group_service.rb +52 -0
  39. data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/client.rb +1471 -0
  40. data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/credentials.rb +47 -0
  41. data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/operations.rb +843 -0
  42. data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/paths.rb +191 -0
  43. data/lib/google/cloud/network_security/v1/organization_security_profile_group_service.rb +50 -0
  44. data/lib/google/cloud/network_security/v1/security_profile_group_service/client.rb +1472 -0
  45. data/lib/google/cloud/network_security/v1/security_profile_group_service/credentials.rb +47 -0
  46. data/lib/google/cloud/network_security/v1/security_profile_group_service/operations.rb +843 -0
  47. data/lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb +191 -0
  48. data/lib/google/cloud/network_security/v1/security_profile_group_service.rb +51 -0
  49. data/lib/google/cloud/network_security/v1/sse_realm_service/client.rb +1316 -0
  50. data/lib/google/cloud/network_security/v1/sse_realm_service/credentials.rb +47 -0
  51. data/lib/google/cloud/network_security/v1/sse_realm_service/operations.rb +843 -0
  52. data/lib/google/cloud/network_security/v1/sse_realm_service/paths.rb +88 -0
  53. data/lib/google/cloud/network_security/v1/sse_realm_service.rb +50 -0
  54. data/lib/google/cloud/network_security/v1/version.rb +7 -2
  55. data/lib/google/cloud/network_security/v1.rb +49 -0
  56. data/lib/google/cloud/networksecurity/v1/address_group_pb.rb +46 -0
  57. data/lib/google/cloud/networksecurity/v1/address_group_services_pb.rb +97 -0
  58. data/lib/google/cloud/networksecurity/v1/authorization_policy_pb.rb +37 -0
  59. data/lib/google/cloud/networksecurity/v1/authz_policy_pb.rb +56 -0
  60. data/lib/google/cloud/networksecurity/v1/backend_authentication_config_pb.rb +33 -0
  61. data/lib/google/cloud/networksecurity/v1/client_tls_policy_pb.rb +33 -0
  62. data/lib/google/cloud/networksecurity/v1/common_pb.rb +24 -0
  63. data/lib/google/cloud/networksecurity/v1/dns_threat_detector_pb.rb +36 -0
  64. data/lib/google/cloud/networksecurity/v1/dns_threat_detector_services_pb.rb +53 -0
  65. data/lib/google/cloud/networksecurity/v1/firewall_activation_pb.rb +48 -0
  66. data/lib/google/cloud/networksecurity/v1/firewall_activation_services_pb.rb +73 -0
  67. data/lib/google/cloud/networksecurity/v1/gateway_security_policy_pb.rb +32 -0
  68. data/lib/google/cloud/networksecurity/v1/gateway_security_policy_rule_pb.rb +33 -0
  69. data/lib/google/cloud/networksecurity/v1/intercept_pb.rb +71 -0
  70. data/lib/google/cloud/networksecurity/v1/intercept_services_pb.rb +104 -0
  71. data/lib/google/cloud/networksecurity/v1/mirroring_pb.rb +72 -0
  72. data/lib/google/cloud/networksecurity/v1/mirroring_services_pb.rb +103 -0
  73. data/lib/google/cloud/networksecurity/v1/network_security_pb.rb +35 -0
  74. data/lib/google/cloud/networksecurity/v1/network_security_services_pb.rb +138 -0
  75. data/lib/google/cloud/networksecurity/v1/security_profile_group_intercept_pb.rb +24 -0
  76. data/lib/google/cloud/networksecurity/v1/security_profile_group_mirroring_pb.rb +24 -0
  77. data/lib/google/cloud/networksecurity/v1/security_profile_group_pb.rb +31 -0
  78. data/lib/google/cloud/networksecurity/v1/security_profile_group_service_pb.rb +42 -0
  79. data/lib/google/cloud/networksecurity/v1/security_profile_group_service_services_pb.rb +98 -0
  80. data/lib/google/cloud/networksecurity/v1/security_profile_group_threatprevention_pb.rb +30 -0
  81. data/lib/google/cloud/networksecurity/v1/security_profile_group_urlfiltering_pb.rb +25 -0
  82. data/lib/google/cloud/networksecurity/v1/server_tls_policy_pb.rb +35 -0
  83. data/lib/google/cloud/networksecurity/v1/sse_realm_pb.rb +46 -0
  84. data/lib/google/cloud/networksecurity/v1/sse_realm_services_pb.rb +59 -0
  85. data/lib/google/cloud/networksecurity/v1/tls_inspection_policy_pb.rb +34 -0
  86. data/lib/google/cloud/networksecurity/v1/tls_pb.rb +26 -0
  87. data/lib/google/cloud/networksecurity/v1/url_list_pb.rb +32 -0
  88. data/lib/google-cloud-network_security-v1.rb +21 -0
  89. data/proto_docs/README.md +4 -0
  90. data/proto_docs/google/api/client.rb +593 -0
  91. data/proto_docs/google/api/field_behavior.rb +85 -0
  92. data/proto_docs/google/api/field_info.rb +88 -0
  93. data/proto_docs/google/api/launch_stage.rb +71 -0
  94. data/proto_docs/google/api/resource.rb +227 -0
  95. data/proto_docs/google/cloud/networksecurity/v1/address_group.rb +374 -0
  96. data/proto_docs/google/cloud/networksecurity/v1/authorization_policy.rb +263 -0
  97. data/proto_docs/google/cloud/networksecurity/v1/authz_policy.rb +735 -0
  98. data/proto_docs/google/cloud/networksecurity/v1/backend_authentication_config.rb +217 -0
  99. data/proto_docs/google/cloud/networksecurity/v1/client_tls_policy.rb +162 -0
  100. data/proto_docs/google/cloud/networksecurity/v1/common.rb +57 -0
  101. data/proto_docs/google/cloud/networksecurity/v1/dns_threat_detector.rb +159 -0
  102. data/proto_docs/google/cloud/networksecurity/v1/firewall_activation.rb +469 -0
  103. data/proto_docs/google/cloud/networksecurity/v1/gateway_security_policy.rb +144 -0
  104. data/proto_docs/google/cloud/networksecurity/v1/gateway_security_policy_rule.rb +178 -0
  105. data/proto_docs/google/cloud/networksecurity/v1/intercept.rb +960 -0
  106. data/proto_docs/google/cloud/networksecurity/v1/mirroring.rb +970 -0
  107. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group.rb +166 -0
  108. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_intercept.rb +38 -0
  109. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_mirroring.rb +38 -0
  110. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_service.rb +211 -0
  111. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_threatprevention.rb +193 -0
  112. data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_urlfiltering.rb +66 -0
  113. data/proto_docs/google/cloud/networksecurity/v1/server_tls_policy.rb +251 -0
  114. data/proto_docs/google/cloud/networksecurity/v1/sse_realm.rb +388 -0
  115. data/proto_docs/google/cloud/networksecurity/v1/tls.rb +90 -0
  116. data/proto_docs/google/cloud/networksecurity/v1/tls_inspection_policy.rb +239 -0
  117. data/proto_docs/google/cloud/networksecurity/v1/url_list.rb +144 -0
  118. data/proto_docs/google/longrunning/operations.rb +191 -0
  119. data/proto_docs/google/protobuf/any.rb +145 -0
  120. data/proto_docs/google/protobuf/duration.rb +98 -0
  121. data/proto_docs/google/protobuf/empty.rb +34 -0
  122. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  123. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  124. data/proto_docs/google/rpc/status.rb +48 -0
  125. data/proto_docs/google/type/expr.rb +75 -0
  126. metadata +186 -9
@@ -0,0 +1,2598 @@
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/networksecurity/v1/mirroring_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module NetworkSecurity
27
+ module V1
28
+ module Mirroring
29
+ ##
30
+ # Client for the Mirroring service.
31
+ #
32
+ # PM2 is the "out-of-band" flavor of the Network Security Integrations product.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "networksecurity.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :mirroring_stub
45
+
46
+ ##
47
+ # Configure the Mirroring Client class.
48
+ #
49
+ # See {::Google::Cloud::NetworkSecurity::V1::Mirroring::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all Mirroring clients
55
+ # ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "NetworkSecurity", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the Mirroring Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::NetworkSecurity::V1::Mirroring::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # The effective universe domain
103
+ #
104
+ # @return [String]
105
+ #
106
+ def universe_domain
107
+ @mirroring_stub.universe_domain
108
+ end
109
+
110
+ ##
111
+ # Create a new Mirroring client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the Mirroring client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # These require statements are intentionally placed here to initialize
128
+ # the gRPC module only when it's required.
129
+ # See https://github.com/googleapis/toolkit/issues/446
130
+ require "gapic/grpc"
131
+ require "google/cloud/networksecurity/v1/mirroring_services_pb"
132
+
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
153
+
154
+ @operations_client = Operations.new do |config|
155
+ config.credentials = credentials
156
+ config.quota_project = @quota_project_id
157
+ config.endpoint = @config.endpoint
158
+ config.universe_domain = @config.universe_domain
159
+ end
160
+
161
+ @mirroring_stub = ::Gapic::ServiceStub.new(
162
+ ::Google::Cloud::NetworkSecurity::V1::Mirroring::Stub,
163
+ credentials: credentials,
164
+ endpoint: @config.endpoint,
165
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
166
+ universe_domain: @config.universe_domain,
167
+ channel_args: @config.channel_args,
168
+ interceptors: @config.interceptors,
169
+ channel_pool_config: @config.channel_pool,
170
+ logger: @config.logger
171
+ )
172
+
173
+ @mirroring_stub.stub_logger&.info do |entry|
174
+ entry.set_system_name
175
+ entry.set_service
176
+ entry.message = "Created client for #{entry.service}"
177
+ entry.set_credentials_fields credentials
178
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
179
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
180
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
181
+ end
182
+
183
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
184
+ config.credentials = credentials
185
+ config.quota_project = @quota_project_id
186
+ config.endpoint = @mirroring_stub.endpoint
187
+ config.universe_domain = @mirroring_stub.universe_domain
188
+ config.logger = @mirroring_stub.logger if config.respond_to? :logger=
189
+ end
190
+
191
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
192
+ config.credentials = credentials
193
+ config.quota_project = @quota_project_id
194
+ config.endpoint = @mirroring_stub.endpoint
195
+ config.universe_domain = @mirroring_stub.universe_domain
196
+ config.logger = @mirroring_stub.logger if config.respond_to? :logger=
197
+ end
198
+ end
199
+
200
+ ##
201
+ # Get the associated client for long-running operations.
202
+ #
203
+ # @return [::Google::Cloud::NetworkSecurity::V1::Mirroring::Operations]
204
+ #
205
+ attr_reader :operations_client
206
+
207
+ ##
208
+ # Get the associated client for mix-in of the Locations.
209
+ #
210
+ # @return [Google::Cloud::Location::Locations::Client]
211
+ #
212
+ attr_reader :location_client
213
+
214
+ ##
215
+ # Get the associated client for mix-in of the IAMPolicy.
216
+ #
217
+ # @return [Google::Iam::V1::IAMPolicy::Client]
218
+ #
219
+ attr_reader :iam_policy_client
220
+
221
+ ##
222
+ # The logger used for request/response debug logging.
223
+ #
224
+ # @return [Logger]
225
+ #
226
+ def logger
227
+ @mirroring_stub.logger
228
+ end
229
+
230
+ # Service calls
231
+
232
+ ##
233
+ # Lists endpoint groups in a given project and location.
234
+ # See https://google.aip.dev/132.
235
+ #
236
+ # @overload list_mirroring_endpoint_groups(request, options = nil)
237
+ # Pass arguments to `list_mirroring_endpoint_groups` via a request object, either of type
238
+ # {::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupsRequest} or an equivalent Hash.
239
+ #
240
+ # @param request [::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupsRequest, ::Hash]
241
+ # A request object representing the call parameters. Required. To specify no
242
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
243
+ # @param options [::Gapic::CallOptions, ::Hash]
244
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
245
+ #
246
+ # @overload list_mirroring_endpoint_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
247
+ # Pass arguments to `list_mirroring_endpoint_groups` via keyword arguments. Note that at
248
+ # least one keyword argument is required. To specify no parameters, or to keep all
249
+ # the default parameter values, pass an empty Hash as a request object (see above).
250
+ #
251
+ # @param parent [::String]
252
+ # Required. The parent, which owns this collection of endpoint groups.
253
+ # Example: `projects/123456789/locations/global`.
254
+ # See https://google.aip.dev/132 for more details.
255
+ # @param page_size [::Integer]
256
+ # Optional. Requested page size. Server may return fewer items than
257
+ # requested. If unspecified, server will pick an appropriate default. See
258
+ # https://google.aip.dev/158 for more details.
259
+ # @param page_token [::String]
260
+ # Optional. A page token, received from a previous
261
+ # `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent
262
+ # page. When paginating, all other parameters provided to
263
+ # `ListMirroringEndpointGroups` must match the call that provided the page
264
+ # token.
265
+ # See https://google.aip.dev/158 for more details.
266
+ # @param filter [::String]
267
+ # Optional. Filter expression.
268
+ # See https://google.aip.dev/160#filtering for more details.
269
+ # @param order_by [::String]
270
+ # Optional. Sort expression.
271
+ # See https://google.aip.dev/132#ordering for more details.
272
+ #
273
+ # @yield [response, operation] Access the result along with the RPC operation
274
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup>]
275
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
276
+ #
277
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup>]
278
+ #
279
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
280
+ #
281
+ # @example Basic example
282
+ # require "google/cloud/network_security/v1"
283
+ #
284
+ # # Create a client object. The client can be reused for multiple calls.
285
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
286
+ #
287
+ # # Create a request. To set request fields, pass in keyword arguments.
288
+ # request = Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupsRequest.new
289
+ #
290
+ # # Call the list_mirroring_endpoint_groups method.
291
+ # result = client.list_mirroring_endpoint_groups request
292
+ #
293
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
294
+ # # over elements, and API calls will be issued to fetch pages as needed.
295
+ # result.each do |item|
296
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup.
297
+ # p item
298
+ # end
299
+ #
300
+ def list_mirroring_endpoint_groups request, options = nil
301
+ raise ::ArgumentError, "request must be provided" if request.nil?
302
+
303
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupsRequest
304
+
305
+ # Converts hash and nil to an options object
306
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
307
+
308
+ # Customize the options with defaults
309
+ metadata = @config.rpcs.list_mirroring_endpoint_groups.metadata.to_h
310
+
311
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
312
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
313
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
314
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
315
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
316
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
+
318
+ header_params = {}
319
+ if request.parent
320
+ header_params["parent"] = request.parent
321
+ end
322
+
323
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
324
+ metadata[:"x-goog-request-params"] ||= request_params_header
325
+
326
+ options.apply_defaults timeout: @config.rpcs.list_mirroring_endpoint_groups.timeout,
327
+ metadata: metadata,
328
+ retry_policy: @config.rpcs.list_mirroring_endpoint_groups.retry_policy
329
+
330
+ options.apply_defaults timeout: @config.timeout,
331
+ metadata: @config.metadata,
332
+ retry_policy: @config.retry_policy
333
+
334
+ @mirroring_stub.call_rpc :list_mirroring_endpoint_groups, request, options: options do |response, operation|
335
+ response = ::Gapic::PagedEnumerable.new @mirroring_stub, :list_mirroring_endpoint_groups, request, response, operation, options
336
+ yield response, operation if block_given?
337
+ throw :response, response
338
+ end
339
+ rescue ::GRPC::BadStatus => e
340
+ raise ::Google::Cloud::Error.from_error(e)
341
+ end
342
+
343
+ ##
344
+ # Gets a specific endpoint group.
345
+ # See https://google.aip.dev/131.
346
+ #
347
+ # @overload get_mirroring_endpoint_group(request, options = nil)
348
+ # Pass arguments to `get_mirroring_endpoint_group` via a request object, either of type
349
+ # {::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupRequest} or an equivalent Hash.
350
+ #
351
+ # @param request [::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupRequest, ::Hash]
352
+ # A request object representing the call parameters. Required. To specify no
353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
354
+ # @param options [::Gapic::CallOptions, ::Hash]
355
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
356
+ #
357
+ # @overload get_mirroring_endpoint_group(name: nil)
358
+ # Pass arguments to `get_mirroring_endpoint_group` via keyword arguments. Note that at
359
+ # least one keyword argument is required. To specify no parameters, or to keep all
360
+ # the default parameter values, pass an empty Hash as a request object (see above).
361
+ #
362
+ # @param name [::String]
363
+ # Required. The name of the endpoint group to retrieve.
364
+ # Format:
365
+ # projects/\\{project}/locations/\\{location}/mirroringEndpointGroups/\\{mirroring_endpoint_group}
366
+ #
367
+ # @yield [response, operation] Access the result along with the RPC operation
368
+ # @yieldparam response [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup]
369
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
370
+ #
371
+ # @return [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup]
372
+ #
373
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
374
+ #
375
+ # @example Basic example
376
+ # require "google/cloud/network_security/v1"
377
+ #
378
+ # # Create a client object. The client can be reused for multiple calls.
379
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
380
+ #
381
+ # # Create a request. To set request fields, pass in keyword arguments.
382
+ # request = Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupRequest.new
383
+ #
384
+ # # Call the get_mirroring_endpoint_group method.
385
+ # result = client.get_mirroring_endpoint_group request
386
+ #
387
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup.
388
+ # p result
389
+ #
390
+ def get_mirroring_endpoint_group request, options = nil
391
+ raise ::ArgumentError, "request must be provided" if request.nil?
392
+
393
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupRequest
394
+
395
+ # Converts hash and nil to an options object
396
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
397
+
398
+ # Customize the options with defaults
399
+ metadata = @config.rpcs.get_mirroring_endpoint_group.metadata.to_h
400
+
401
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
402
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
403
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
404
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
405
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
406
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
407
+
408
+ header_params = {}
409
+ if request.name
410
+ header_params["name"] = request.name
411
+ end
412
+
413
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
414
+ metadata[:"x-goog-request-params"] ||= request_params_header
415
+
416
+ options.apply_defaults timeout: @config.rpcs.get_mirroring_endpoint_group.timeout,
417
+ metadata: metadata,
418
+ retry_policy: @config.rpcs.get_mirroring_endpoint_group.retry_policy
419
+
420
+ options.apply_defaults timeout: @config.timeout,
421
+ metadata: @config.metadata,
422
+ retry_policy: @config.retry_policy
423
+
424
+ @mirroring_stub.call_rpc :get_mirroring_endpoint_group, request, options: options do |response, operation|
425
+ yield response, operation if block_given?
426
+ end
427
+ rescue ::GRPC::BadStatus => e
428
+ raise ::Google::Cloud::Error.from_error(e)
429
+ end
430
+
431
+ ##
432
+ # Creates an endpoint group in a given project and location.
433
+ # See https://google.aip.dev/133.
434
+ #
435
+ # @overload create_mirroring_endpoint_group(request, options = nil)
436
+ # Pass arguments to `create_mirroring_endpoint_group` via a request object, either of type
437
+ # {::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupRequest} or an equivalent Hash.
438
+ #
439
+ # @param request [::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupRequest, ::Hash]
440
+ # A request object representing the call parameters. Required. To specify no
441
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
442
+ # @param options [::Gapic::CallOptions, ::Hash]
443
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
444
+ #
445
+ # @overload create_mirroring_endpoint_group(parent: nil, mirroring_endpoint_group_id: nil, mirroring_endpoint_group: nil, request_id: nil)
446
+ # Pass arguments to `create_mirroring_endpoint_group` via keyword arguments. Note that at
447
+ # least one keyword argument is required. To specify no parameters, or to keep all
448
+ # the default parameter values, pass an empty Hash as a request object (see above).
449
+ #
450
+ # @param parent [::String]
451
+ # Required. The parent resource where this endpoint group will be created.
452
+ # Format: projects/\\{project}/locations/\\{location}
453
+ # @param mirroring_endpoint_group_id [::String]
454
+ # Required. The ID to use for the endpoint group, which will become the final
455
+ # component of the endpoint group's resource name.
456
+ # @param mirroring_endpoint_group [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup, ::Hash]
457
+ # Required. The endpoint group to create.
458
+ # @param request_id [::String]
459
+ # Optional. A unique identifier for this request. Must be a UUID4.
460
+ # This request is only idempotent if a `request_id` is provided.
461
+ # See https://google.aip.dev/155 for more details.
462
+ #
463
+ # @yield [response, operation] Access the result along with the RPC operation
464
+ # @yieldparam response [::Gapic::Operation]
465
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
466
+ #
467
+ # @return [::Gapic::Operation]
468
+ #
469
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
470
+ #
471
+ # @example Basic example
472
+ # require "google/cloud/network_security/v1"
473
+ #
474
+ # # Create a client object. The client can be reused for multiple calls.
475
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
476
+ #
477
+ # # Create a request. To set request fields, pass in keyword arguments.
478
+ # request = Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupRequest.new
479
+ #
480
+ # # Call the create_mirroring_endpoint_group method.
481
+ # result = client.create_mirroring_endpoint_group request
482
+ #
483
+ # # The returned object is of type Gapic::Operation. You can use it to
484
+ # # check the status of an operation, cancel it, or wait for results.
485
+ # # Here is how to wait for a response.
486
+ # result.wait_until_done! timeout: 60
487
+ # if result.response?
488
+ # p result.response
489
+ # else
490
+ # puts "No response received."
491
+ # end
492
+ #
493
+ def create_mirroring_endpoint_group request, options = nil
494
+ raise ::ArgumentError, "request must be provided" if request.nil?
495
+
496
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupRequest
497
+
498
+ # Converts hash and nil to an options object
499
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
500
+
501
+ # Customize the options with defaults
502
+ metadata = @config.rpcs.create_mirroring_endpoint_group.metadata.to_h
503
+
504
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
505
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
506
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
507
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
508
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
509
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
510
+
511
+ header_params = {}
512
+ if request.parent
513
+ header_params["parent"] = request.parent
514
+ end
515
+
516
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
517
+ metadata[:"x-goog-request-params"] ||= request_params_header
518
+
519
+ options.apply_defaults timeout: @config.rpcs.create_mirroring_endpoint_group.timeout,
520
+ metadata: metadata,
521
+ retry_policy: @config.rpcs.create_mirroring_endpoint_group.retry_policy
522
+
523
+ options.apply_defaults timeout: @config.timeout,
524
+ metadata: @config.metadata,
525
+ retry_policy: @config.retry_policy
526
+
527
+ @mirroring_stub.call_rpc :create_mirroring_endpoint_group, request, options: options do |response, operation|
528
+ response = ::Gapic::Operation.new response, @operations_client, options: options
529
+ yield response, operation if block_given?
530
+ throw :response, response
531
+ end
532
+ rescue ::GRPC::BadStatus => e
533
+ raise ::Google::Cloud::Error.from_error(e)
534
+ end
535
+
536
+ ##
537
+ # Updates an endpoint group.
538
+ # See https://google.aip.dev/134.
539
+ #
540
+ # @overload update_mirroring_endpoint_group(request, options = nil)
541
+ # Pass arguments to `update_mirroring_endpoint_group` via a request object, either of type
542
+ # {::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupRequest} or an equivalent Hash.
543
+ #
544
+ # @param request [::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupRequest, ::Hash]
545
+ # A request object representing the call parameters. Required. To specify no
546
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
547
+ # @param options [::Gapic::CallOptions, ::Hash]
548
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
549
+ #
550
+ # @overload update_mirroring_endpoint_group(update_mask: nil, mirroring_endpoint_group: nil, request_id: nil)
551
+ # Pass arguments to `update_mirroring_endpoint_group` via keyword arguments. Note that at
552
+ # least one keyword argument is required. To specify no parameters, or to keep all
553
+ # the default parameter values, pass an empty Hash as a request object (see above).
554
+ #
555
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
556
+ # Optional. The list of fields to update.
557
+ # Fields are specified relative to the endpoint group
558
+ # (e.g. `description`; *not* `mirroring_endpoint_group.description`).
559
+ # See https://google.aip.dev/161 for more details.
560
+ # @param mirroring_endpoint_group [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroup, ::Hash]
561
+ # Required. The endpoint group to update.
562
+ # @param request_id [::String]
563
+ # Optional. A unique identifier for this request. Must be a UUID4.
564
+ # This request is only idempotent if a `request_id` is provided.
565
+ # See https://google.aip.dev/155 for more details.
566
+ #
567
+ # @yield [response, operation] Access the result along with the RPC operation
568
+ # @yieldparam response [::Gapic::Operation]
569
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
570
+ #
571
+ # @return [::Gapic::Operation]
572
+ #
573
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
+ #
575
+ # @example Basic example
576
+ # require "google/cloud/network_security/v1"
577
+ #
578
+ # # Create a client object. The client can be reused for multiple calls.
579
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
580
+ #
581
+ # # Create a request. To set request fields, pass in keyword arguments.
582
+ # request = Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupRequest.new
583
+ #
584
+ # # Call the update_mirroring_endpoint_group method.
585
+ # result = client.update_mirroring_endpoint_group request
586
+ #
587
+ # # The returned object is of type Gapic::Operation. You can use it to
588
+ # # check the status of an operation, cancel it, or wait for results.
589
+ # # Here is how to wait for a response.
590
+ # result.wait_until_done! timeout: 60
591
+ # if result.response?
592
+ # p result.response
593
+ # else
594
+ # puts "No response received."
595
+ # end
596
+ #
597
+ def update_mirroring_endpoint_group request, options = nil
598
+ raise ::ArgumentError, "request must be provided" if request.nil?
599
+
600
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupRequest
601
+
602
+ # Converts hash and nil to an options object
603
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
604
+
605
+ # Customize the options with defaults
606
+ metadata = @config.rpcs.update_mirroring_endpoint_group.metadata.to_h
607
+
608
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
609
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
610
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
611
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
612
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
613
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
614
+
615
+ header_params = {}
616
+ if request.mirroring_endpoint_group&.name
617
+ header_params["mirroring_endpoint_group.name"] = request.mirroring_endpoint_group.name
618
+ end
619
+
620
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
621
+ metadata[:"x-goog-request-params"] ||= request_params_header
622
+
623
+ options.apply_defaults timeout: @config.rpcs.update_mirroring_endpoint_group.timeout,
624
+ metadata: metadata,
625
+ retry_policy: @config.rpcs.update_mirroring_endpoint_group.retry_policy
626
+
627
+ options.apply_defaults timeout: @config.timeout,
628
+ metadata: @config.metadata,
629
+ retry_policy: @config.retry_policy
630
+
631
+ @mirroring_stub.call_rpc :update_mirroring_endpoint_group, request, options: options do |response, operation|
632
+ response = ::Gapic::Operation.new response, @operations_client, options: options
633
+ yield response, operation if block_given?
634
+ throw :response, response
635
+ end
636
+ rescue ::GRPC::BadStatus => e
637
+ raise ::Google::Cloud::Error.from_error(e)
638
+ end
639
+
640
+ ##
641
+ # Deletes an endpoint group.
642
+ # See https://google.aip.dev/135.
643
+ #
644
+ # @overload delete_mirroring_endpoint_group(request, options = nil)
645
+ # Pass arguments to `delete_mirroring_endpoint_group` via a request object, either of type
646
+ # {::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupRequest} or an equivalent Hash.
647
+ #
648
+ # @param request [::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupRequest, ::Hash]
649
+ # A request object representing the call parameters. Required. To specify no
650
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
651
+ # @param options [::Gapic::CallOptions, ::Hash]
652
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
653
+ #
654
+ # @overload delete_mirroring_endpoint_group(name: nil, request_id: nil)
655
+ # Pass arguments to `delete_mirroring_endpoint_group` via keyword arguments. Note that at
656
+ # least one keyword argument is required. To specify no parameters, or to keep all
657
+ # the default parameter values, pass an empty Hash as a request object (see above).
658
+ #
659
+ # @param name [::String]
660
+ # Required. The endpoint group to delete.
661
+ # @param request_id [::String]
662
+ # Optional. A unique identifier for this request. Must be a UUID4.
663
+ # This request is only idempotent if a `request_id` is provided.
664
+ # See https://google.aip.dev/155 for more details.
665
+ #
666
+ # @yield [response, operation] Access the result along with the RPC operation
667
+ # @yieldparam response [::Gapic::Operation]
668
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
669
+ #
670
+ # @return [::Gapic::Operation]
671
+ #
672
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
673
+ #
674
+ # @example Basic example
675
+ # require "google/cloud/network_security/v1"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupRequest.new
682
+ #
683
+ # # Call the delete_mirroring_endpoint_group method.
684
+ # result = client.delete_mirroring_endpoint_group request
685
+ #
686
+ # # The returned object is of type Gapic::Operation. You can use it to
687
+ # # check the status of an operation, cancel it, or wait for results.
688
+ # # Here is how to wait for a response.
689
+ # result.wait_until_done! timeout: 60
690
+ # if result.response?
691
+ # p result.response
692
+ # else
693
+ # puts "No response received."
694
+ # end
695
+ #
696
+ def delete_mirroring_endpoint_group request, options = nil
697
+ raise ::ArgumentError, "request must be provided" if request.nil?
698
+
699
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupRequest
700
+
701
+ # Converts hash and nil to an options object
702
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
703
+
704
+ # Customize the options with defaults
705
+ metadata = @config.rpcs.delete_mirroring_endpoint_group.metadata.to_h
706
+
707
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
708
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
709
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
710
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
711
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
712
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
+
714
+ header_params = {}
715
+ if request.name
716
+ header_params["name"] = request.name
717
+ end
718
+
719
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
720
+ metadata[:"x-goog-request-params"] ||= request_params_header
721
+
722
+ options.apply_defaults timeout: @config.rpcs.delete_mirroring_endpoint_group.timeout,
723
+ metadata: metadata,
724
+ retry_policy: @config.rpcs.delete_mirroring_endpoint_group.retry_policy
725
+
726
+ options.apply_defaults timeout: @config.timeout,
727
+ metadata: @config.metadata,
728
+ retry_policy: @config.retry_policy
729
+
730
+ @mirroring_stub.call_rpc :delete_mirroring_endpoint_group, request, options: options do |response, operation|
731
+ response = ::Gapic::Operation.new response, @operations_client, options: options
732
+ yield response, operation if block_given?
733
+ throw :response, response
734
+ end
735
+ rescue ::GRPC::BadStatus => e
736
+ raise ::Google::Cloud::Error.from_error(e)
737
+ end
738
+
739
+ ##
740
+ # Lists associations in a given project and location.
741
+ # See https://google.aip.dev/132.
742
+ #
743
+ # @overload list_mirroring_endpoint_group_associations(request, options = nil)
744
+ # Pass arguments to `list_mirroring_endpoint_group_associations` via a request object, either of type
745
+ # {::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupAssociationsRequest} or an equivalent Hash.
746
+ #
747
+ # @param request [::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupAssociationsRequest, ::Hash]
748
+ # A request object representing the call parameters. Required. To specify no
749
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
750
+ # @param options [::Gapic::CallOptions, ::Hash]
751
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
752
+ #
753
+ # @overload list_mirroring_endpoint_group_associations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
754
+ # Pass arguments to `list_mirroring_endpoint_group_associations` via keyword arguments. Note that at
755
+ # least one keyword argument is required. To specify no parameters, or to keep all
756
+ # the default parameter values, pass an empty Hash as a request object (see above).
757
+ #
758
+ # @param parent [::String]
759
+ # Required. The parent, which owns this collection of associations.
760
+ # Example: `projects/123456789/locations/global`.
761
+ # See https://google.aip.dev/132 for more details.
762
+ # @param page_size [::Integer]
763
+ # Optional. Requested page size. Server may return fewer items than
764
+ # requested. If unspecified, server will pick an appropriate default. See
765
+ # https://google.aip.dev/158 for more details.
766
+ # @param page_token [::String]
767
+ # Optional. A page token, received from a previous
768
+ # `ListMirroringEndpointGroups` call. Provide this to retrieve the subsequent
769
+ # page. When paginating, all other parameters provided to
770
+ # `ListMirroringEndpointGroups` must match the call that provided the page
771
+ # token. See https://google.aip.dev/158 for more details.
772
+ # @param filter [::String]
773
+ # Optional. Filter expression.
774
+ # See https://google.aip.dev/160#filtering for more details.
775
+ # @param order_by [::String]
776
+ # Optional. Sort expression.
777
+ # See https://google.aip.dev/132#ordering for more details.
778
+ #
779
+ # @yield [response, operation] Access the result along with the RPC operation
780
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation>]
781
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
782
+ #
783
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation>]
784
+ #
785
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
786
+ #
787
+ # @example Basic example
788
+ # require "google/cloud/network_security/v1"
789
+ #
790
+ # # Create a client object. The client can be reused for multiple calls.
791
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
792
+ #
793
+ # # Create a request. To set request fields, pass in keyword arguments.
794
+ # request = Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupAssociationsRequest.new
795
+ #
796
+ # # Call the list_mirroring_endpoint_group_associations method.
797
+ # result = client.list_mirroring_endpoint_group_associations request
798
+ #
799
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
800
+ # # over elements, and API calls will be issued to fetch pages as needed.
801
+ # result.each do |item|
802
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation.
803
+ # p item
804
+ # end
805
+ #
806
+ def list_mirroring_endpoint_group_associations request, options = nil
807
+ raise ::ArgumentError, "request must be provided" if request.nil?
808
+
809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListMirroringEndpointGroupAssociationsRequest
810
+
811
+ # Converts hash and nil to an options object
812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
813
+
814
+ # Customize the options with defaults
815
+ metadata = @config.rpcs.list_mirroring_endpoint_group_associations.metadata.to_h
816
+
817
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
818
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
820
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
821
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
822
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
823
+
824
+ header_params = {}
825
+ if request.parent
826
+ header_params["parent"] = request.parent
827
+ end
828
+
829
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
830
+ metadata[:"x-goog-request-params"] ||= request_params_header
831
+
832
+ options.apply_defaults timeout: @config.rpcs.list_mirroring_endpoint_group_associations.timeout,
833
+ metadata: metadata,
834
+ retry_policy: @config.rpcs.list_mirroring_endpoint_group_associations.retry_policy
835
+
836
+ options.apply_defaults timeout: @config.timeout,
837
+ metadata: @config.metadata,
838
+ retry_policy: @config.retry_policy
839
+
840
+ @mirroring_stub.call_rpc :list_mirroring_endpoint_group_associations, request, options: options do |response, operation|
841
+ response = ::Gapic::PagedEnumerable.new @mirroring_stub, :list_mirroring_endpoint_group_associations, request, response, operation, options
842
+ yield response, operation if block_given?
843
+ throw :response, response
844
+ end
845
+ rescue ::GRPC::BadStatus => e
846
+ raise ::Google::Cloud::Error.from_error(e)
847
+ end
848
+
849
+ ##
850
+ # Gets a specific association.
851
+ # See https://google.aip.dev/131.
852
+ #
853
+ # @overload get_mirroring_endpoint_group_association(request, options = nil)
854
+ # Pass arguments to `get_mirroring_endpoint_group_association` via a request object, either of type
855
+ # {::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupAssociationRequest} or an equivalent Hash.
856
+ #
857
+ # @param request [::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupAssociationRequest, ::Hash]
858
+ # A request object representing the call parameters. Required. To specify no
859
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
860
+ # @param options [::Gapic::CallOptions, ::Hash]
861
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
862
+ #
863
+ # @overload get_mirroring_endpoint_group_association(name: nil)
864
+ # Pass arguments to `get_mirroring_endpoint_group_association` via keyword arguments. Note that at
865
+ # least one keyword argument is required. To specify no parameters, or to keep all
866
+ # the default parameter values, pass an empty Hash as a request object (see above).
867
+ #
868
+ # @param name [::String]
869
+ # Required. The name of the association to retrieve.
870
+ # Format:
871
+ # projects/\\{project}/locations/\\{location}/mirroringEndpointGroupAssociations/\\{mirroring_endpoint_group_association}
872
+ #
873
+ # @yield [response, operation] Access the result along with the RPC operation
874
+ # @yieldparam response [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation]
875
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
876
+ #
877
+ # @return [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation]
878
+ #
879
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
880
+ #
881
+ # @example Basic example
882
+ # require "google/cloud/network_security/v1"
883
+ #
884
+ # # Create a client object. The client can be reused for multiple calls.
885
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
886
+ #
887
+ # # Create a request. To set request fields, pass in keyword arguments.
888
+ # request = Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupAssociationRequest.new
889
+ #
890
+ # # Call the get_mirroring_endpoint_group_association method.
891
+ # result = client.get_mirroring_endpoint_group_association request
892
+ #
893
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation.
894
+ # p result
895
+ #
896
+ def get_mirroring_endpoint_group_association request, options = nil
897
+ raise ::ArgumentError, "request must be provided" if request.nil?
898
+
899
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetMirroringEndpointGroupAssociationRequest
900
+
901
+ # Converts hash and nil to an options object
902
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
903
+
904
+ # Customize the options with defaults
905
+ metadata = @config.rpcs.get_mirroring_endpoint_group_association.metadata.to_h
906
+
907
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
908
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
909
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
910
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
911
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
912
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
913
+
914
+ header_params = {}
915
+ if request.name
916
+ header_params["name"] = request.name
917
+ end
918
+
919
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
920
+ metadata[:"x-goog-request-params"] ||= request_params_header
921
+
922
+ options.apply_defaults timeout: @config.rpcs.get_mirroring_endpoint_group_association.timeout,
923
+ metadata: metadata,
924
+ retry_policy: @config.rpcs.get_mirroring_endpoint_group_association.retry_policy
925
+
926
+ options.apply_defaults timeout: @config.timeout,
927
+ metadata: @config.metadata,
928
+ retry_policy: @config.retry_policy
929
+
930
+ @mirroring_stub.call_rpc :get_mirroring_endpoint_group_association, request, options: options do |response, operation|
931
+ yield response, operation if block_given?
932
+ end
933
+ rescue ::GRPC::BadStatus => e
934
+ raise ::Google::Cloud::Error.from_error(e)
935
+ end
936
+
937
+ ##
938
+ # Creates an association in a given project and location.
939
+ # See https://google.aip.dev/133.
940
+ #
941
+ # @overload create_mirroring_endpoint_group_association(request, options = nil)
942
+ # Pass arguments to `create_mirroring_endpoint_group_association` via a request object, either of type
943
+ # {::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupAssociationRequest} or an equivalent Hash.
944
+ #
945
+ # @param request [::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupAssociationRequest, ::Hash]
946
+ # A request object representing the call parameters. Required. To specify no
947
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
948
+ # @param options [::Gapic::CallOptions, ::Hash]
949
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
950
+ #
951
+ # @overload create_mirroring_endpoint_group_association(parent: nil, mirroring_endpoint_group_association_id: nil, mirroring_endpoint_group_association: nil, request_id: nil)
952
+ # Pass arguments to `create_mirroring_endpoint_group_association` via keyword arguments. Note that at
953
+ # least one keyword argument is required. To specify no parameters, or to keep all
954
+ # the default parameter values, pass an empty Hash as a request object (see above).
955
+ #
956
+ # @param parent [::String]
957
+ # Required. The parent resource where this association will be created.
958
+ # Format: projects/\\{project}/locations/\\{location}
959
+ # @param mirroring_endpoint_group_association_id [::String]
960
+ # Optional. The ID to use for the new association, which will become the
961
+ # final component of the endpoint group's resource name. If not provided, the
962
+ # server will generate a unique ID.
963
+ # @param mirroring_endpoint_group_association [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation, ::Hash]
964
+ # Required. The association to create.
965
+ # @param request_id [::String]
966
+ # Optional. A unique identifier for this request. Must be a UUID4.
967
+ # This request is only idempotent if a `request_id` is provided.
968
+ # See https://google.aip.dev/155 for more details.
969
+ #
970
+ # @yield [response, operation] Access the result along with the RPC operation
971
+ # @yieldparam response [::Gapic::Operation]
972
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
973
+ #
974
+ # @return [::Gapic::Operation]
975
+ #
976
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
977
+ #
978
+ # @example Basic example
979
+ # require "google/cloud/network_security/v1"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupAssociationRequest.new
986
+ #
987
+ # # Call the create_mirroring_endpoint_group_association method.
988
+ # result = client.create_mirroring_endpoint_group_association request
989
+ #
990
+ # # The returned object is of type Gapic::Operation. You can use it to
991
+ # # check the status of an operation, cancel it, or wait for results.
992
+ # # Here is how to wait for a response.
993
+ # result.wait_until_done! timeout: 60
994
+ # if result.response?
995
+ # p result.response
996
+ # else
997
+ # puts "No response received."
998
+ # end
999
+ #
1000
+ def create_mirroring_endpoint_group_association request, options = nil
1001
+ raise ::ArgumentError, "request must be provided" if request.nil?
1002
+
1003
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateMirroringEndpointGroupAssociationRequest
1004
+
1005
+ # Converts hash and nil to an options object
1006
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1007
+
1008
+ # Customize the options with defaults
1009
+ metadata = @config.rpcs.create_mirroring_endpoint_group_association.metadata.to_h
1010
+
1011
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1012
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1013
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1014
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1015
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1016
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1018
+ header_params = {}
1019
+ if request.parent
1020
+ header_params["parent"] = request.parent
1021
+ end
1022
+
1023
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1024
+ metadata[:"x-goog-request-params"] ||= request_params_header
1025
+
1026
+ options.apply_defaults timeout: @config.rpcs.create_mirroring_endpoint_group_association.timeout,
1027
+ metadata: metadata,
1028
+ retry_policy: @config.rpcs.create_mirroring_endpoint_group_association.retry_policy
1029
+
1030
+ options.apply_defaults timeout: @config.timeout,
1031
+ metadata: @config.metadata,
1032
+ retry_policy: @config.retry_policy
1033
+
1034
+ @mirroring_stub.call_rpc :create_mirroring_endpoint_group_association, request, options: options do |response, operation|
1035
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1036
+ yield response, operation if block_given?
1037
+ throw :response, response
1038
+ end
1039
+ rescue ::GRPC::BadStatus => e
1040
+ raise ::Google::Cloud::Error.from_error(e)
1041
+ end
1042
+
1043
+ ##
1044
+ # Updates an association.
1045
+ # See https://google.aip.dev/134.
1046
+ #
1047
+ # @overload update_mirroring_endpoint_group_association(request, options = nil)
1048
+ # Pass arguments to `update_mirroring_endpoint_group_association` via a request object, either of type
1049
+ # {::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupAssociationRequest} or an equivalent Hash.
1050
+ #
1051
+ # @param request [::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupAssociationRequest, ::Hash]
1052
+ # A request object representing the call parameters. Required. To specify no
1053
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1054
+ # @param options [::Gapic::CallOptions, ::Hash]
1055
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1056
+ #
1057
+ # @overload update_mirroring_endpoint_group_association(update_mask: nil, mirroring_endpoint_group_association: nil, request_id: nil)
1058
+ # Pass arguments to `update_mirroring_endpoint_group_association` via keyword arguments. Note that at
1059
+ # least one keyword argument is required. To specify no parameters, or to keep all
1060
+ # the default parameter values, pass an empty Hash as a request object (see above).
1061
+ #
1062
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1063
+ # Optional. The list of fields to update.
1064
+ # Fields are specified relative to the association
1065
+ # (e.g. `description`; *not*
1066
+ # `mirroring_endpoint_group_association.description`). See
1067
+ # https://google.aip.dev/161 for more details.
1068
+ # @param mirroring_endpoint_group_association [::Google::Cloud::NetworkSecurity::V1::MirroringEndpointGroupAssociation, ::Hash]
1069
+ # Required. The association to update.
1070
+ # @param request_id [::String]
1071
+ # Optional. A unique identifier for this request. Must be a UUID4.
1072
+ # This request is only idempotent if a `request_id` is provided.
1073
+ # See https://google.aip.dev/155 for more details.
1074
+ #
1075
+ # @yield [response, operation] Access the result along with the RPC operation
1076
+ # @yieldparam response [::Gapic::Operation]
1077
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1078
+ #
1079
+ # @return [::Gapic::Operation]
1080
+ #
1081
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1082
+ #
1083
+ # @example Basic example
1084
+ # require "google/cloud/network_security/v1"
1085
+ #
1086
+ # # Create a client object. The client can be reused for multiple calls.
1087
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1088
+ #
1089
+ # # Create a request. To set request fields, pass in keyword arguments.
1090
+ # request = Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupAssociationRequest.new
1091
+ #
1092
+ # # Call the update_mirroring_endpoint_group_association method.
1093
+ # result = client.update_mirroring_endpoint_group_association request
1094
+ #
1095
+ # # The returned object is of type Gapic::Operation. You can use it to
1096
+ # # check the status of an operation, cancel it, or wait for results.
1097
+ # # Here is how to wait for a response.
1098
+ # result.wait_until_done! timeout: 60
1099
+ # if result.response?
1100
+ # p result.response
1101
+ # else
1102
+ # puts "No response received."
1103
+ # end
1104
+ #
1105
+ def update_mirroring_endpoint_group_association request, options = nil
1106
+ raise ::ArgumentError, "request must be provided" if request.nil?
1107
+
1108
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateMirroringEndpointGroupAssociationRequest
1109
+
1110
+ # Converts hash and nil to an options object
1111
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1112
+
1113
+ # Customize the options with defaults
1114
+ metadata = @config.rpcs.update_mirroring_endpoint_group_association.metadata.to_h
1115
+
1116
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1117
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1118
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1119
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1120
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1121
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1122
+
1123
+ header_params = {}
1124
+ if request.mirroring_endpoint_group_association&.name
1125
+ header_params["mirroring_endpoint_group_association.name"] = request.mirroring_endpoint_group_association.name
1126
+ end
1127
+
1128
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1129
+ metadata[:"x-goog-request-params"] ||= request_params_header
1130
+
1131
+ options.apply_defaults timeout: @config.rpcs.update_mirroring_endpoint_group_association.timeout,
1132
+ metadata: metadata,
1133
+ retry_policy: @config.rpcs.update_mirroring_endpoint_group_association.retry_policy
1134
+
1135
+ options.apply_defaults timeout: @config.timeout,
1136
+ metadata: @config.metadata,
1137
+ retry_policy: @config.retry_policy
1138
+
1139
+ @mirroring_stub.call_rpc :update_mirroring_endpoint_group_association, request, options: options do |response, operation|
1140
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1141
+ yield response, operation if block_given?
1142
+ throw :response, response
1143
+ end
1144
+ rescue ::GRPC::BadStatus => e
1145
+ raise ::Google::Cloud::Error.from_error(e)
1146
+ end
1147
+
1148
+ ##
1149
+ # Deletes an association.
1150
+ # See https://google.aip.dev/135.
1151
+ #
1152
+ # @overload delete_mirroring_endpoint_group_association(request, options = nil)
1153
+ # Pass arguments to `delete_mirroring_endpoint_group_association` via a request object, either of type
1154
+ # {::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupAssociationRequest} or an equivalent Hash.
1155
+ #
1156
+ # @param request [::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupAssociationRequest, ::Hash]
1157
+ # A request object representing the call parameters. Required. To specify no
1158
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1159
+ # @param options [::Gapic::CallOptions, ::Hash]
1160
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1161
+ #
1162
+ # @overload delete_mirroring_endpoint_group_association(name: nil, request_id: nil)
1163
+ # Pass arguments to `delete_mirroring_endpoint_group_association` via keyword arguments. Note that at
1164
+ # least one keyword argument is required. To specify no parameters, or to keep all
1165
+ # the default parameter values, pass an empty Hash as a request object (see above).
1166
+ #
1167
+ # @param name [::String]
1168
+ # Required. The association to delete.
1169
+ # @param request_id [::String]
1170
+ # Optional. A unique identifier for this request. Must be a UUID4.
1171
+ # This request is only idempotent if a `request_id` is provided.
1172
+ # See https://google.aip.dev/155 for more details.
1173
+ #
1174
+ # @yield [response, operation] Access the result along with the RPC operation
1175
+ # @yieldparam response [::Gapic::Operation]
1176
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1177
+ #
1178
+ # @return [::Gapic::Operation]
1179
+ #
1180
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1181
+ #
1182
+ # @example Basic example
1183
+ # require "google/cloud/network_security/v1"
1184
+ #
1185
+ # # Create a client object. The client can be reused for multiple calls.
1186
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1187
+ #
1188
+ # # Create a request. To set request fields, pass in keyword arguments.
1189
+ # request = Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupAssociationRequest.new
1190
+ #
1191
+ # # Call the delete_mirroring_endpoint_group_association method.
1192
+ # result = client.delete_mirroring_endpoint_group_association request
1193
+ #
1194
+ # # The returned object is of type Gapic::Operation. You can use it to
1195
+ # # check the status of an operation, cancel it, or wait for results.
1196
+ # # Here is how to wait for a response.
1197
+ # result.wait_until_done! timeout: 60
1198
+ # if result.response?
1199
+ # p result.response
1200
+ # else
1201
+ # puts "No response received."
1202
+ # end
1203
+ #
1204
+ def delete_mirroring_endpoint_group_association request, options = nil
1205
+ raise ::ArgumentError, "request must be provided" if request.nil?
1206
+
1207
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteMirroringEndpointGroupAssociationRequest
1208
+
1209
+ # Converts hash and nil to an options object
1210
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1211
+
1212
+ # Customize the options with defaults
1213
+ metadata = @config.rpcs.delete_mirroring_endpoint_group_association.metadata.to_h
1214
+
1215
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1216
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1217
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1218
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1219
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1220
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1221
+
1222
+ header_params = {}
1223
+ if request.name
1224
+ header_params["name"] = request.name
1225
+ end
1226
+
1227
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1228
+ metadata[:"x-goog-request-params"] ||= request_params_header
1229
+
1230
+ options.apply_defaults timeout: @config.rpcs.delete_mirroring_endpoint_group_association.timeout,
1231
+ metadata: metadata,
1232
+ retry_policy: @config.rpcs.delete_mirroring_endpoint_group_association.retry_policy
1233
+
1234
+ options.apply_defaults timeout: @config.timeout,
1235
+ metadata: @config.metadata,
1236
+ retry_policy: @config.retry_policy
1237
+
1238
+ @mirroring_stub.call_rpc :delete_mirroring_endpoint_group_association, request, options: options do |response, operation|
1239
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1240
+ yield response, operation if block_given?
1241
+ throw :response, response
1242
+ end
1243
+ rescue ::GRPC::BadStatus => e
1244
+ raise ::Google::Cloud::Error.from_error(e)
1245
+ end
1246
+
1247
+ ##
1248
+ # Lists deployment groups in a given project and location.
1249
+ # See https://google.aip.dev/132.
1250
+ #
1251
+ # @overload list_mirroring_deployment_groups(request, options = nil)
1252
+ # Pass arguments to `list_mirroring_deployment_groups` via a request object, either of type
1253
+ # {::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentGroupsRequest} or an equivalent Hash.
1254
+ #
1255
+ # @param request [::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentGroupsRequest, ::Hash]
1256
+ # A request object representing the call parameters. Required. To specify no
1257
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1258
+ # @param options [::Gapic::CallOptions, ::Hash]
1259
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1260
+ #
1261
+ # @overload list_mirroring_deployment_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1262
+ # Pass arguments to `list_mirroring_deployment_groups` via keyword arguments. Note that at
1263
+ # least one keyword argument is required. To specify no parameters, or to keep all
1264
+ # the default parameter values, pass an empty Hash as a request object (see above).
1265
+ #
1266
+ # @param parent [::String]
1267
+ # Required. The parent, which owns this collection of deployment groups.
1268
+ # Example: `projects/123456789/locations/global`.
1269
+ # See https://google.aip.dev/132 for more details.
1270
+ # @param page_size [::Integer]
1271
+ # Optional. Requested page size. Server may return fewer items than
1272
+ # requested. If unspecified, server will pick an appropriate default. See
1273
+ # https://google.aip.dev/158 for more details.
1274
+ # @param page_token [::String]
1275
+ # Optional. A page token, received from a previous
1276
+ # `ListMirroringDeploymentGroups` call. Provide this to retrieve the
1277
+ # subsequent page. When paginating, all other parameters provided to
1278
+ # `ListMirroringDeploymentGroups` must match the call that provided the page
1279
+ # token. See https://google.aip.dev/158 for more details.
1280
+ # @param filter [::String]
1281
+ # Optional. Filter expression.
1282
+ # See https://google.aip.dev/160#filtering for more details.
1283
+ # @param order_by [::String]
1284
+ # Optional. Sort expression.
1285
+ # See https://google.aip.dev/132#ordering for more details.
1286
+ #
1287
+ # @yield [response, operation] Access the result along with the RPC operation
1288
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup>]
1289
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1290
+ #
1291
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup>]
1292
+ #
1293
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1294
+ #
1295
+ # @example Basic example
1296
+ # require "google/cloud/network_security/v1"
1297
+ #
1298
+ # # Create a client object. The client can be reused for multiple calls.
1299
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1300
+ #
1301
+ # # Create a request. To set request fields, pass in keyword arguments.
1302
+ # request = Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentGroupsRequest.new
1303
+ #
1304
+ # # Call the list_mirroring_deployment_groups method.
1305
+ # result = client.list_mirroring_deployment_groups request
1306
+ #
1307
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1308
+ # # over elements, and API calls will be issued to fetch pages as needed.
1309
+ # result.each do |item|
1310
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup.
1311
+ # p item
1312
+ # end
1313
+ #
1314
+ def list_mirroring_deployment_groups request, options = nil
1315
+ raise ::ArgumentError, "request must be provided" if request.nil?
1316
+
1317
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentGroupsRequest
1318
+
1319
+ # Converts hash and nil to an options object
1320
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1321
+
1322
+ # Customize the options with defaults
1323
+ metadata = @config.rpcs.list_mirroring_deployment_groups.metadata.to_h
1324
+
1325
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1326
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1327
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1328
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1329
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1330
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1331
+
1332
+ header_params = {}
1333
+ if request.parent
1334
+ header_params["parent"] = request.parent
1335
+ end
1336
+
1337
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1338
+ metadata[:"x-goog-request-params"] ||= request_params_header
1339
+
1340
+ options.apply_defaults timeout: @config.rpcs.list_mirroring_deployment_groups.timeout,
1341
+ metadata: metadata,
1342
+ retry_policy: @config.rpcs.list_mirroring_deployment_groups.retry_policy
1343
+
1344
+ options.apply_defaults timeout: @config.timeout,
1345
+ metadata: @config.metadata,
1346
+ retry_policy: @config.retry_policy
1347
+
1348
+ @mirroring_stub.call_rpc :list_mirroring_deployment_groups, request, options: options do |response, operation|
1349
+ response = ::Gapic::PagedEnumerable.new @mirroring_stub, :list_mirroring_deployment_groups, request, response, operation, options
1350
+ yield response, operation if block_given?
1351
+ throw :response, response
1352
+ end
1353
+ rescue ::GRPC::BadStatus => e
1354
+ raise ::Google::Cloud::Error.from_error(e)
1355
+ end
1356
+
1357
+ ##
1358
+ # Gets a specific deployment group.
1359
+ # See https://google.aip.dev/131.
1360
+ #
1361
+ # @overload get_mirroring_deployment_group(request, options = nil)
1362
+ # Pass arguments to `get_mirroring_deployment_group` via a request object, either of type
1363
+ # {::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentGroupRequest} or an equivalent Hash.
1364
+ #
1365
+ # @param request [::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentGroupRequest, ::Hash]
1366
+ # A request object representing the call parameters. Required. To specify no
1367
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1368
+ # @param options [::Gapic::CallOptions, ::Hash]
1369
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1370
+ #
1371
+ # @overload get_mirroring_deployment_group(name: nil)
1372
+ # Pass arguments to `get_mirroring_deployment_group` via keyword arguments. Note that at
1373
+ # least one keyword argument is required. To specify no parameters, or to keep all
1374
+ # the default parameter values, pass an empty Hash as a request object (see above).
1375
+ #
1376
+ # @param name [::String]
1377
+ # Required. The name of the deployment group to retrieve.
1378
+ # Format:
1379
+ # projects/\\{project}/locations/\\{location}/mirroringDeploymentGroups/\\{mirroring_deployment_group}
1380
+ #
1381
+ # @yield [response, operation] Access the result along with the RPC operation
1382
+ # @yieldparam response [::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup]
1383
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1384
+ #
1385
+ # @return [::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup]
1386
+ #
1387
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1388
+ #
1389
+ # @example Basic example
1390
+ # require "google/cloud/network_security/v1"
1391
+ #
1392
+ # # Create a client object. The client can be reused for multiple calls.
1393
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1394
+ #
1395
+ # # Create a request. To set request fields, pass in keyword arguments.
1396
+ # request = Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentGroupRequest.new
1397
+ #
1398
+ # # Call the get_mirroring_deployment_group method.
1399
+ # result = client.get_mirroring_deployment_group request
1400
+ #
1401
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup.
1402
+ # p result
1403
+ #
1404
+ def get_mirroring_deployment_group request, options = nil
1405
+ raise ::ArgumentError, "request must be provided" if request.nil?
1406
+
1407
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentGroupRequest
1408
+
1409
+ # Converts hash and nil to an options object
1410
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1411
+
1412
+ # Customize the options with defaults
1413
+ metadata = @config.rpcs.get_mirroring_deployment_group.metadata.to_h
1414
+
1415
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1416
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1417
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1418
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1419
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1420
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1421
+
1422
+ header_params = {}
1423
+ if request.name
1424
+ header_params["name"] = request.name
1425
+ end
1426
+
1427
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1428
+ metadata[:"x-goog-request-params"] ||= request_params_header
1429
+
1430
+ options.apply_defaults timeout: @config.rpcs.get_mirroring_deployment_group.timeout,
1431
+ metadata: metadata,
1432
+ retry_policy: @config.rpcs.get_mirroring_deployment_group.retry_policy
1433
+
1434
+ options.apply_defaults timeout: @config.timeout,
1435
+ metadata: @config.metadata,
1436
+ retry_policy: @config.retry_policy
1437
+
1438
+ @mirroring_stub.call_rpc :get_mirroring_deployment_group, request, options: options do |response, operation|
1439
+ yield response, operation if block_given?
1440
+ end
1441
+ rescue ::GRPC::BadStatus => e
1442
+ raise ::Google::Cloud::Error.from_error(e)
1443
+ end
1444
+
1445
+ ##
1446
+ # Creates a deployment group in a given project and location.
1447
+ # See https://google.aip.dev/133.
1448
+ #
1449
+ # @overload create_mirroring_deployment_group(request, options = nil)
1450
+ # Pass arguments to `create_mirroring_deployment_group` via a request object, either of type
1451
+ # {::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentGroupRequest} or an equivalent Hash.
1452
+ #
1453
+ # @param request [::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentGroupRequest, ::Hash]
1454
+ # A request object representing the call parameters. Required. To specify no
1455
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1456
+ # @param options [::Gapic::CallOptions, ::Hash]
1457
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1458
+ #
1459
+ # @overload create_mirroring_deployment_group(parent: nil, mirroring_deployment_group_id: nil, mirroring_deployment_group: nil, request_id: nil)
1460
+ # Pass arguments to `create_mirroring_deployment_group` via keyword arguments. Note that at
1461
+ # least one keyword argument is required. To specify no parameters, or to keep all
1462
+ # the default parameter values, pass an empty Hash as a request object (see above).
1463
+ #
1464
+ # @param parent [::String]
1465
+ # Required. The parent resource where this deployment group will be created.
1466
+ # Format: projects/\\{project}/locations/\\{location}
1467
+ # @param mirroring_deployment_group_id [::String]
1468
+ # Required. The ID to use for the new deployment group, which will become the
1469
+ # final component of the deployment group's resource name.
1470
+ # @param mirroring_deployment_group [::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup, ::Hash]
1471
+ # Required. The deployment group to create.
1472
+ # @param request_id [::String]
1473
+ # Optional. A unique identifier for this request. Must be a UUID4.
1474
+ # This request is only idempotent if a `request_id` is provided.
1475
+ # See https://google.aip.dev/155 for more details.
1476
+ #
1477
+ # @yield [response, operation] Access the result along with the RPC operation
1478
+ # @yieldparam response [::Gapic::Operation]
1479
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1480
+ #
1481
+ # @return [::Gapic::Operation]
1482
+ #
1483
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1484
+ #
1485
+ # @example Basic example
1486
+ # require "google/cloud/network_security/v1"
1487
+ #
1488
+ # # Create a client object. The client can be reused for multiple calls.
1489
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1490
+ #
1491
+ # # Create a request. To set request fields, pass in keyword arguments.
1492
+ # request = Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentGroupRequest.new
1493
+ #
1494
+ # # Call the create_mirroring_deployment_group method.
1495
+ # result = client.create_mirroring_deployment_group request
1496
+ #
1497
+ # # The returned object is of type Gapic::Operation. You can use it to
1498
+ # # check the status of an operation, cancel it, or wait for results.
1499
+ # # Here is how to wait for a response.
1500
+ # result.wait_until_done! timeout: 60
1501
+ # if result.response?
1502
+ # p result.response
1503
+ # else
1504
+ # puts "No response received."
1505
+ # end
1506
+ #
1507
+ def create_mirroring_deployment_group request, options = nil
1508
+ raise ::ArgumentError, "request must be provided" if request.nil?
1509
+
1510
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentGroupRequest
1511
+
1512
+ # Converts hash and nil to an options object
1513
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1514
+
1515
+ # Customize the options with defaults
1516
+ metadata = @config.rpcs.create_mirroring_deployment_group.metadata.to_h
1517
+
1518
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1519
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1520
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1521
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1522
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1523
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1524
+
1525
+ header_params = {}
1526
+ if request.parent
1527
+ header_params["parent"] = request.parent
1528
+ end
1529
+
1530
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1531
+ metadata[:"x-goog-request-params"] ||= request_params_header
1532
+
1533
+ options.apply_defaults timeout: @config.rpcs.create_mirroring_deployment_group.timeout,
1534
+ metadata: metadata,
1535
+ retry_policy: @config.rpcs.create_mirroring_deployment_group.retry_policy
1536
+
1537
+ options.apply_defaults timeout: @config.timeout,
1538
+ metadata: @config.metadata,
1539
+ retry_policy: @config.retry_policy
1540
+
1541
+ @mirroring_stub.call_rpc :create_mirroring_deployment_group, request, options: options do |response, operation|
1542
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1543
+ yield response, operation if block_given?
1544
+ throw :response, response
1545
+ end
1546
+ rescue ::GRPC::BadStatus => e
1547
+ raise ::Google::Cloud::Error.from_error(e)
1548
+ end
1549
+
1550
+ ##
1551
+ # Updates a deployment group.
1552
+ # See https://google.aip.dev/134.
1553
+ #
1554
+ # @overload update_mirroring_deployment_group(request, options = nil)
1555
+ # Pass arguments to `update_mirroring_deployment_group` via a request object, either of type
1556
+ # {::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentGroupRequest} or an equivalent Hash.
1557
+ #
1558
+ # @param request [::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentGroupRequest, ::Hash]
1559
+ # A request object representing the call parameters. Required. To specify no
1560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1561
+ # @param options [::Gapic::CallOptions, ::Hash]
1562
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1563
+ #
1564
+ # @overload update_mirroring_deployment_group(update_mask: nil, mirroring_deployment_group: nil, request_id: nil)
1565
+ # Pass arguments to `update_mirroring_deployment_group` via keyword arguments. Note that at
1566
+ # least one keyword argument is required. To specify no parameters, or to keep all
1567
+ # the default parameter values, pass an empty Hash as a request object (see above).
1568
+ #
1569
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1570
+ # Optional. The list of fields to update.
1571
+ # Fields are specified relative to the deployment group
1572
+ # (e.g. `description`; *not*
1573
+ # `mirroring_deployment_group.description`). See
1574
+ # https://google.aip.dev/161 for more details.
1575
+ # @param mirroring_deployment_group [::Google::Cloud::NetworkSecurity::V1::MirroringDeploymentGroup, ::Hash]
1576
+ # Required. The deployment group to update.
1577
+ # @param request_id [::String]
1578
+ # Optional. A unique identifier for this request. Must be a UUID4.
1579
+ # This request is only idempotent if a `request_id` is provided.
1580
+ # See https://google.aip.dev/155 for more details.
1581
+ #
1582
+ # @yield [response, operation] Access the result along with the RPC operation
1583
+ # @yieldparam response [::Gapic::Operation]
1584
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1585
+ #
1586
+ # @return [::Gapic::Operation]
1587
+ #
1588
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1589
+ #
1590
+ # @example Basic example
1591
+ # require "google/cloud/network_security/v1"
1592
+ #
1593
+ # # Create a client object. The client can be reused for multiple calls.
1594
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1595
+ #
1596
+ # # Create a request. To set request fields, pass in keyword arguments.
1597
+ # request = Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentGroupRequest.new
1598
+ #
1599
+ # # Call the update_mirroring_deployment_group method.
1600
+ # result = client.update_mirroring_deployment_group request
1601
+ #
1602
+ # # The returned object is of type Gapic::Operation. You can use it to
1603
+ # # check the status of an operation, cancel it, or wait for results.
1604
+ # # Here is how to wait for a response.
1605
+ # result.wait_until_done! timeout: 60
1606
+ # if result.response?
1607
+ # p result.response
1608
+ # else
1609
+ # puts "No response received."
1610
+ # end
1611
+ #
1612
+ def update_mirroring_deployment_group request, options = nil
1613
+ raise ::ArgumentError, "request must be provided" if request.nil?
1614
+
1615
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentGroupRequest
1616
+
1617
+ # Converts hash and nil to an options object
1618
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1619
+
1620
+ # Customize the options with defaults
1621
+ metadata = @config.rpcs.update_mirroring_deployment_group.metadata.to_h
1622
+
1623
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1624
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1625
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1626
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1627
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1628
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1629
+
1630
+ header_params = {}
1631
+ if request.mirroring_deployment_group&.name
1632
+ header_params["mirroring_deployment_group.name"] = request.mirroring_deployment_group.name
1633
+ end
1634
+
1635
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1636
+ metadata[:"x-goog-request-params"] ||= request_params_header
1637
+
1638
+ options.apply_defaults timeout: @config.rpcs.update_mirroring_deployment_group.timeout,
1639
+ metadata: metadata,
1640
+ retry_policy: @config.rpcs.update_mirroring_deployment_group.retry_policy
1641
+
1642
+ options.apply_defaults timeout: @config.timeout,
1643
+ metadata: @config.metadata,
1644
+ retry_policy: @config.retry_policy
1645
+
1646
+ @mirroring_stub.call_rpc :update_mirroring_deployment_group, request, options: options do |response, operation|
1647
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1648
+ yield response, operation if block_given?
1649
+ throw :response, response
1650
+ end
1651
+ rescue ::GRPC::BadStatus => e
1652
+ raise ::Google::Cloud::Error.from_error(e)
1653
+ end
1654
+
1655
+ ##
1656
+ # Deletes a deployment group.
1657
+ # See https://google.aip.dev/135.
1658
+ #
1659
+ # @overload delete_mirroring_deployment_group(request, options = nil)
1660
+ # Pass arguments to `delete_mirroring_deployment_group` via a request object, either of type
1661
+ # {::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentGroupRequest} or an equivalent Hash.
1662
+ #
1663
+ # @param request [::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentGroupRequest, ::Hash]
1664
+ # A request object representing the call parameters. Required. To specify no
1665
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1666
+ # @param options [::Gapic::CallOptions, ::Hash]
1667
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1668
+ #
1669
+ # @overload delete_mirroring_deployment_group(name: nil, request_id: nil)
1670
+ # Pass arguments to `delete_mirroring_deployment_group` via keyword arguments. Note that at
1671
+ # least one keyword argument is required. To specify no parameters, or to keep all
1672
+ # the default parameter values, pass an empty Hash as a request object (see above).
1673
+ #
1674
+ # @param name [::String]
1675
+ # Required. The deployment group to delete.
1676
+ # @param request_id [::String]
1677
+ # Optional. A unique identifier for this request. Must be a UUID4.
1678
+ # This request is only idempotent if a `request_id` is provided.
1679
+ # See https://google.aip.dev/155 for more details.
1680
+ #
1681
+ # @yield [response, operation] Access the result along with the RPC operation
1682
+ # @yieldparam response [::Gapic::Operation]
1683
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1684
+ #
1685
+ # @return [::Gapic::Operation]
1686
+ #
1687
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1688
+ #
1689
+ # @example Basic example
1690
+ # require "google/cloud/network_security/v1"
1691
+ #
1692
+ # # Create a client object. The client can be reused for multiple calls.
1693
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1694
+ #
1695
+ # # Create a request. To set request fields, pass in keyword arguments.
1696
+ # request = Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentGroupRequest.new
1697
+ #
1698
+ # # Call the delete_mirroring_deployment_group method.
1699
+ # result = client.delete_mirroring_deployment_group request
1700
+ #
1701
+ # # The returned object is of type Gapic::Operation. You can use it to
1702
+ # # check the status of an operation, cancel it, or wait for results.
1703
+ # # Here is how to wait for a response.
1704
+ # result.wait_until_done! timeout: 60
1705
+ # if result.response?
1706
+ # p result.response
1707
+ # else
1708
+ # puts "No response received."
1709
+ # end
1710
+ #
1711
+ def delete_mirroring_deployment_group request, options = nil
1712
+ raise ::ArgumentError, "request must be provided" if request.nil?
1713
+
1714
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentGroupRequest
1715
+
1716
+ # Converts hash and nil to an options object
1717
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1718
+
1719
+ # Customize the options with defaults
1720
+ metadata = @config.rpcs.delete_mirroring_deployment_group.metadata.to_h
1721
+
1722
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1723
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1724
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1725
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1726
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1727
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1728
+
1729
+ header_params = {}
1730
+ if request.name
1731
+ header_params["name"] = request.name
1732
+ end
1733
+
1734
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1735
+ metadata[:"x-goog-request-params"] ||= request_params_header
1736
+
1737
+ options.apply_defaults timeout: @config.rpcs.delete_mirroring_deployment_group.timeout,
1738
+ metadata: metadata,
1739
+ retry_policy: @config.rpcs.delete_mirroring_deployment_group.retry_policy
1740
+
1741
+ options.apply_defaults timeout: @config.timeout,
1742
+ metadata: @config.metadata,
1743
+ retry_policy: @config.retry_policy
1744
+
1745
+ @mirroring_stub.call_rpc :delete_mirroring_deployment_group, request, options: options do |response, operation|
1746
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1747
+ yield response, operation if block_given?
1748
+ throw :response, response
1749
+ end
1750
+ rescue ::GRPC::BadStatus => e
1751
+ raise ::Google::Cloud::Error.from_error(e)
1752
+ end
1753
+
1754
+ ##
1755
+ # Lists deployments in a given project and location.
1756
+ # See https://google.aip.dev/132.
1757
+ #
1758
+ # @overload list_mirroring_deployments(request, options = nil)
1759
+ # Pass arguments to `list_mirroring_deployments` via a request object, either of type
1760
+ # {::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentsRequest} or an equivalent Hash.
1761
+ #
1762
+ # @param request [::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentsRequest, ::Hash]
1763
+ # A request object representing the call parameters. Required. To specify no
1764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1765
+ # @param options [::Gapic::CallOptions, ::Hash]
1766
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1767
+ #
1768
+ # @overload list_mirroring_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1769
+ # Pass arguments to `list_mirroring_deployments` via keyword arguments. Note that at
1770
+ # least one keyword argument is required. To specify no parameters, or to keep all
1771
+ # the default parameter values, pass an empty Hash as a request object (see above).
1772
+ #
1773
+ # @param parent [::String]
1774
+ # Required. The parent, which owns this collection of deployments.
1775
+ # Example: `projects/123456789/locations/us-central1-a`.
1776
+ # See https://google.aip.dev/132 for more details.
1777
+ # @param page_size [::Integer]
1778
+ # Optional. Requested page size. Server may return fewer items than
1779
+ # requested. If unspecified, server will pick an appropriate default. See
1780
+ # https://google.aip.dev/158 for more details.
1781
+ # @param page_token [::String]
1782
+ # Optional. A page token, received from a previous `ListMirroringDeployments`
1783
+ # call. Provide this to retrieve the subsequent page. When paginating, all
1784
+ # other parameters provided to `ListMirroringDeployments` must match the call
1785
+ # that provided the page token. See https://google.aip.dev/158 for more
1786
+ # details.
1787
+ # @param filter [::String]
1788
+ # Optional. Filter expression.
1789
+ # See https://google.aip.dev/160#filtering for more details.
1790
+ # @param order_by [::String]
1791
+ # Optional. Sort expression.
1792
+ # See https://google.aip.dev/132#ordering for more details.
1793
+ #
1794
+ # @yield [response, operation] Access the result along with the RPC operation
1795
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringDeployment>]
1796
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1797
+ #
1798
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::MirroringDeployment>]
1799
+ #
1800
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1801
+ #
1802
+ # @example Basic example
1803
+ # require "google/cloud/network_security/v1"
1804
+ #
1805
+ # # Create a client object. The client can be reused for multiple calls.
1806
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1807
+ #
1808
+ # # Create a request. To set request fields, pass in keyword arguments.
1809
+ # request = Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentsRequest.new
1810
+ #
1811
+ # # Call the list_mirroring_deployments method.
1812
+ # result = client.list_mirroring_deployments request
1813
+ #
1814
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1815
+ # # over elements, and API calls will be issued to fetch pages as needed.
1816
+ # result.each do |item|
1817
+ # # Each element is of type ::Google::Cloud::NetworkSecurity::V1::MirroringDeployment.
1818
+ # p item
1819
+ # end
1820
+ #
1821
+ def list_mirroring_deployments request, options = nil
1822
+ raise ::ArgumentError, "request must be provided" if request.nil?
1823
+
1824
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListMirroringDeploymentsRequest
1825
+
1826
+ # Converts hash and nil to an options object
1827
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1828
+
1829
+ # Customize the options with defaults
1830
+ metadata = @config.rpcs.list_mirroring_deployments.metadata.to_h
1831
+
1832
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1833
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1834
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1835
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1836
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1837
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1838
+
1839
+ header_params = {}
1840
+ if request.parent
1841
+ header_params["parent"] = request.parent
1842
+ end
1843
+
1844
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1845
+ metadata[:"x-goog-request-params"] ||= request_params_header
1846
+
1847
+ options.apply_defaults timeout: @config.rpcs.list_mirroring_deployments.timeout,
1848
+ metadata: metadata,
1849
+ retry_policy: @config.rpcs.list_mirroring_deployments.retry_policy
1850
+
1851
+ options.apply_defaults timeout: @config.timeout,
1852
+ metadata: @config.metadata,
1853
+ retry_policy: @config.retry_policy
1854
+
1855
+ @mirroring_stub.call_rpc :list_mirroring_deployments, request, options: options do |response, operation|
1856
+ response = ::Gapic::PagedEnumerable.new @mirroring_stub, :list_mirroring_deployments, request, response, operation, options
1857
+ yield response, operation if block_given?
1858
+ throw :response, response
1859
+ end
1860
+ rescue ::GRPC::BadStatus => e
1861
+ raise ::Google::Cloud::Error.from_error(e)
1862
+ end
1863
+
1864
+ ##
1865
+ # Gets a specific deployment.
1866
+ # See https://google.aip.dev/131.
1867
+ #
1868
+ # @overload get_mirroring_deployment(request, options = nil)
1869
+ # Pass arguments to `get_mirroring_deployment` via a request object, either of type
1870
+ # {::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentRequest} or an equivalent Hash.
1871
+ #
1872
+ # @param request [::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentRequest, ::Hash]
1873
+ # A request object representing the call parameters. Required. To specify no
1874
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1875
+ # @param options [::Gapic::CallOptions, ::Hash]
1876
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1877
+ #
1878
+ # @overload get_mirroring_deployment(name: nil)
1879
+ # Pass arguments to `get_mirroring_deployment` via keyword arguments. Note that at
1880
+ # least one keyword argument is required. To specify no parameters, or to keep all
1881
+ # the default parameter values, pass an empty Hash as a request object (see above).
1882
+ #
1883
+ # @param name [::String]
1884
+ # Required. The name of the deployment to retrieve.
1885
+ # Format:
1886
+ # projects/\\{project}/locations/\\{location}/mirroringDeployments/\\{mirroring_deployment}
1887
+ #
1888
+ # @yield [response, operation] Access the result along with the RPC operation
1889
+ # @yieldparam response [::Google::Cloud::NetworkSecurity::V1::MirroringDeployment]
1890
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1891
+ #
1892
+ # @return [::Google::Cloud::NetworkSecurity::V1::MirroringDeployment]
1893
+ #
1894
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1895
+ #
1896
+ # @example Basic example
1897
+ # require "google/cloud/network_security/v1"
1898
+ #
1899
+ # # Create a client object. The client can be reused for multiple calls.
1900
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1901
+ #
1902
+ # # Create a request. To set request fields, pass in keyword arguments.
1903
+ # request = Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentRequest.new
1904
+ #
1905
+ # # Call the get_mirroring_deployment method.
1906
+ # result = client.get_mirroring_deployment request
1907
+ #
1908
+ # # The returned object is of type Google::Cloud::NetworkSecurity::V1::MirroringDeployment.
1909
+ # p result
1910
+ #
1911
+ def get_mirroring_deployment request, options = nil
1912
+ raise ::ArgumentError, "request must be provided" if request.nil?
1913
+
1914
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetMirroringDeploymentRequest
1915
+
1916
+ # Converts hash and nil to an options object
1917
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1918
+
1919
+ # Customize the options with defaults
1920
+ metadata = @config.rpcs.get_mirroring_deployment.metadata.to_h
1921
+
1922
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1923
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1924
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1925
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
1926
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1927
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1928
+
1929
+ header_params = {}
1930
+ if request.name
1931
+ header_params["name"] = request.name
1932
+ end
1933
+
1934
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1935
+ metadata[:"x-goog-request-params"] ||= request_params_header
1936
+
1937
+ options.apply_defaults timeout: @config.rpcs.get_mirroring_deployment.timeout,
1938
+ metadata: metadata,
1939
+ retry_policy: @config.rpcs.get_mirroring_deployment.retry_policy
1940
+
1941
+ options.apply_defaults timeout: @config.timeout,
1942
+ metadata: @config.metadata,
1943
+ retry_policy: @config.retry_policy
1944
+
1945
+ @mirroring_stub.call_rpc :get_mirroring_deployment, request, options: options do |response, operation|
1946
+ yield response, operation if block_given?
1947
+ end
1948
+ rescue ::GRPC::BadStatus => e
1949
+ raise ::Google::Cloud::Error.from_error(e)
1950
+ end
1951
+
1952
+ ##
1953
+ # Creates a deployment in a given project and location.
1954
+ # See https://google.aip.dev/133.
1955
+ #
1956
+ # @overload create_mirroring_deployment(request, options = nil)
1957
+ # Pass arguments to `create_mirroring_deployment` via a request object, either of type
1958
+ # {::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentRequest} or an equivalent Hash.
1959
+ #
1960
+ # @param request [::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentRequest, ::Hash]
1961
+ # A request object representing the call parameters. Required. To specify no
1962
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1963
+ # @param options [::Gapic::CallOptions, ::Hash]
1964
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1965
+ #
1966
+ # @overload create_mirroring_deployment(parent: nil, mirroring_deployment_id: nil, mirroring_deployment: nil, request_id: nil)
1967
+ # Pass arguments to `create_mirroring_deployment` via keyword arguments. Note that at
1968
+ # least one keyword argument is required. To specify no parameters, or to keep all
1969
+ # the default parameter values, pass an empty Hash as a request object (see above).
1970
+ #
1971
+ # @param parent [::String]
1972
+ # Required. The parent resource where this deployment will be created.
1973
+ # Format: projects/\\{project}/locations/\\{location}
1974
+ # @param mirroring_deployment_id [::String]
1975
+ # Required. The ID to use for the new deployment, which will become the final
1976
+ # component of the deployment's resource name.
1977
+ # @param mirroring_deployment [::Google::Cloud::NetworkSecurity::V1::MirroringDeployment, ::Hash]
1978
+ # Required. The deployment to create.
1979
+ # @param request_id [::String]
1980
+ # Optional. A unique identifier for this request. Must be a UUID4.
1981
+ # This request is only idempotent if a `request_id` is provided.
1982
+ # See https://google.aip.dev/155 for more details.
1983
+ #
1984
+ # @yield [response, operation] Access the result along with the RPC operation
1985
+ # @yieldparam response [::Gapic::Operation]
1986
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1987
+ #
1988
+ # @return [::Gapic::Operation]
1989
+ #
1990
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1991
+ #
1992
+ # @example Basic example
1993
+ # require "google/cloud/network_security/v1"
1994
+ #
1995
+ # # Create a client object. The client can be reused for multiple calls.
1996
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
1997
+ #
1998
+ # # Create a request. To set request fields, pass in keyword arguments.
1999
+ # request = Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentRequest.new
2000
+ #
2001
+ # # Call the create_mirroring_deployment method.
2002
+ # result = client.create_mirroring_deployment request
2003
+ #
2004
+ # # The returned object is of type Gapic::Operation. You can use it to
2005
+ # # check the status of an operation, cancel it, or wait for results.
2006
+ # # Here is how to wait for a response.
2007
+ # result.wait_until_done! timeout: 60
2008
+ # if result.response?
2009
+ # p result.response
2010
+ # else
2011
+ # puts "No response received."
2012
+ # end
2013
+ #
2014
+ def create_mirroring_deployment request, options = nil
2015
+ raise ::ArgumentError, "request must be provided" if request.nil?
2016
+
2017
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateMirroringDeploymentRequest
2018
+
2019
+ # Converts hash and nil to an options object
2020
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2021
+
2022
+ # Customize the options with defaults
2023
+ metadata = @config.rpcs.create_mirroring_deployment.metadata.to_h
2024
+
2025
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2026
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2027
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2028
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
2029
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2030
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2031
+
2032
+ header_params = {}
2033
+ if request.parent
2034
+ header_params["parent"] = request.parent
2035
+ end
2036
+
2037
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2038
+ metadata[:"x-goog-request-params"] ||= request_params_header
2039
+
2040
+ options.apply_defaults timeout: @config.rpcs.create_mirroring_deployment.timeout,
2041
+ metadata: metadata,
2042
+ retry_policy: @config.rpcs.create_mirroring_deployment.retry_policy
2043
+
2044
+ options.apply_defaults timeout: @config.timeout,
2045
+ metadata: @config.metadata,
2046
+ retry_policy: @config.retry_policy
2047
+
2048
+ @mirroring_stub.call_rpc :create_mirroring_deployment, request, options: options do |response, operation|
2049
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2050
+ yield response, operation if block_given?
2051
+ throw :response, response
2052
+ end
2053
+ rescue ::GRPC::BadStatus => e
2054
+ raise ::Google::Cloud::Error.from_error(e)
2055
+ end
2056
+
2057
+ ##
2058
+ # Updates a deployment.
2059
+ # See https://google.aip.dev/134.
2060
+ #
2061
+ # @overload update_mirroring_deployment(request, options = nil)
2062
+ # Pass arguments to `update_mirroring_deployment` via a request object, either of type
2063
+ # {::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentRequest} or an equivalent Hash.
2064
+ #
2065
+ # @param request [::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentRequest, ::Hash]
2066
+ # A request object representing the call parameters. Required. To specify no
2067
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2068
+ # @param options [::Gapic::CallOptions, ::Hash]
2069
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2070
+ #
2071
+ # @overload update_mirroring_deployment(update_mask: nil, mirroring_deployment: nil, request_id: nil)
2072
+ # Pass arguments to `update_mirroring_deployment` via keyword arguments. Note that at
2073
+ # least one keyword argument is required. To specify no parameters, or to keep all
2074
+ # the default parameter values, pass an empty Hash as a request object (see above).
2075
+ #
2076
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2077
+ # Optional. The list of fields to update.
2078
+ # Fields are specified relative to the deployment
2079
+ # (e.g. `description`; *not* `mirroring_deployment.description`).
2080
+ # See https://google.aip.dev/161 for more details.
2081
+ # @param mirroring_deployment [::Google::Cloud::NetworkSecurity::V1::MirroringDeployment, ::Hash]
2082
+ # Required. The deployment to update.
2083
+ # @param request_id [::String]
2084
+ # Optional. A unique identifier for this request. Must be a UUID4.
2085
+ # This request is only idempotent if a `request_id` is provided.
2086
+ # See https://google.aip.dev/155 for more details.
2087
+ #
2088
+ # @yield [response, operation] Access the result along with the RPC operation
2089
+ # @yieldparam response [::Gapic::Operation]
2090
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2091
+ #
2092
+ # @return [::Gapic::Operation]
2093
+ #
2094
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2095
+ #
2096
+ # @example Basic example
2097
+ # require "google/cloud/network_security/v1"
2098
+ #
2099
+ # # Create a client object. The client can be reused for multiple calls.
2100
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
2101
+ #
2102
+ # # Create a request. To set request fields, pass in keyword arguments.
2103
+ # request = Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentRequest.new
2104
+ #
2105
+ # # Call the update_mirroring_deployment method.
2106
+ # result = client.update_mirroring_deployment request
2107
+ #
2108
+ # # The returned object is of type Gapic::Operation. You can use it to
2109
+ # # check the status of an operation, cancel it, or wait for results.
2110
+ # # Here is how to wait for a response.
2111
+ # result.wait_until_done! timeout: 60
2112
+ # if result.response?
2113
+ # p result.response
2114
+ # else
2115
+ # puts "No response received."
2116
+ # end
2117
+ #
2118
+ def update_mirroring_deployment request, options = nil
2119
+ raise ::ArgumentError, "request must be provided" if request.nil?
2120
+
2121
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateMirroringDeploymentRequest
2122
+
2123
+ # Converts hash and nil to an options object
2124
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2125
+
2126
+ # Customize the options with defaults
2127
+ metadata = @config.rpcs.update_mirroring_deployment.metadata.to_h
2128
+
2129
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2130
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2131
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2132
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
2133
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2134
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2135
+
2136
+ header_params = {}
2137
+ if request.mirroring_deployment&.name
2138
+ header_params["mirroring_deployment.name"] = request.mirroring_deployment.name
2139
+ end
2140
+
2141
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2142
+ metadata[:"x-goog-request-params"] ||= request_params_header
2143
+
2144
+ options.apply_defaults timeout: @config.rpcs.update_mirroring_deployment.timeout,
2145
+ metadata: metadata,
2146
+ retry_policy: @config.rpcs.update_mirroring_deployment.retry_policy
2147
+
2148
+ options.apply_defaults timeout: @config.timeout,
2149
+ metadata: @config.metadata,
2150
+ retry_policy: @config.retry_policy
2151
+
2152
+ @mirroring_stub.call_rpc :update_mirroring_deployment, request, options: options do |response, operation|
2153
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2154
+ yield response, operation if block_given?
2155
+ throw :response, response
2156
+ end
2157
+ rescue ::GRPC::BadStatus => e
2158
+ raise ::Google::Cloud::Error.from_error(e)
2159
+ end
2160
+
2161
+ ##
2162
+ # Deletes a deployment.
2163
+ # See https://google.aip.dev/135.
2164
+ #
2165
+ # @overload delete_mirroring_deployment(request, options = nil)
2166
+ # Pass arguments to `delete_mirroring_deployment` via a request object, either of type
2167
+ # {::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentRequest} or an equivalent Hash.
2168
+ #
2169
+ # @param request [::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentRequest, ::Hash]
2170
+ # A request object representing the call parameters. Required. To specify no
2171
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2172
+ # @param options [::Gapic::CallOptions, ::Hash]
2173
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2174
+ #
2175
+ # @overload delete_mirroring_deployment(name: nil, request_id: nil)
2176
+ # Pass arguments to `delete_mirroring_deployment` via keyword arguments. Note that at
2177
+ # least one keyword argument is required. To specify no parameters, or to keep all
2178
+ # the default parameter values, pass an empty Hash as a request object (see above).
2179
+ #
2180
+ # @param name [::String]
2181
+ # Required. Name of the resource
2182
+ # @param request_id [::String]
2183
+ # Optional. A unique identifier for this request. Must be a UUID4.
2184
+ # This request is only idempotent if a `request_id` is provided.
2185
+ # See https://google.aip.dev/155 for more details.
2186
+ #
2187
+ # @yield [response, operation] Access the result along with the RPC operation
2188
+ # @yieldparam response [::Gapic::Operation]
2189
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2190
+ #
2191
+ # @return [::Gapic::Operation]
2192
+ #
2193
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2194
+ #
2195
+ # @example Basic example
2196
+ # require "google/cloud/network_security/v1"
2197
+ #
2198
+ # # Create a client object. The client can be reused for multiple calls.
2199
+ # client = Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new
2200
+ #
2201
+ # # Create a request. To set request fields, pass in keyword arguments.
2202
+ # request = Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentRequest.new
2203
+ #
2204
+ # # Call the delete_mirroring_deployment method.
2205
+ # result = client.delete_mirroring_deployment request
2206
+ #
2207
+ # # The returned object is of type Gapic::Operation. You can use it to
2208
+ # # check the status of an operation, cancel it, or wait for results.
2209
+ # # Here is how to wait for a response.
2210
+ # result.wait_until_done! timeout: 60
2211
+ # if result.response?
2212
+ # p result.response
2213
+ # else
2214
+ # puts "No response received."
2215
+ # end
2216
+ #
2217
+ def delete_mirroring_deployment request, options = nil
2218
+ raise ::ArgumentError, "request must be provided" if request.nil?
2219
+
2220
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteMirroringDeploymentRequest
2221
+
2222
+ # Converts hash and nil to an options object
2223
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2224
+
2225
+ # Customize the options with defaults
2226
+ metadata = @config.rpcs.delete_mirroring_deployment.metadata.to_h
2227
+
2228
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2229
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2230
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2231
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
2232
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2233
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2234
+
2235
+ header_params = {}
2236
+ if request.name
2237
+ header_params["name"] = request.name
2238
+ end
2239
+
2240
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2241
+ metadata[:"x-goog-request-params"] ||= request_params_header
2242
+
2243
+ options.apply_defaults timeout: @config.rpcs.delete_mirroring_deployment.timeout,
2244
+ metadata: metadata,
2245
+ retry_policy: @config.rpcs.delete_mirroring_deployment.retry_policy
2246
+
2247
+ options.apply_defaults timeout: @config.timeout,
2248
+ metadata: @config.metadata,
2249
+ retry_policy: @config.retry_policy
2250
+
2251
+ @mirroring_stub.call_rpc :delete_mirroring_deployment, request, options: options do |response, operation|
2252
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2253
+ yield response, operation if block_given?
2254
+ throw :response, response
2255
+ end
2256
+ rescue ::GRPC::BadStatus => e
2257
+ raise ::Google::Cloud::Error.from_error(e)
2258
+ end
2259
+
2260
+ ##
2261
+ # Configuration class for the Mirroring API.
2262
+ #
2263
+ # This class represents the configuration for Mirroring,
2264
+ # providing control over timeouts, retry behavior, logging, transport
2265
+ # parameters, and other low-level controls. Certain parameters can also be
2266
+ # applied individually to specific RPCs. See
2267
+ # {::Google::Cloud::NetworkSecurity::V1::Mirroring::Client::Configuration::Rpcs}
2268
+ # for a list of RPCs that can be configured independently.
2269
+ #
2270
+ # Configuration can be applied globally to all clients, or to a single client
2271
+ # on construction.
2272
+ #
2273
+ # @example
2274
+ #
2275
+ # # Modify the global config, setting the timeout for
2276
+ # # list_mirroring_endpoint_groups to 20 seconds,
2277
+ # # and all remaining timeouts to 10 seconds.
2278
+ # ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.configure do |config|
2279
+ # config.timeout = 10.0
2280
+ # config.rpcs.list_mirroring_endpoint_groups.timeout = 20.0
2281
+ # end
2282
+ #
2283
+ # # Apply the above configuration only to a new client.
2284
+ # client = ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new do |config|
2285
+ # config.timeout = 10.0
2286
+ # config.rpcs.list_mirroring_endpoint_groups.timeout = 20.0
2287
+ # end
2288
+ #
2289
+ # @!attribute [rw] endpoint
2290
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2291
+ # nil, indicating to use the default endpoint in the current universe domain.
2292
+ # @return [::String,nil]
2293
+ # @!attribute [rw] credentials
2294
+ # Credentials to send with calls. You may provide any of the following types:
2295
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2296
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2297
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2298
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2299
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2300
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2301
+ # * (`nil`) indicating no credentials
2302
+ #
2303
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
2304
+ # is deprecated. Providing an unvalidated credential configuration to
2305
+ # Google APIs can compromise the security of your systems and data.
2306
+ #
2307
+ # @example
2308
+ #
2309
+ # # The recommended way to provide credentials is to use the `make_creds` method
2310
+ # # on the appropriate credentials class for your environment.
2311
+ #
2312
+ # require "googleauth"
2313
+ #
2314
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
2315
+ # json_key_io: ::File.open("/path/to/keyfile.json")
2316
+ # )
2317
+ #
2318
+ # client = ::Google::Cloud::NetworkSecurity::V1::Mirroring::Client.new do |config|
2319
+ # config.credentials = credentials
2320
+ # end
2321
+ #
2322
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
2323
+ # external source for authentication to Google Cloud, you must validate it before
2324
+ # providing it to a Google API client library. Providing an unvalidated credential
2325
+ # configuration to Google APIs can compromise the security of your systems and data.
2326
+ # For more information, refer to [Validate credential configurations from external
2327
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2328
+ # @return [::Object]
2329
+ # @!attribute [rw] scope
2330
+ # The OAuth scopes
2331
+ # @return [::Array<::String>]
2332
+ # @!attribute [rw] lib_name
2333
+ # The library name as recorded in instrumentation and logging
2334
+ # @return [::String]
2335
+ # @!attribute [rw] lib_version
2336
+ # The library version as recorded in instrumentation and logging
2337
+ # @return [::String]
2338
+ # @!attribute [rw] channel_args
2339
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2340
+ # `GRPC::Core::Channel` object is provided as the credential.
2341
+ # @return [::Hash]
2342
+ # @!attribute [rw] interceptors
2343
+ # An array of interceptors that are run before calls are executed.
2344
+ # @return [::Array<::GRPC::ClientInterceptor>]
2345
+ # @!attribute [rw] timeout
2346
+ # The call timeout in seconds.
2347
+ # @return [::Numeric]
2348
+ # @!attribute [rw] metadata
2349
+ # Additional gRPC headers to be sent with the call.
2350
+ # @return [::Hash{::Symbol=>::String}]
2351
+ # @!attribute [rw] retry_policy
2352
+ # The retry policy. The value is a hash with the following keys:
2353
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2354
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2355
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2356
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
2357
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2358
+ # trigger a retry.
2359
+ # @return [::Hash]
2360
+ # @!attribute [rw] quota_project
2361
+ # A separate project against which to charge quota.
2362
+ # @return [::String]
2363
+ # @!attribute [rw] universe_domain
2364
+ # The universe domain within which to make requests. This determines the
2365
+ # default endpoint URL. The default value of nil uses the environment
2366
+ # universe (usually the default "googleapis.com" universe).
2367
+ # @return [::String,nil]
2368
+ # @!attribute [rw] logger
2369
+ # A custom logger to use for request/response debug logging, or the value
2370
+ # `:default` (the default) to construct a default logger, or `nil` to
2371
+ # explicitly disable logging.
2372
+ # @return [::Logger,:default,nil]
2373
+ #
2374
+ class Configuration
2375
+ extend ::Gapic::Config
2376
+
2377
+ # @private
2378
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2379
+ DEFAULT_ENDPOINT = "networksecurity.googleapis.com"
2380
+
2381
+ config_attr :endpoint, nil, ::String, nil
2382
+ config_attr :credentials, nil do |value|
2383
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
2384
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
2385
+ allowed.any? { |klass| klass === value }
2386
+ end
2387
+ config_attr :scope, nil, ::String, ::Array, nil
2388
+ config_attr :lib_name, nil, ::String, nil
2389
+ config_attr :lib_version, nil, ::String, nil
2390
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2391
+ config_attr :interceptors, nil, ::Array, nil
2392
+ config_attr :timeout, nil, ::Numeric, nil
2393
+ config_attr :metadata, nil, ::Hash, nil
2394
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2395
+ config_attr :quota_project, nil, ::String, nil
2396
+ config_attr :universe_domain, nil, ::String, nil
2397
+ config_attr :logger, :default, ::Logger, nil, :default
2398
+
2399
+ # @private
2400
+ def initialize parent_config = nil
2401
+ @parent_config = parent_config unless parent_config.nil?
2402
+
2403
+ yield self if block_given?
2404
+ end
2405
+
2406
+ ##
2407
+ # Configurations for individual RPCs
2408
+ # @return [Rpcs]
2409
+ #
2410
+ def rpcs
2411
+ @rpcs ||= begin
2412
+ parent_rpcs = nil
2413
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2414
+ Rpcs.new parent_rpcs
2415
+ end
2416
+ end
2417
+
2418
+ ##
2419
+ # Configuration for the channel pool
2420
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2421
+ #
2422
+ def channel_pool
2423
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2424
+ end
2425
+
2426
+ ##
2427
+ # Configuration RPC class for the Mirroring API.
2428
+ #
2429
+ # Includes fields providing the configuration for each RPC in this service.
2430
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2431
+ # the following configuration fields:
2432
+ #
2433
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2434
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2435
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2436
+ # include the following keys:
2437
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2438
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2439
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2440
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
2441
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2442
+ # trigger a retry.
2443
+ #
2444
+ class Rpcs
2445
+ ##
2446
+ # RPC-specific configuration for `list_mirroring_endpoint_groups`
2447
+ # @return [::Gapic::Config::Method]
2448
+ #
2449
+ attr_reader :list_mirroring_endpoint_groups
2450
+ ##
2451
+ # RPC-specific configuration for `get_mirroring_endpoint_group`
2452
+ # @return [::Gapic::Config::Method]
2453
+ #
2454
+ attr_reader :get_mirroring_endpoint_group
2455
+ ##
2456
+ # RPC-specific configuration for `create_mirroring_endpoint_group`
2457
+ # @return [::Gapic::Config::Method]
2458
+ #
2459
+ attr_reader :create_mirroring_endpoint_group
2460
+ ##
2461
+ # RPC-specific configuration for `update_mirroring_endpoint_group`
2462
+ # @return [::Gapic::Config::Method]
2463
+ #
2464
+ attr_reader :update_mirroring_endpoint_group
2465
+ ##
2466
+ # RPC-specific configuration for `delete_mirroring_endpoint_group`
2467
+ # @return [::Gapic::Config::Method]
2468
+ #
2469
+ attr_reader :delete_mirroring_endpoint_group
2470
+ ##
2471
+ # RPC-specific configuration for `list_mirroring_endpoint_group_associations`
2472
+ # @return [::Gapic::Config::Method]
2473
+ #
2474
+ attr_reader :list_mirroring_endpoint_group_associations
2475
+ ##
2476
+ # RPC-specific configuration for `get_mirroring_endpoint_group_association`
2477
+ # @return [::Gapic::Config::Method]
2478
+ #
2479
+ attr_reader :get_mirroring_endpoint_group_association
2480
+ ##
2481
+ # RPC-specific configuration for `create_mirroring_endpoint_group_association`
2482
+ # @return [::Gapic::Config::Method]
2483
+ #
2484
+ attr_reader :create_mirroring_endpoint_group_association
2485
+ ##
2486
+ # RPC-specific configuration for `update_mirroring_endpoint_group_association`
2487
+ # @return [::Gapic::Config::Method]
2488
+ #
2489
+ attr_reader :update_mirroring_endpoint_group_association
2490
+ ##
2491
+ # RPC-specific configuration for `delete_mirroring_endpoint_group_association`
2492
+ # @return [::Gapic::Config::Method]
2493
+ #
2494
+ attr_reader :delete_mirroring_endpoint_group_association
2495
+ ##
2496
+ # RPC-specific configuration for `list_mirroring_deployment_groups`
2497
+ # @return [::Gapic::Config::Method]
2498
+ #
2499
+ attr_reader :list_mirroring_deployment_groups
2500
+ ##
2501
+ # RPC-specific configuration for `get_mirroring_deployment_group`
2502
+ # @return [::Gapic::Config::Method]
2503
+ #
2504
+ attr_reader :get_mirroring_deployment_group
2505
+ ##
2506
+ # RPC-specific configuration for `create_mirroring_deployment_group`
2507
+ # @return [::Gapic::Config::Method]
2508
+ #
2509
+ attr_reader :create_mirroring_deployment_group
2510
+ ##
2511
+ # RPC-specific configuration for `update_mirroring_deployment_group`
2512
+ # @return [::Gapic::Config::Method]
2513
+ #
2514
+ attr_reader :update_mirroring_deployment_group
2515
+ ##
2516
+ # RPC-specific configuration for `delete_mirroring_deployment_group`
2517
+ # @return [::Gapic::Config::Method]
2518
+ #
2519
+ attr_reader :delete_mirroring_deployment_group
2520
+ ##
2521
+ # RPC-specific configuration for `list_mirroring_deployments`
2522
+ # @return [::Gapic::Config::Method]
2523
+ #
2524
+ attr_reader :list_mirroring_deployments
2525
+ ##
2526
+ # RPC-specific configuration for `get_mirroring_deployment`
2527
+ # @return [::Gapic::Config::Method]
2528
+ #
2529
+ attr_reader :get_mirroring_deployment
2530
+ ##
2531
+ # RPC-specific configuration for `create_mirroring_deployment`
2532
+ # @return [::Gapic::Config::Method]
2533
+ #
2534
+ attr_reader :create_mirroring_deployment
2535
+ ##
2536
+ # RPC-specific configuration for `update_mirroring_deployment`
2537
+ # @return [::Gapic::Config::Method]
2538
+ #
2539
+ attr_reader :update_mirroring_deployment
2540
+ ##
2541
+ # RPC-specific configuration for `delete_mirroring_deployment`
2542
+ # @return [::Gapic::Config::Method]
2543
+ #
2544
+ attr_reader :delete_mirroring_deployment
2545
+
2546
+ # @private
2547
+ def initialize parent_rpcs = nil
2548
+ list_mirroring_endpoint_groups_config = parent_rpcs.list_mirroring_endpoint_groups if parent_rpcs.respond_to? :list_mirroring_endpoint_groups
2549
+ @list_mirroring_endpoint_groups = ::Gapic::Config::Method.new list_mirroring_endpoint_groups_config
2550
+ get_mirroring_endpoint_group_config = parent_rpcs.get_mirroring_endpoint_group if parent_rpcs.respond_to? :get_mirroring_endpoint_group
2551
+ @get_mirroring_endpoint_group = ::Gapic::Config::Method.new get_mirroring_endpoint_group_config
2552
+ create_mirroring_endpoint_group_config = parent_rpcs.create_mirroring_endpoint_group if parent_rpcs.respond_to? :create_mirroring_endpoint_group
2553
+ @create_mirroring_endpoint_group = ::Gapic::Config::Method.new create_mirroring_endpoint_group_config
2554
+ update_mirroring_endpoint_group_config = parent_rpcs.update_mirroring_endpoint_group if parent_rpcs.respond_to? :update_mirroring_endpoint_group
2555
+ @update_mirroring_endpoint_group = ::Gapic::Config::Method.new update_mirroring_endpoint_group_config
2556
+ delete_mirroring_endpoint_group_config = parent_rpcs.delete_mirroring_endpoint_group if parent_rpcs.respond_to? :delete_mirroring_endpoint_group
2557
+ @delete_mirroring_endpoint_group = ::Gapic::Config::Method.new delete_mirroring_endpoint_group_config
2558
+ list_mirroring_endpoint_group_associations_config = parent_rpcs.list_mirroring_endpoint_group_associations if parent_rpcs.respond_to? :list_mirroring_endpoint_group_associations
2559
+ @list_mirroring_endpoint_group_associations = ::Gapic::Config::Method.new list_mirroring_endpoint_group_associations_config
2560
+ get_mirroring_endpoint_group_association_config = parent_rpcs.get_mirroring_endpoint_group_association if parent_rpcs.respond_to? :get_mirroring_endpoint_group_association
2561
+ @get_mirroring_endpoint_group_association = ::Gapic::Config::Method.new get_mirroring_endpoint_group_association_config
2562
+ create_mirroring_endpoint_group_association_config = parent_rpcs.create_mirroring_endpoint_group_association if parent_rpcs.respond_to? :create_mirroring_endpoint_group_association
2563
+ @create_mirroring_endpoint_group_association = ::Gapic::Config::Method.new create_mirroring_endpoint_group_association_config
2564
+ update_mirroring_endpoint_group_association_config = parent_rpcs.update_mirroring_endpoint_group_association if parent_rpcs.respond_to? :update_mirroring_endpoint_group_association
2565
+ @update_mirroring_endpoint_group_association = ::Gapic::Config::Method.new update_mirroring_endpoint_group_association_config
2566
+ delete_mirroring_endpoint_group_association_config = parent_rpcs.delete_mirroring_endpoint_group_association if parent_rpcs.respond_to? :delete_mirroring_endpoint_group_association
2567
+ @delete_mirroring_endpoint_group_association = ::Gapic::Config::Method.new delete_mirroring_endpoint_group_association_config
2568
+ list_mirroring_deployment_groups_config = parent_rpcs.list_mirroring_deployment_groups if parent_rpcs.respond_to? :list_mirroring_deployment_groups
2569
+ @list_mirroring_deployment_groups = ::Gapic::Config::Method.new list_mirroring_deployment_groups_config
2570
+ get_mirroring_deployment_group_config = parent_rpcs.get_mirroring_deployment_group if parent_rpcs.respond_to? :get_mirroring_deployment_group
2571
+ @get_mirroring_deployment_group = ::Gapic::Config::Method.new get_mirroring_deployment_group_config
2572
+ create_mirroring_deployment_group_config = parent_rpcs.create_mirroring_deployment_group if parent_rpcs.respond_to? :create_mirroring_deployment_group
2573
+ @create_mirroring_deployment_group = ::Gapic::Config::Method.new create_mirroring_deployment_group_config
2574
+ update_mirroring_deployment_group_config = parent_rpcs.update_mirroring_deployment_group if parent_rpcs.respond_to? :update_mirroring_deployment_group
2575
+ @update_mirroring_deployment_group = ::Gapic::Config::Method.new update_mirroring_deployment_group_config
2576
+ delete_mirroring_deployment_group_config = parent_rpcs.delete_mirroring_deployment_group if parent_rpcs.respond_to? :delete_mirroring_deployment_group
2577
+ @delete_mirroring_deployment_group = ::Gapic::Config::Method.new delete_mirroring_deployment_group_config
2578
+ list_mirroring_deployments_config = parent_rpcs.list_mirroring_deployments if parent_rpcs.respond_to? :list_mirroring_deployments
2579
+ @list_mirroring_deployments = ::Gapic::Config::Method.new list_mirroring_deployments_config
2580
+ get_mirroring_deployment_config = parent_rpcs.get_mirroring_deployment if parent_rpcs.respond_to? :get_mirroring_deployment
2581
+ @get_mirroring_deployment = ::Gapic::Config::Method.new get_mirroring_deployment_config
2582
+ create_mirroring_deployment_config = parent_rpcs.create_mirroring_deployment if parent_rpcs.respond_to? :create_mirroring_deployment
2583
+ @create_mirroring_deployment = ::Gapic::Config::Method.new create_mirroring_deployment_config
2584
+ update_mirroring_deployment_config = parent_rpcs.update_mirroring_deployment if parent_rpcs.respond_to? :update_mirroring_deployment
2585
+ @update_mirroring_deployment = ::Gapic::Config::Method.new update_mirroring_deployment_config
2586
+ delete_mirroring_deployment_config = parent_rpcs.delete_mirroring_deployment if parent_rpcs.respond_to? :delete_mirroring_deployment
2587
+ @delete_mirroring_deployment = ::Gapic::Config::Method.new delete_mirroring_deployment_config
2588
+
2589
+ yield self if block_given?
2590
+ end
2591
+ end
2592
+ end
2593
+ end
2594
+ end
2595
+ end
2596
+ end
2597
+ end
2598
+ end