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.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/network_security/v1/address_group_service/client.rb +1457 -0
- data/lib/google/cloud/network_security/v1/address_group_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/address_group_service/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/address_group_service/paths.rb +110 -0
- data/lib/google/cloud/network_security/v1/address_group_service.rb +52 -0
- data/lib/google/cloud/network_security/v1/dns_threat_detector_service/client.rb +900 -0
- data/lib/google/cloud/network_security/v1/dns_threat_detector_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/dns_threat_detector_service/paths.rb +86 -0
- data/lib/google/cloud/network_security/v1/dns_threat_detector_service.rb +49 -0
- data/lib/google/cloud/network_security/v1/firewall_activation/client.rb +2098 -0
- data/lib/google/cloud/network_security/v1/firewall_activation/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/firewall_activation/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/firewall_activation/paths.rb +165 -0
- data/lib/google/cloud/network_security/v1/firewall_activation.rb +50 -0
- data/lib/google/cloud/network_security/v1/intercept/client.rb +2599 -0
- data/lib/google/cloud/network_security/v1/intercept/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/intercept/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/intercept/paths.rb +160 -0
- data/lib/google/cloud/network_security/v1/intercept.rb +51 -0
- data/lib/google/cloud/network_security/v1/mirroring/client.rb +2598 -0
- data/lib/google/cloud/network_security/v1/mirroring/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/mirroring/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/mirroring/paths.rb +160 -0
- data/lib/google/cloud/network_security/v1/mirroring.rb +50 -0
- data/lib/google/cloud/network_security/v1/network_security/client.rb +5161 -0
- data/lib/google/cloud/network_security/v1/network_security/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/network_security/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/network_security/paths.rb +280 -0
- data/lib/google/cloud/network_security/v1/network_security.rb +52 -0
- data/lib/google/cloud/network_security/v1/organization_address_group_service/client.rb +1457 -0
- data/lib/google/cloud/network_security/v1/organization_address_group_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/organization_address_group_service/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/organization_address_group_service/paths.rb +110 -0
- data/lib/google/cloud/network_security/v1/organization_address_group_service.rb +52 -0
- data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/client.rb +1471 -0
- data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/organization_security_profile_group_service/paths.rb +191 -0
- data/lib/google/cloud/network_security/v1/organization_security_profile_group_service.rb +50 -0
- data/lib/google/cloud/network_security/v1/security_profile_group_service/client.rb +1472 -0
- data/lib/google/cloud/network_security/v1/security_profile_group_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/security_profile_group_service/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb +191 -0
- data/lib/google/cloud/network_security/v1/security_profile_group_service.rb +51 -0
- data/lib/google/cloud/network_security/v1/sse_realm_service/client.rb +1316 -0
- data/lib/google/cloud/network_security/v1/sse_realm_service/credentials.rb +47 -0
- data/lib/google/cloud/network_security/v1/sse_realm_service/operations.rb +843 -0
- data/lib/google/cloud/network_security/v1/sse_realm_service/paths.rb +88 -0
- data/lib/google/cloud/network_security/v1/sse_realm_service.rb +50 -0
- data/lib/google/cloud/network_security/v1/version.rb +7 -2
- data/lib/google/cloud/network_security/v1.rb +49 -0
- data/lib/google/cloud/networksecurity/v1/address_group_pb.rb +46 -0
- data/lib/google/cloud/networksecurity/v1/address_group_services_pb.rb +97 -0
- data/lib/google/cloud/networksecurity/v1/authorization_policy_pb.rb +37 -0
- data/lib/google/cloud/networksecurity/v1/authz_policy_pb.rb +56 -0
- data/lib/google/cloud/networksecurity/v1/backend_authentication_config_pb.rb +33 -0
- data/lib/google/cloud/networksecurity/v1/client_tls_policy_pb.rb +33 -0
- data/lib/google/cloud/networksecurity/v1/common_pb.rb +24 -0
- data/lib/google/cloud/networksecurity/v1/dns_threat_detector_pb.rb +36 -0
- data/lib/google/cloud/networksecurity/v1/dns_threat_detector_services_pb.rb +53 -0
- data/lib/google/cloud/networksecurity/v1/firewall_activation_pb.rb +48 -0
- data/lib/google/cloud/networksecurity/v1/firewall_activation_services_pb.rb +73 -0
- data/lib/google/cloud/networksecurity/v1/gateway_security_policy_pb.rb +32 -0
- data/lib/google/cloud/networksecurity/v1/gateway_security_policy_rule_pb.rb +33 -0
- data/lib/google/cloud/networksecurity/v1/intercept_pb.rb +71 -0
- data/lib/google/cloud/networksecurity/v1/intercept_services_pb.rb +104 -0
- data/lib/google/cloud/networksecurity/v1/mirroring_pb.rb +72 -0
- data/lib/google/cloud/networksecurity/v1/mirroring_services_pb.rb +103 -0
- data/lib/google/cloud/networksecurity/v1/network_security_pb.rb +35 -0
- data/lib/google/cloud/networksecurity/v1/network_security_services_pb.rb +138 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_intercept_pb.rb +24 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_mirroring_pb.rb +24 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_pb.rb +31 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_service_pb.rb +42 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_service_services_pb.rb +98 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_threatprevention_pb.rb +30 -0
- data/lib/google/cloud/networksecurity/v1/security_profile_group_urlfiltering_pb.rb +25 -0
- data/lib/google/cloud/networksecurity/v1/server_tls_policy_pb.rb +35 -0
- data/lib/google/cloud/networksecurity/v1/sse_realm_pb.rb +46 -0
- data/lib/google/cloud/networksecurity/v1/sse_realm_services_pb.rb +59 -0
- data/lib/google/cloud/networksecurity/v1/tls_inspection_policy_pb.rb +34 -0
- data/lib/google/cloud/networksecurity/v1/tls_pb.rb +26 -0
- data/lib/google/cloud/networksecurity/v1/url_list_pb.rb +32 -0
- data/lib/google-cloud-network_security-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/networksecurity/v1/address_group.rb +374 -0
- data/proto_docs/google/cloud/networksecurity/v1/authorization_policy.rb +263 -0
- data/proto_docs/google/cloud/networksecurity/v1/authz_policy.rb +735 -0
- data/proto_docs/google/cloud/networksecurity/v1/backend_authentication_config.rb +217 -0
- data/proto_docs/google/cloud/networksecurity/v1/client_tls_policy.rb +162 -0
- data/proto_docs/google/cloud/networksecurity/v1/common.rb +57 -0
- data/proto_docs/google/cloud/networksecurity/v1/dns_threat_detector.rb +159 -0
- data/proto_docs/google/cloud/networksecurity/v1/firewall_activation.rb +469 -0
- data/proto_docs/google/cloud/networksecurity/v1/gateway_security_policy.rb +144 -0
- data/proto_docs/google/cloud/networksecurity/v1/gateway_security_policy_rule.rb +178 -0
- data/proto_docs/google/cloud/networksecurity/v1/intercept.rb +960 -0
- data/proto_docs/google/cloud/networksecurity/v1/mirroring.rb +970 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group.rb +166 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_intercept.rb +38 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_mirroring.rb +38 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_service.rb +211 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_threatprevention.rb +193 -0
- data/proto_docs/google/cloud/networksecurity/v1/security_profile_group_urlfiltering.rb +66 -0
- data/proto_docs/google/cloud/networksecurity/v1/server_tls_policy.rb +251 -0
- data/proto_docs/google/cloud/networksecurity/v1/sse_realm.rb +388 -0
- data/proto_docs/google/cloud/networksecurity/v1/tls.rb +90 -0
- data/proto_docs/google/cloud/networksecurity/v1/tls_inspection_policy.rb +239 -0
- data/proto_docs/google/cloud/networksecurity/v1/url_list.rb +144 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +186 -9
|
@@ -0,0 +1,1457 @@
|
|
|
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/address_group_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 OrganizationAddressGroupService
|
|
29
|
+
##
|
|
30
|
+
# Client for the OrganizationAddressGroupService service.
|
|
31
|
+
#
|
|
32
|
+
# Organization AddressGroup is created under organization. Requests against
|
|
33
|
+
# Organization AddressGroup will use project from request credential for
|
|
34
|
+
# activation/quota/visibility check.
|
|
35
|
+
#
|
|
36
|
+
class Client
|
|
37
|
+
# @private
|
|
38
|
+
API_VERSION = ""
|
|
39
|
+
|
|
40
|
+
# @private
|
|
41
|
+
DEFAULT_ENDPOINT_TEMPLATE = "networksecurity.$UNIVERSE_DOMAIN$"
|
|
42
|
+
|
|
43
|
+
include Paths
|
|
44
|
+
|
|
45
|
+
# @private
|
|
46
|
+
attr_reader :organization_address_group_service_stub
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
# Configure the OrganizationAddressGroupService Client class.
|
|
50
|
+
#
|
|
51
|
+
# See {::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client::Configuration}
|
|
52
|
+
# for a description of the configuration fields.
|
|
53
|
+
#
|
|
54
|
+
# @example
|
|
55
|
+
#
|
|
56
|
+
# # Modify the configuration for all OrganizationAddressGroupService clients
|
|
57
|
+
# ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.configure do |config|
|
|
58
|
+
# config.timeout = 10.0
|
|
59
|
+
# end
|
|
60
|
+
#
|
|
61
|
+
# @yield [config] Configure the Client client.
|
|
62
|
+
# @yieldparam config [Client::Configuration]
|
|
63
|
+
#
|
|
64
|
+
# @return [Client::Configuration]
|
|
65
|
+
#
|
|
66
|
+
def self.configure
|
|
67
|
+
@configure ||= begin
|
|
68
|
+
namespace = ["Google", "Cloud", "NetworkSecurity", "V1"]
|
|
69
|
+
parent_config = while namespace.any?
|
|
70
|
+
parent_name = namespace.join "::"
|
|
71
|
+
parent_const = const_get parent_name
|
|
72
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
73
|
+
namespace.pop
|
|
74
|
+
end
|
|
75
|
+
default_config = Client::Configuration.new parent_config
|
|
76
|
+
|
|
77
|
+
default_config
|
|
78
|
+
end
|
|
79
|
+
yield @configure if block_given?
|
|
80
|
+
@configure
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Configure the OrganizationAddressGroupService Client instance.
|
|
85
|
+
#
|
|
86
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
87
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
88
|
+
# should be made on {Client.configure}.
|
|
89
|
+
#
|
|
90
|
+
# See {::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client::Configuration}
|
|
91
|
+
# for a description of the configuration fields.
|
|
92
|
+
#
|
|
93
|
+
# @yield [config] Configure the Client client.
|
|
94
|
+
# @yieldparam config [Client::Configuration]
|
|
95
|
+
#
|
|
96
|
+
# @return [Client::Configuration]
|
|
97
|
+
#
|
|
98
|
+
def configure
|
|
99
|
+
yield @config if block_given?
|
|
100
|
+
@config
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
##
|
|
104
|
+
# The effective universe domain
|
|
105
|
+
#
|
|
106
|
+
# @return [String]
|
|
107
|
+
#
|
|
108
|
+
def universe_domain
|
|
109
|
+
@organization_address_group_service_stub.universe_domain
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# Create a new OrganizationAddressGroupService client object.
|
|
114
|
+
#
|
|
115
|
+
# @example
|
|
116
|
+
#
|
|
117
|
+
# # Create a client using the default configuration
|
|
118
|
+
# client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
119
|
+
#
|
|
120
|
+
# # Create a client using a custom configuration
|
|
121
|
+
# client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new do |config|
|
|
122
|
+
# config.timeout = 10.0
|
|
123
|
+
# end
|
|
124
|
+
#
|
|
125
|
+
# @yield [config] Configure the OrganizationAddressGroupService client.
|
|
126
|
+
# @yieldparam config [Client::Configuration]
|
|
127
|
+
#
|
|
128
|
+
def initialize
|
|
129
|
+
# These require statements are intentionally placed here to initialize
|
|
130
|
+
# the gRPC module only when it's required.
|
|
131
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
132
|
+
require "gapic/grpc"
|
|
133
|
+
require "google/cloud/networksecurity/v1/address_group_services_pb"
|
|
134
|
+
|
|
135
|
+
# Create the configuration object
|
|
136
|
+
@config = Configuration.new Client.configure
|
|
137
|
+
|
|
138
|
+
# Yield the configuration if needed
|
|
139
|
+
yield @config if block_given?
|
|
140
|
+
|
|
141
|
+
# Create credentials
|
|
142
|
+
credentials = @config.credentials
|
|
143
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
144
|
+
# but only if the default endpoint does not have a region prefix.
|
|
145
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
146
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
147
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
148
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
149
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
150
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
151
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
152
|
+
end
|
|
153
|
+
@quota_project_id = @config.quota_project
|
|
154
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
155
|
+
|
|
156
|
+
@operations_client = Operations.new do |config|
|
|
157
|
+
config.credentials = credentials
|
|
158
|
+
config.quota_project = @quota_project_id
|
|
159
|
+
config.endpoint = @config.endpoint
|
|
160
|
+
config.universe_domain = @config.universe_domain
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@organization_address_group_service_stub = ::Gapic::ServiceStub.new(
|
|
164
|
+
::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Stub,
|
|
165
|
+
credentials: credentials,
|
|
166
|
+
endpoint: @config.endpoint,
|
|
167
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
168
|
+
universe_domain: @config.universe_domain,
|
|
169
|
+
channel_args: @config.channel_args,
|
|
170
|
+
interceptors: @config.interceptors,
|
|
171
|
+
channel_pool_config: @config.channel_pool,
|
|
172
|
+
logger: @config.logger
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
@organization_address_group_service_stub.stub_logger&.info do |entry|
|
|
176
|
+
entry.set_system_name
|
|
177
|
+
entry.set_service
|
|
178
|
+
entry.message = "Created client for #{entry.service}"
|
|
179
|
+
entry.set_credentials_fields credentials
|
|
180
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
181
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
182
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
|
186
|
+
config.credentials = credentials
|
|
187
|
+
config.quota_project = @quota_project_id
|
|
188
|
+
config.endpoint = @organization_address_group_service_stub.endpoint
|
|
189
|
+
config.universe_domain = @organization_address_group_service_stub.universe_domain
|
|
190
|
+
config.logger = @organization_address_group_service_stub.logger if config.respond_to? :logger=
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
|
194
|
+
config.credentials = credentials
|
|
195
|
+
config.quota_project = @quota_project_id
|
|
196
|
+
config.endpoint = @organization_address_group_service_stub.endpoint
|
|
197
|
+
config.universe_domain = @organization_address_group_service_stub.universe_domain
|
|
198
|
+
config.logger = @organization_address_group_service_stub.logger if config.respond_to? :logger=
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
##
|
|
203
|
+
# Get the associated client for long-running operations.
|
|
204
|
+
#
|
|
205
|
+
# @return [::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Operations]
|
|
206
|
+
#
|
|
207
|
+
attr_reader :operations_client
|
|
208
|
+
|
|
209
|
+
##
|
|
210
|
+
# Get the associated client for mix-in of the Locations.
|
|
211
|
+
#
|
|
212
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
|
213
|
+
#
|
|
214
|
+
attr_reader :location_client
|
|
215
|
+
|
|
216
|
+
##
|
|
217
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
218
|
+
#
|
|
219
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
|
220
|
+
#
|
|
221
|
+
attr_reader :iam_policy_client
|
|
222
|
+
|
|
223
|
+
##
|
|
224
|
+
# The logger used for request/response debug logging.
|
|
225
|
+
#
|
|
226
|
+
# @return [Logger]
|
|
227
|
+
#
|
|
228
|
+
def logger
|
|
229
|
+
@organization_address_group_service_stub.logger
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Service calls
|
|
233
|
+
|
|
234
|
+
##
|
|
235
|
+
# Lists address groups in a given project and location.
|
|
236
|
+
#
|
|
237
|
+
# @overload list_address_groups(request, options = nil)
|
|
238
|
+
# Pass arguments to `list_address_groups` via a request object, either of type
|
|
239
|
+
# {::Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest} or an equivalent Hash.
|
|
240
|
+
#
|
|
241
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest, ::Hash]
|
|
242
|
+
# A request object representing the call parameters. Required. To specify no
|
|
243
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
244
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
245
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
246
|
+
#
|
|
247
|
+
# @overload list_address_groups(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil)
|
|
248
|
+
# Pass arguments to `list_address_groups` via keyword arguments. Note that at
|
|
249
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
250
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
251
|
+
#
|
|
252
|
+
# @param parent [::String]
|
|
253
|
+
# Required. The project and location from which the AddressGroups
|
|
254
|
+
# should be listed, specified in the format
|
|
255
|
+
# `projects/*/locations/{location}`.
|
|
256
|
+
# @param page_size [::Integer]
|
|
257
|
+
# Maximum number of AddressGroups to return per call.
|
|
258
|
+
# @param page_token [::String]
|
|
259
|
+
# The value returned by the last
|
|
260
|
+
# `ListAddressGroupsResponse` Indicates that this is a
|
|
261
|
+
# continuation of a prior `ListAddressGroups` call, and
|
|
262
|
+
# that the system should return the next page of data.
|
|
263
|
+
# @param return_partial_success [::Boolean]
|
|
264
|
+
# Optional. If true, allow partial responses for multi-regional Aggregated
|
|
265
|
+
# List requests.
|
|
266
|
+
#
|
|
267
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
268
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>]
|
|
269
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
270
|
+
#
|
|
271
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::AddressGroup>]
|
|
272
|
+
#
|
|
273
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
274
|
+
#
|
|
275
|
+
# @example Basic example
|
|
276
|
+
# require "google/cloud/network_security/v1"
|
|
277
|
+
#
|
|
278
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
279
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
280
|
+
#
|
|
281
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
282
|
+
# request = Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest.new
|
|
283
|
+
#
|
|
284
|
+
# # Call the list_address_groups method.
|
|
285
|
+
# result = client.list_address_groups request
|
|
286
|
+
#
|
|
287
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
288
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
289
|
+
# result.each do |item|
|
|
290
|
+
# # Each element is of type ::Google::Cloud::NetworkSecurity::V1::AddressGroup.
|
|
291
|
+
# p item
|
|
292
|
+
# end
|
|
293
|
+
#
|
|
294
|
+
def list_address_groups request, options = nil
|
|
295
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
296
|
+
|
|
297
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListAddressGroupsRequest
|
|
298
|
+
|
|
299
|
+
# Converts hash and nil to an options object
|
|
300
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
301
|
+
|
|
302
|
+
# Customize the options with defaults
|
|
303
|
+
metadata = @config.rpcs.list_address_groups.metadata.to_h
|
|
304
|
+
|
|
305
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
306
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
307
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
308
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
309
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
310
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
311
|
+
|
|
312
|
+
header_params = {}
|
|
313
|
+
if request.parent
|
|
314
|
+
header_params["parent"] = request.parent
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
318
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
319
|
+
|
|
320
|
+
options.apply_defaults timeout: @config.rpcs.list_address_groups.timeout,
|
|
321
|
+
metadata: metadata,
|
|
322
|
+
retry_policy: @config.rpcs.list_address_groups.retry_policy
|
|
323
|
+
|
|
324
|
+
options.apply_defaults timeout: @config.timeout,
|
|
325
|
+
metadata: @config.metadata,
|
|
326
|
+
retry_policy: @config.retry_policy
|
|
327
|
+
|
|
328
|
+
@organization_address_group_service_stub.call_rpc :list_address_groups, request, options: options do |response, operation|
|
|
329
|
+
response = ::Gapic::PagedEnumerable.new @organization_address_group_service_stub, :list_address_groups, request, response, operation, options
|
|
330
|
+
yield response, operation if block_given?
|
|
331
|
+
throw :response, response
|
|
332
|
+
end
|
|
333
|
+
rescue ::GRPC::BadStatus => e
|
|
334
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
##
|
|
338
|
+
# Gets details of a single address group.
|
|
339
|
+
#
|
|
340
|
+
# @overload get_address_group(request, options = nil)
|
|
341
|
+
# Pass arguments to `get_address_group` via a request object, either of type
|
|
342
|
+
# {::Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest} or an equivalent Hash.
|
|
343
|
+
#
|
|
344
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest, ::Hash]
|
|
345
|
+
# A request object representing the call parameters. Required. To specify no
|
|
346
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
347
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
348
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
349
|
+
#
|
|
350
|
+
# @overload get_address_group(name: nil)
|
|
351
|
+
# Pass arguments to `get_address_group` via keyword arguments. Note that at
|
|
352
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
353
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
354
|
+
#
|
|
355
|
+
# @param name [::String]
|
|
356
|
+
# Required. A name of the AddressGroup to get. Must be in the format
|
|
357
|
+
# `projects/*/locations/{location}/addressGroups/*`.
|
|
358
|
+
#
|
|
359
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
360
|
+
# @yieldparam response [::Google::Cloud::NetworkSecurity::V1::AddressGroup]
|
|
361
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
362
|
+
#
|
|
363
|
+
# @return [::Google::Cloud::NetworkSecurity::V1::AddressGroup]
|
|
364
|
+
#
|
|
365
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
366
|
+
#
|
|
367
|
+
# @example Basic example
|
|
368
|
+
# require "google/cloud/network_security/v1"
|
|
369
|
+
#
|
|
370
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
371
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
372
|
+
#
|
|
373
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
374
|
+
# request = Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest.new
|
|
375
|
+
#
|
|
376
|
+
# # Call the get_address_group method.
|
|
377
|
+
# result = client.get_address_group request
|
|
378
|
+
#
|
|
379
|
+
# # The returned object is of type Google::Cloud::NetworkSecurity::V1::AddressGroup.
|
|
380
|
+
# p result
|
|
381
|
+
#
|
|
382
|
+
def get_address_group request, options = nil
|
|
383
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
384
|
+
|
|
385
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::GetAddressGroupRequest
|
|
386
|
+
|
|
387
|
+
# Converts hash and nil to an options object
|
|
388
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
389
|
+
|
|
390
|
+
# Customize the options with defaults
|
|
391
|
+
metadata = @config.rpcs.get_address_group.metadata.to_h
|
|
392
|
+
|
|
393
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
394
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
395
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
396
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
397
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
398
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
399
|
+
|
|
400
|
+
header_params = {}
|
|
401
|
+
if request.name
|
|
402
|
+
header_params["name"] = request.name
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
406
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
407
|
+
|
|
408
|
+
options.apply_defaults timeout: @config.rpcs.get_address_group.timeout,
|
|
409
|
+
metadata: metadata,
|
|
410
|
+
retry_policy: @config.rpcs.get_address_group.retry_policy
|
|
411
|
+
|
|
412
|
+
options.apply_defaults timeout: @config.timeout,
|
|
413
|
+
metadata: @config.metadata,
|
|
414
|
+
retry_policy: @config.retry_policy
|
|
415
|
+
|
|
416
|
+
@organization_address_group_service_stub.call_rpc :get_address_group, request, options: options do |response, operation|
|
|
417
|
+
yield response, operation if block_given?
|
|
418
|
+
end
|
|
419
|
+
rescue ::GRPC::BadStatus => e
|
|
420
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
##
|
|
424
|
+
# Creates a new address group in a given project and location.
|
|
425
|
+
#
|
|
426
|
+
# @overload create_address_group(request, options = nil)
|
|
427
|
+
# Pass arguments to `create_address_group` via a request object, either of type
|
|
428
|
+
# {::Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest} or an equivalent Hash.
|
|
429
|
+
#
|
|
430
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest, ::Hash]
|
|
431
|
+
# A request object representing the call parameters. Required. To specify no
|
|
432
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
433
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
434
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
435
|
+
#
|
|
436
|
+
# @overload create_address_group(parent: nil, address_group_id: nil, address_group: nil, request_id: nil)
|
|
437
|
+
# Pass arguments to `create_address_group` via keyword arguments. Note that at
|
|
438
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
439
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
440
|
+
#
|
|
441
|
+
# @param parent [::String]
|
|
442
|
+
# Required. The parent resource of the AddressGroup. Must be in the
|
|
443
|
+
# format `projects/*/locations/{location}`.
|
|
444
|
+
# @param address_group_id [::String]
|
|
445
|
+
# Required. Short name of the AddressGroup resource to be created.
|
|
446
|
+
# This value should be 1-63 characters long, containing only
|
|
447
|
+
# letters, numbers, hyphens, and underscores, and should not start
|
|
448
|
+
# with a number. E.g. "authz_policy".
|
|
449
|
+
# @param address_group [::Google::Cloud::NetworkSecurity::V1::AddressGroup, ::Hash]
|
|
450
|
+
# Required. AddressGroup resource to be created.
|
|
451
|
+
# @param request_id [::String]
|
|
452
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
453
|
+
# request ID so that if you must retry your request, the server will know to
|
|
454
|
+
# ignore the request if it has already been completed. The server will
|
|
455
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
456
|
+
#
|
|
457
|
+
# For example, consider a situation where you make an initial request and
|
|
458
|
+
# the request times out. If you make the request again with the same request
|
|
459
|
+
# ID, the server can check if original operation with the same request ID
|
|
460
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
461
|
+
# clients from accidentally creating duplicate commitments.
|
|
462
|
+
#
|
|
463
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
464
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
465
|
+
#
|
|
466
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
467
|
+
# @yieldparam response [::Gapic::Operation]
|
|
468
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
469
|
+
#
|
|
470
|
+
# @return [::Gapic::Operation]
|
|
471
|
+
#
|
|
472
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
473
|
+
#
|
|
474
|
+
# @example Basic example
|
|
475
|
+
# require "google/cloud/network_security/v1"
|
|
476
|
+
#
|
|
477
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
478
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
479
|
+
#
|
|
480
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
481
|
+
# request = Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest.new
|
|
482
|
+
#
|
|
483
|
+
# # Call the create_address_group method.
|
|
484
|
+
# result = client.create_address_group request
|
|
485
|
+
#
|
|
486
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
487
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
488
|
+
# # Here is how to wait for a response.
|
|
489
|
+
# result.wait_until_done! timeout: 60
|
|
490
|
+
# if result.response?
|
|
491
|
+
# p result.response
|
|
492
|
+
# else
|
|
493
|
+
# puts "No response received."
|
|
494
|
+
# end
|
|
495
|
+
#
|
|
496
|
+
def create_address_group request, options = nil
|
|
497
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
498
|
+
|
|
499
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CreateAddressGroupRequest
|
|
500
|
+
|
|
501
|
+
# Converts hash and nil to an options object
|
|
502
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
503
|
+
|
|
504
|
+
# Customize the options with defaults
|
|
505
|
+
metadata = @config.rpcs.create_address_group.metadata.to_h
|
|
506
|
+
|
|
507
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
508
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
509
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
510
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
511
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
512
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
513
|
+
|
|
514
|
+
header_params = {}
|
|
515
|
+
if request.parent
|
|
516
|
+
header_params["parent"] = request.parent
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
520
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
521
|
+
|
|
522
|
+
options.apply_defaults timeout: @config.rpcs.create_address_group.timeout,
|
|
523
|
+
metadata: metadata,
|
|
524
|
+
retry_policy: @config.rpcs.create_address_group.retry_policy
|
|
525
|
+
|
|
526
|
+
options.apply_defaults timeout: @config.timeout,
|
|
527
|
+
metadata: @config.metadata,
|
|
528
|
+
retry_policy: @config.retry_policy
|
|
529
|
+
|
|
530
|
+
@organization_address_group_service_stub.call_rpc :create_address_group, request, options: options do |response, operation|
|
|
531
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
532
|
+
yield response, operation if block_given?
|
|
533
|
+
throw :response, response
|
|
534
|
+
end
|
|
535
|
+
rescue ::GRPC::BadStatus => e
|
|
536
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
##
|
|
540
|
+
# Updates parameters of an address group.
|
|
541
|
+
#
|
|
542
|
+
# @overload update_address_group(request, options = nil)
|
|
543
|
+
# Pass arguments to `update_address_group` via a request object, either of type
|
|
544
|
+
# {::Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest} or an equivalent Hash.
|
|
545
|
+
#
|
|
546
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest, ::Hash]
|
|
547
|
+
# A request object representing the call parameters. Required. To specify no
|
|
548
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
549
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
550
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
551
|
+
#
|
|
552
|
+
# @overload update_address_group(update_mask: nil, address_group: nil, request_id: nil)
|
|
553
|
+
# Pass arguments to `update_address_group` via keyword arguments. Note that at
|
|
554
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
555
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
556
|
+
#
|
|
557
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
558
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
|
559
|
+
# AddressGroup resource by the update.
|
|
560
|
+
# The fields specified in the update_mask are relative to the resource, not
|
|
561
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
|
562
|
+
# user does not provide a mask then all fields will be overwritten.
|
|
563
|
+
# @param address_group [::Google::Cloud::NetworkSecurity::V1::AddressGroup, ::Hash]
|
|
564
|
+
# Required. Updated AddressGroup resource.
|
|
565
|
+
# @param request_id [::String]
|
|
566
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
567
|
+
# request ID so that if you must retry your request, the server will know to
|
|
568
|
+
# ignore the request if it has already been completed. The server will
|
|
569
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
570
|
+
#
|
|
571
|
+
# For example, consider a situation where you make an initial request and
|
|
572
|
+
# the request times out. If you make the request again with the same request
|
|
573
|
+
# ID, the server can check if original operation with the same request ID
|
|
574
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
575
|
+
# clients from accidentally creating duplicate commitments.
|
|
576
|
+
#
|
|
577
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
578
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
579
|
+
#
|
|
580
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
581
|
+
# @yieldparam response [::Gapic::Operation]
|
|
582
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
583
|
+
#
|
|
584
|
+
# @return [::Gapic::Operation]
|
|
585
|
+
#
|
|
586
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
587
|
+
#
|
|
588
|
+
# @example Basic example
|
|
589
|
+
# require "google/cloud/network_security/v1"
|
|
590
|
+
#
|
|
591
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
592
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
593
|
+
#
|
|
594
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
595
|
+
# request = Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest.new
|
|
596
|
+
#
|
|
597
|
+
# # Call the update_address_group method.
|
|
598
|
+
# result = client.update_address_group request
|
|
599
|
+
#
|
|
600
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
601
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
602
|
+
# # Here is how to wait for a response.
|
|
603
|
+
# result.wait_until_done! timeout: 60
|
|
604
|
+
# if result.response?
|
|
605
|
+
# p result.response
|
|
606
|
+
# else
|
|
607
|
+
# puts "No response received."
|
|
608
|
+
# end
|
|
609
|
+
#
|
|
610
|
+
def update_address_group request, options = nil
|
|
611
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
612
|
+
|
|
613
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::UpdateAddressGroupRequest
|
|
614
|
+
|
|
615
|
+
# Converts hash and nil to an options object
|
|
616
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
617
|
+
|
|
618
|
+
# Customize the options with defaults
|
|
619
|
+
metadata = @config.rpcs.update_address_group.metadata.to_h
|
|
620
|
+
|
|
621
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
622
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
623
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
624
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
625
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
626
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
627
|
+
|
|
628
|
+
header_params = {}
|
|
629
|
+
if request.address_group&.name
|
|
630
|
+
header_params["address_group.name"] = request.address_group.name
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
634
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
635
|
+
|
|
636
|
+
options.apply_defaults timeout: @config.rpcs.update_address_group.timeout,
|
|
637
|
+
metadata: metadata,
|
|
638
|
+
retry_policy: @config.rpcs.update_address_group.retry_policy
|
|
639
|
+
|
|
640
|
+
options.apply_defaults timeout: @config.timeout,
|
|
641
|
+
metadata: @config.metadata,
|
|
642
|
+
retry_policy: @config.retry_policy
|
|
643
|
+
|
|
644
|
+
@organization_address_group_service_stub.call_rpc :update_address_group, request, options: options do |response, operation|
|
|
645
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
646
|
+
yield response, operation if block_given?
|
|
647
|
+
throw :response, response
|
|
648
|
+
end
|
|
649
|
+
rescue ::GRPC::BadStatus => e
|
|
650
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
##
|
|
654
|
+
# Adds items to an address group.
|
|
655
|
+
#
|
|
656
|
+
# @overload add_address_group_items(request, options = nil)
|
|
657
|
+
# Pass arguments to `add_address_group_items` via a request object, either of type
|
|
658
|
+
# {::Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest} or an equivalent Hash.
|
|
659
|
+
#
|
|
660
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest, ::Hash]
|
|
661
|
+
# A request object representing the call parameters. Required. To specify no
|
|
662
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
663
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
664
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
665
|
+
#
|
|
666
|
+
# @overload add_address_group_items(address_group: nil, items: nil, request_id: nil)
|
|
667
|
+
# Pass arguments to `add_address_group_items` via keyword arguments. Note that at
|
|
668
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
669
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
670
|
+
#
|
|
671
|
+
# @param address_group [::String]
|
|
672
|
+
# Required. A name of the AddressGroup to add items to. Must be in the format
|
|
673
|
+
# `projects|organization/*/locations/{location}/addressGroups/*`.
|
|
674
|
+
# @param items [::Array<::String>]
|
|
675
|
+
# Required. List of items to add.
|
|
676
|
+
# @param request_id [::String]
|
|
677
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
678
|
+
# request ID so that if you must retry your request, the server will know to
|
|
679
|
+
# ignore the request if it has already been completed. The server will
|
|
680
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
681
|
+
#
|
|
682
|
+
# For example, consider a situation where you make an initial request and
|
|
683
|
+
# the request times out. If you make the request again with the same request
|
|
684
|
+
# ID, the server can check if original operation with the same request ID
|
|
685
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
686
|
+
# clients from accidentally creating duplicate commitments.
|
|
687
|
+
#
|
|
688
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
689
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
690
|
+
#
|
|
691
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
692
|
+
# @yieldparam response [::Gapic::Operation]
|
|
693
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
694
|
+
#
|
|
695
|
+
# @return [::Gapic::Operation]
|
|
696
|
+
#
|
|
697
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
698
|
+
#
|
|
699
|
+
# @example Basic example
|
|
700
|
+
# require "google/cloud/network_security/v1"
|
|
701
|
+
#
|
|
702
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
703
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
704
|
+
#
|
|
705
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
706
|
+
# request = Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest.new
|
|
707
|
+
#
|
|
708
|
+
# # Call the add_address_group_items method.
|
|
709
|
+
# result = client.add_address_group_items request
|
|
710
|
+
#
|
|
711
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
712
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
713
|
+
# # Here is how to wait for a response.
|
|
714
|
+
# result.wait_until_done! timeout: 60
|
|
715
|
+
# if result.response?
|
|
716
|
+
# p result.response
|
|
717
|
+
# else
|
|
718
|
+
# puts "No response received."
|
|
719
|
+
# end
|
|
720
|
+
#
|
|
721
|
+
def add_address_group_items request, options = nil
|
|
722
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
723
|
+
|
|
724
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::AddAddressGroupItemsRequest
|
|
725
|
+
|
|
726
|
+
# Converts hash and nil to an options object
|
|
727
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
728
|
+
|
|
729
|
+
# Customize the options with defaults
|
|
730
|
+
metadata = @config.rpcs.add_address_group_items.metadata.to_h
|
|
731
|
+
|
|
732
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
733
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
734
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
735
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
736
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
737
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
738
|
+
|
|
739
|
+
header_params = {}
|
|
740
|
+
if request.address_group
|
|
741
|
+
header_params["address_group"] = request.address_group
|
|
742
|
+
end
|
|
743
|
+
|
|
744
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
745
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
746
|
+
|
|
747
|
+
options.apply_defaults timeout: @config.rpcs.add_address_group_items.timeout,
|
|
748
|
+
metadata: metadata,
|
|
749
|
+
retry_policy: @config.rpcs.add_address_group_items.retry_policy
|
|
750
|
+
|
|
751
|
+
options.apply_defaults timeout: @config.timeout,
|
|
752
|
+
metadata: @config.metadata,
|
|
753
|
+
retry_policy: @config.retry_policy
|
|
754
|
+
|
|
755
|
+
@organization_address_group_service_stub.call_rpc :add_address_group_items, request, options: options do |response, operation|
|
|
756
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
757
|
+
yield response, operation if block_given?
|
|
758
|
+
throw :response, response
|
|
759
|
+
end
|
|
760
|
+
rescue ::GRPC::BadStatus => e
|
|
761
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
762
|
+
end
|
|
763
|
+
|
|
764
|
+
##
|
|
765
|
+
# Removes items from an address group.
|
|
766
|
+
#
|
|
767
|
+
# @overload remove_address_group_items(request, options = nil)
|
|
768
|
+
# Pass arguments to `remove_address_group_items` via a request object, either of type
|
|
769
|
+
# {::Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest} or an equivalent Hash.
|
|
770
|
+
#
|
|
771
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest, ::Hash]
|
|
772
|
+
# A request object representing the call parameters. Required. To specify no
|
|
773
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
774
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
775
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
776
|
+
#
|
|
777
|
+
# @overload remove_address_group_items(address_group: nil, items: nil, request_id: nil)
|
|
778
|
+
# Pass arguments to `remove_address_group_items` via keyword arguments. Note that at
|
|
779
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
780
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
781
|
+
#
|
|
782
|
+
# @param address_group [::String]
|
|
783
|
+
# Required. A name of the AddressGroup to remove items from. Must be in the
|
|
784
|
+
# format `projects|organization/*/locations/{location}/addressGroups/*`.
|
|
785
|
+
# @param items [::Array<::String>]
|
|
786
|
+
# Required. List of items to remove.
|
|
787
|
+
# @param request_id [::String]
|
|
788
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
789
|
+
# request ID so that if you must retry your request, the server will know to
|
|
790
|
+
# ignore the request if it has already been completed. The server will
|
|
791
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
792
|
+
#
|
|
793
|
+
# For example, consider a situation where you make an initial request and
|
|
794
|
+
# the request times out. If you make the request again with the same request
|
|
795
|
+
# ID, the server can check if original operation with the same request ID
|
|
796
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
797
|
+
# clients from accidentally creating duplicate commitments.
|
|
798
|
+
#
|
|
799
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
800
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
801
|
+
#
|
|
802
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
803
|
+
# @yieldparam response [::Gapic::Operation]
|
|
804
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
805
|
+
#
|
|
806
|
+
# @return [::Gapic::Operation]
|
|
807
|
+
#
|
|
808
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
809
|
+
#
|
|
810
|
+
# @example Basic example
|
|
811
|
+
# require "google/cloud/network_security/v1"
|
|
812
|
+
#
|
|
813
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
814
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
815
|
+
#
|
|
816
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
817
|
+
# request = Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest.new
|
|
818
|
+
#
|
|
819
|
+
# # Call the remove_address_group_items method.
|
|
820
|
+
# result = client.remove_address_group_items request
|
|
821
|
+
#
|
|
822
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
823
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
824
|
+
# # Here is how to wait for a response.
|
|
825
|
+
# result.wait_until_done! timeout: 60
|
|
826
|
+
# if result.response?
|
|
827
|
+
# p result.response
|
|
828
|
+
# else
|
|
829
|
+
# puts "No response received."
|
|
830
|
+
# end
|
|
831
|
+
#
|
|
832
|
+
def remove_address_group_items request, options = nil
|
|
833
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
834
|
+
|
|
835
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::RemoveAddressGroupItemsRequest
|
|
836
|
+
|
|
837
|
+
# Converts hash and nil to an options object
|
|
838
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
839
|
+
|
|
840
|
+
# Customize the options with defaults
|
|
841
|
+
metadata = @config.rpcs.remove_address_group_items.metadata.to_h
|
|
842
|
+
|
|
843
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
844
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
845
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
846
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
847
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
848
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
849
|
+
|
|
850
|
+
header_params = {}
|
|
851
|
+
if request.address_group
|
|
852
|
+
header_params["address_group"] = request.address_group
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
856
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
857
|
+
|
|
858
|
+
options.apply_defaults timeout: @config.rpcs.remove_address_group_items.timeout,
|
|
859
|
+
metadata: metadata,
|
|
860
|
+
retry_policy: @config.rpcs.remove_address_group_items.retry_policy
|
|
861
|
+
|
|
862
|
+
options.apply_defaults timeout: @config.timeout,
|
|
863
|
+
metadata: @config.metadata,
|
|
864
|
+
retry_policy: @config.retry_policy
|
|
865
|
+
|
|
866
|
+
@organization_address_group_service_stub.call_rpc :remove_address_group_items, request, options: options do |response, operation|
|
|
867
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
868
|
+
yield response, operation if block_given?
|
|
869
|
+
throw :response, response
|
|
870
|
+
end
|
|
871
|
+
rescue ::GRPC::BadStatus => e
|
|
872
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
##
|
|
876
|
+
# Clones items from one address group to another.
|
|
877
|
+
#
|
|
878
|
+
# @overload clone_address_group_items(request, options = nil)
|
|
879
|
+
# Pass arguments to `clone_address_group_items` via a request object, either of type
|
|
880
|
+
# {::Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest} or an equivalent Hash.
|
|
881
|
+
#
|
|
882
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest, ::Hash]
|
|
883
|
+
# A request object representing the call parameters. Required. To specify no
|
|
884
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
885
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
886
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
887
|
+
#
|
|
888
|
+
# @overload clone_address_group_items(address_group: nil, source_address_group: nil, request_id: nil)
|
|
889
|
+
# Pass arguments to `clone_address_group_items` via keyword arguments. Note that at
|
|
890
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
891
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
892
|
+
#
|
|
893
|
+
# @param address_group [::String]
|
|
894
|
+
# Required. A name of the AddressGroup to clone items to. Must be in the
|
|
895
|
+
# format `projects|organization/*/locations/{location}/addressGroups/*`.
|
|
896
|
+
# @param source_address_group [::String]
|
|
897
|
+
# Required. Source address group to clone items from.
|
|
898
|
+
# @param request_id [::String]
|
|
899
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
900
|
+
# request ID so that if you must retry your request, the server will know to
|
|
901
|
+
# ignore the request if it has already been completed. The server will
|
|
902
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
903
|
+
#
|
|
904
|
+
# For example, consider a situation where you make an initial request and
|
|
905
|
+
# the request times out. If you make the request again with the same request
|
|
906
|
+
# ID, the server can check if original operation with the same request ID
|
|
907
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
908
|
+
# clients from accidentally creating duplicate commitments.
|
|
909
|
+
#
|
|
910
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
911
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
912
|
+
#
|
|
913
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
914
|
+
# @yieldparam response [::Gapic::Operation]
|
|
915
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
916
|
+
#
|
|
917
|
+
# @return [::Gapic::Operation]
|
|
918
|
+
#
|
|
919
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
920
|
+
#
|
|
921
|
+
# @example Basic example
|
|
922
|
+
# require "google/cloud/network_security/v1"
|
|
923
|
+
#
|
|
924
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
925
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
926
|
+
#
|
|
927
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
928
|
+
# request = Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest.new
|
|
929
|
+
#
|
|
930
|
+
# # Call the clone_address_group_items method.
|
|
931
|
+
# result = client.clone_address_group_items request
|
|
932
|
+
#
|
|
933
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
934
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
935
|
+
# # Here is how to wait for a response.
|
|
936
|
+
# result.wait_until_done! timeout: 60
|
|
937
|
+
# if result.response?
|
|
938
|
+
# p result.response
|
|
939
|
+
# else
|
|
940
|
+
# puts "No response received."
|
|
941
|
+
# end
|
|
942
|
+
#
|
|
943
|
+
def clone_address_group_items request, options = nil
|
|
944
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
945
|
+
|
|
946
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::CloneAddressGroupItemsRequest
|
|
947
|
+
|
|
948
|
+
# Converts hash and nil to an options object
|
|
949
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
950
|
+
|
|
951
|
+
# Customize the options with defaults
|
|
952
|
+
metadata = @config.rpcs.clone_address_group_items.metadata.to_h
|
|
953
|
+
|
|
954
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
955
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
956
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
957
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
958
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
959
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
960
|
+
|
|
961
|
+
header_params = {}
|
|
962
|
+
if request.address_group
|
|
963
|
+
header_params["address_group"] = request.address_group
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
967
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
968
|
+
|
|
969
|
+
options.apply_defaults timeout: @config.rpcs.clone_address_group_items.timeout,
|
|
970
|
+
metadata: metadata,
|
|
971
|
+
retry_policy: @config.rpcs.clone_address_group_items.retry_policy
|
|
972
|
+
|
|
973
|
+
options.apply_defaults timeout: @config.timeout,
|
|
974
|
+
metadata: @config.metadata,
|
|
975
|
+
retry_policy: @config.retry_policy
|
|
976
|
+
|
|
977
|
+
@organization_address_group_service_stub.call_rpc :clone_address_group_items, request, options: options do |response, operation|
|
|
978
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
979
|
+
yield response, operation if block_given?
|
|
980
|
+
throw :response, response
|
|
981
|
+
end
|
|
982
|
+
rescue ::GRPC::BadStatus => e
|
|
983
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
984
|
+
end
|
|
985
|
+
|
|
986
|
+
##
|
|
987
|
+
# Deletes an address group.
|
|
988
|
+
#
|
|
989
|
+
# @overload delete_address_group(request, options = nil)
|
|
990
|
+
# Pass arguments to `delete_address_group` via a request object, either of type
|
|
991
|
+
# {::Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest} or an equivalent Hash.
|
|
992
|
+
#
|
|
993
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest, ::Hash]
|
|
994
|
+
# A request object representing the call parameters. Required. To specify no
|
|
995
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
996
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
997
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
998
|
+
#
|
|
999
|
+
# @overload delete_address_group(name: nil, request_id: nil)
|
|
1000
|
+
# Pass arguments to `delete_address_group` via keyword arguments. Note that at
|
|
1001
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1002
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1003
|
+
#
|
|
1004
|
+
# @param name [::String]
|
|
1005
|
+
# Required. A name of the AddressGroup to delete. Must be in the format
|
|
1006
|
+
# `projects/*/locations/{location}/addressGroups/*`.
|
|
1007
|
+
# @param request_id [::String]
|
|
1008
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
1009
|
+
# request ID so that if you must retry your request, the server will know to
|
|
1010
|
+
# ignore the request if it has already been completed. The server will
|
|
1011
|
+
# guarantee that for at least 60 minutes since the first request.
|
|
1012
|
+
#
|
|
1013
|
+
# For example, consider a situation where you make an initial request and
|
|
1014
|
+
# the request times out. If you make the request again with the same request
|
|
1015
|
+
# ID, the server can check if original operation with the same request ID
|
|
1016
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
1017
|
+
# clients from accidentally creating duplicate commitments.
|
|
1018
|
+
#
|
|
1019
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
1020
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
1021
|
+
#
|
|
1022
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1023
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1024
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1025
|
+
#
|
|
1026
|
+
# @return [::Gapic::Operation]
|
|
1027
|
+
#
|
|
1028
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1029
|
+
#
|
|
1030
|
+
# @example Basic example
|
|
1031
|
+
# require "google/cloud/network_security/v1"
|
|
1032
|
+
#
|
|
1033
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1034
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
1035
|
+
#
|
|
1036
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1037
|
+
# request = Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest.new
|
|
1038
|
+
#
|
|
1039
|
+
# # Call the delete_address_group method.
|
|
1040
|
+
# result = client.delete_address_group request
|
|
1041
|
+
#
|
|
1042
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1043
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1044
|
+
# # Here is how to wait for a response.
|
|
1045
|
+
# result.wait_until_done! timeout: 60
|
|
1046
|
+
# if result.response?
|
|
1047
|
+
# p result.response
|
|
1048
|
+
# else
|
|
1049
|
+
# puts "No response received."
|
|
1050
|
+
# end
|
|
1051
|
+
#
|
|
1052
|
+
def delete_address_group request, options = nil
|
|
1053
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1054
|
+
|
|
1055
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::DeleteAddressGroupRequest
|
|
1056
|
+
|
|
1057
|
+
# Converts hash and nil to an options object
|
|
1058
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1059
|
+
|
|
1060
|
+
# Customize the options with defaults
|
|
1061
|
+
metadata = @config.rpcs.delete_address_group.metadata.to_h
|
|
1062
|
+
|
|
1063
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1064
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1065
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1066
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
1067
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1068
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1069
|
+
|
|
1070
|
+
header_params = {}
|
|
1071
|
+
if request.name
|
|
1072
|
+
header_params["name"] = request.name
|
|
1073
|
+
end
|
|
1074
|
+
|
|
1075
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1076
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1077
|
+
|
|
1078
|
+
options.apply_defaults timeout: @config.rpcs.delete_address_group.timeout,
|
|
1079
|
+
metadata: metadata,
|
|
1080
|
+
retry_policy: @config.rpcs.delete_address_group.retry_policy
|
|
1081
|
+
|
|
1082
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1083
|
+
metadata: @config.metadata,
|
|
1084
|
+
retry_policy: @config.retry_policy
|
|
1085
|
+
|
|
1086
|
+
@organization_address_group_service_stub.call_rpc :delete_address_group, request, options: options do |response, operation|
|
|
1087
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1088
|
+
yield response, operation if block_given?
|
|
1089
|
+
throw :response, response
|
|
1090
|
+
end
|
|
1091
|
+
rescue ::GRPC::BadStatus => e
|
|
1092
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1093
|
+
end
|
|
1094
|
+
|
|
1095
|
+
##
|
|
1096
|
+
# Lists references of an address group.
|
|
1097
|
+
#
|
|
1098
|
+
# @overload list_address_group_references(request, options = nil)
|
|
1099
|
+
# Pass arguments to `list_address_group_references` via a request object, either of type
|
|
1100
|
+
# {::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest} or an equivalent Hash.
|
|
1101
|
+
#
|
|
1102
|
+
# @param request [::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest, ::Hash]
|
|
1103
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1104
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1105
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1106
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1107
|
+
#
|
|
1108
|
+
# @overload list_address_group_references(address_group: nil, page_size: nil, page_token: nil)
|
|
1109
|
+
# Pass arguments to `list_address_group_references` via keyword arguments. Note that at
|
|
1110
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1111
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1112
|
+
#
|
|
1113
|
+
# @param address_group [::String]
|
|
1114
|
+
# Required. A name of the AddressGroup to clone items to. Must be in the
|
|
1115
|
+
# format `projects|organization/*/locations/{location}/addressGroups/*`.
|
|
1116
|
+
# @param page_size [::Integer]
|
|
1117
|
+
# The maximum number of references to return. If unspecified, server
|
|
1118
|
+
# will pick an appropriate default. Server may return fewer items than
|
|
1119
|
+
# requested. A caller should only rely on response's
|
|
1120
|
+
# {::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse#next_page_token next_page_token}
|
|
1121
|
+
# to determine if there are more AddressGroupUsers left to be queried.
|
|
1122
|
+
# @param page_token [::String]
|
|
1123
|
+
# The next_page_token value returned from a previous List request,
|
|
1124
|
+
# if any.
|
|
1125
|
+
#
|
|
1126
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1127
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>]
|
|
1128
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1129
|
+
#
|
|
1130
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference>]
|
|
1131
|
+
#
|
|
1132
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1133
|
+
#
|
|
1134
|
+
# @example Basic example
|
|
1135
|
+
# require "google/cloud/network_security/v1"
|
|
1136
|
+
#
|
|
1137
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1138
|
+
# client = Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new
|
|
1139
|
+
#
|
|
1140
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1141
|
+
# request = Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest.new
|
|
1142
|
+
#
|
|
1143
|
+
# # Call the list_address_group_references method.
|
|
1144
|
+
# result = client.list_address_group_references request
|
|
1145
|
+
#
|
|
1146
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1147
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1148
|
+
# result.each do |item|
|
|
1149
|
+
# # Each element is of type ::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesResponse::AddressGroupReference.
|
|
1150
|
+
# p item
|
|
1151
|
+
# end
|
|
1152
|
+
#
|
|
1153
|
+
def list_address_group_references request, options = nil
|
|
1154
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1155
|
+
|
|
1156
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1::ListAddressGroupReferencesRequest
|
|
1157
|
+
|
|
1158
|
+
# Converts hash and nil to an options object
|
|
1159
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1160
|
+
|
|
1161
|
+
# Customize the options with defaults
|
|
1162
|
+
metadata = @config.rpcs.list_address_group_references.metadata.to_h
|
|
1163
|
+
|
|
1164
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1165
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1166
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1167
|
+
gapic_version: ::Google::Cloud::NetworkSecurity::V1::VERSION
|
|
1168
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1169
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1170
|
+
|
|
1171
|
+
header_params = {}
|
|
1172
|
+
if request.address_group
|
|
1173
|
+
header_params["address_group"] = request.address_group
|
|
1174
|
+
end
|
|
1175
|
+
|
|
1176
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1177
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1178
|
+
|
|
1179
|
+
options.apply_defaults timeout: @config.rpcs.list_address_group_references.timeout,
|
|
1180
|
+
metadata: metadata,
|
|
1181
|
+
retry_policy: @config.rpcs.list_address_group_references.retry_policy
|
|
1182
|
+
|
|
1183
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1184
|
+
metadata: @config.metadata,
|
|
1185
|
+
retry_policy: @config.retry_policy
|
|
1186
|
+
|
|
1187
|
+
@organization_address_group_service_stub.call_rpc :list_address_group_references, request, options: options do |response, operation|
|
|
1188
|
+
response = ::Gapic::PagedEnumerable.new @organization_address_group_service_stub, :list_address_group_references, request, response, operation, options
|
|
1189
|
+
yield response, operation if block_given?
|
|
1190
|
+
throw :response, response
|
|
1191
|
+
end
|
|
1192
|
+
rescue ::GRPC::BadStatus => e
|
|
1193
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1194
|
+
end
|
|
1195
|
+
|
|
1196
|
+
##
|
|
1197
|
+
# Configuration class for the OrganizationAddressGroupService API.
|
|
1198
|
+
#
|
|
1199
|
+
# This class represents the configuration for OrganizationAddressGroupService,
|
|
1200
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1201
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1202
|
+
# applied individually to specific RPCs. See
|
|
1203
|
+
# {::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client::Configuration::Rpcs}
|
|
1204
|
+
# for a list of RPCs that can be configured independently.
|
|
1205
|
+
#
|
|
1206
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1207
|
+
# on construction.
|
|
1208
|
+
#
|
|
1209
|
+
# @example
|
|
1210
|
+
#
|
|
1211
|
+
# # Modify the global config, setting the timeout for
|
|
1212
|
+
# # list_address_groups to 20 seconds,
|
|
1213
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1214
|
+
# ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.configure do |config|
|
|
1215
|
+
# config.timeout = 10.0
|
|
1216
|
+
# config.rpcs.list_address_groups.timeout = 20.0
|
|
1217
|
+
# end
|
|
1218
|
+
#
|
|
1219
|
+
# # Apply the above configuration only to a new client.
|
|
1220
|
+
# client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new do |config|
|
|
1221
|
+
# config.timeout = 10.0
|
|
1222
|
+
# config.rpcs.list_address_groups.timeout = 20.0
|
|
1223
|
+
# end
|
|
1224
|
+
#
|
|
1225
|
+
# @!attribute [rw] endpoint
|
|
1226
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1227
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1228
|
+
# @return [::String,nil]
|
|
1229
|
+
# @!attribute [rw] credentials
|
|
1230
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1231
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1232
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1233
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1234
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1235
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1236
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1237
|
+
# * (`nil`) indicating no credentials
|
|
1238
|
+
#
|
|
1239
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1240
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1241
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1242
|
+
#
|
|
1243
|
+
# @example
|
|
1244
|
+
#
|
|
1245
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1246
|
+
# # on the appropriate credentials class for your environment.
|
|
1247
|
+
#
|
|
1248
|
+
# require "googleauth"
|
|
1249
|
+
#
|
|
1250
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1251
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1252
|
+
# )
|
|
1253
|
+
#
|
|
1254
|
+
# client = ::Google::Cloud::NetworkSecurity::V1::OrganizationAddressGroupService::Client.new do |config|
|
|
1255
|
+
# config.credentials = credentials
|
|
1256
|
+
# end
|
|
1257
|
+
#
|
|
1258
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1259
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1260
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1261
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1262
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1263
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1264
|
+
# @return [::Object]
|
|
1265
|
+
# @!attribute [rw] scope
|
|
1266
|
+
# The OAuth scopes
|
|
1267
|
+
# @return [::Array<::String>]
|
|
1268
|
+
# @!attribute [rw] lib_name
|
|
1269
|
+
# The library name as recorded in instrumentation and logging
|
|
1270
|
+
# @return [::String]
|
|
1271
|
+
# @!attribute [rw] lib_version
|
|
1272
|
+
# The library version as recorded in instrumentation and logging
|
|
1273
|
+
# @return [::String]
|
|
1274
|
+
# @!attribute [rw] channel_args
|
|
1275
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1276
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1277
|
+
# @return [::Hash]
|
|
1278
|
+
# @!attribute [rw] interceptors
|
|
1279
|
+
# An array of interceptors that are run before calls are executed.
|
|
1280
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1281
|
+
# @!attribute [rw] timeout
|
|
1282
|
+
# The call timeout in seconds.
|
|
1283
|
+
# @return [::Numeric]
|
|
1284
|
+
# @!attribute [rw] metadata
|
|
1285
|
+
# Additional gRPC headers to be sent with the call.
|
|
1286
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1287
|
+
# @!attribute [rw] retry_policy
|
|
1288
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1289
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1290
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1291
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1292
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1293
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1294
|
+
# trigger a retry.
|
|
1295
|
+
# @return [::Hash]
|
|
1296
|
+
# @!attribute [rw] quota_project
|
|
1297
|
+
# A separate project against which to charge quota.
|
|
1298
|
+
# @return [::String]
|
|
1299
|
+
# @!attribute [rw] universe_domain
|
|
1300
|
+
# The universe domain within which to make requests. This determines the
|
|
1301
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1302
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1303
|
+
# @return [::String,nil]
|
|
1304
|
+
# @!attribute [rw] logger
|
|
1305
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1306
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1307
|
+
# explicitly disable logging.
|
|
1308
|
+
# @return [::Logger,:default,nil]
|
|
1309
|
+
#
|
|
1310
|
+
class Configuration
|
|
1311
|
+
extend ::Gapic::Config
|
|
1312
|
+
|
|
1313
|
+
# @private
|
|
1314
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1315
|
+
DEFAULT_ENDPOINT = "networksecurity.googleapis.com"
|
|
1316
|
+
|
|
1317
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1318
|
+
config_attr :credentials, nil do |value|
|
|
1319
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1320
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
1321
|
+
allowed.any? { |klass| klass === value }
|
|
1322
|
+
end
|
|
1323
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1324
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1325
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1326
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1327
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1328
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1329
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1330
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1331
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1332
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1333
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1334
|
+
|
|
1335
|
+
# @private
|
|
1336
|
+
def initialize parent_config = nil
|
|
1337
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1338
|
+
|
|
1339
|
+
yield self if block_given?
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
##
|
|
1343
|
+
# Configurations for individual RPCs
|
|
1344
|
+
# @return [Rpcs]
|
|
1345
|
+
#
|
|
1346
|
+
def rpcs
|
|
1347
|
+
@rpcs ||= begin
|
|
1348
|
+
parent_rpcs = nil
|
|
1349
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1350
|
+
Rpcs.new parent_rpcs
|
|
1351
|
+
end
|
|
1352
|
+
end
|
|
1353
|
+
|
|
1354
|
+
##
|
|
1355
|
+
# Configuration for the channel pool
|
|
1356
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
1357
|
+
#
|
|
1358
|
+
def channel_pool
|
|
1359
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
##
|
|
1363
|
+
# Configuration RPC class for the OrganizationAddressGroupService API.
|
|
1364
|
+
#
|
|
1365
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1366
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1367
|
+
# the following configuration fields:
|
|
1368
|
+
#
|
|
1369
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1370
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1371
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1372
|
+
# include the following keys:
|
|
1373
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1374
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1375
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1376
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1377
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1378
|
+
# trigger a retry.
|
|
1379
|
+
#
|
|
1380
|
+
class Rpcs
|
|
1381
|
+
##
|
|
1382
|
+
# RPC-specific configuration for `list_address_groups`
|
|
1383
|
+
# @return [::Gapic::Config::Method]
|
|
1384
|
+
#
|
|
1385
|
+
attr_reader :list_address_groups
|
|
1386
|
+
##
|
|
1387
|
+
# RPC-specific configuration for `get_address_group`
|
|
1388
|
+
# @return [::Gapic::Config::Method]
|
|
1389
|
+
#
|
|
1390
|
+
attr_reader :get_address_group
|
|
1391
|
+
##
|
|
1392
|
+
# RPC-specific configuration for `create_address_group`
|
|
1393
|
+
# @return [::Gapic::Config::Method]
|
|
1394
|
+
#
|
|
1395
|
+
attr_reader :create_address_group
|
|
1396
|
+
##
|
|
1397
|
+
# RPC-specific configuration for `update_address_group`
|
|
1398
|
+
# @return [::Gapic::Config::Method]
|
|
1399
|
+
#
|
|
1400
|
+
attr_reader :update_address_group
|
|
1401
|
+
##
|
|
1402
|
+
# RPC-specific configuration for `add_address_group_items`
|
|
1403
|
+
# @return [::Gapic::Config::Method]
|
|
1404
|
+
#
|
|
1405
|
+
attr_reader :add_address_group_items
|
|
1406
|
+
##
|
|
1407
|
+
# RPC-specific configuration for `remove_address_group_items`
|
|
1408
|
+
# @return [::Gapic::Config::Method]
|
|
1409
|
+
#
|
|
1410
|
+
attr_reader :remove_address_group_items
|
|
1411
|
+
##
|
|
1412
|
+
# RPC-specific configuration for `clone_address_group_items`
|
|
1413
|
+
# @return [::Gapic::Config::Method]
|
|
1414
|
+
#
|
|
1415
|
+
attr_reader :clone_address_group_items
|
|
1416
|
+
##
|
|
1417
|
+
# RPC-specific configuration for `delete_address_group`
|
|
1418
|
+
# @return [::Gapic::Config::Method]
|
|
1419
|
+
#
|
|
1420
|
+
attr_reader :delete_address_group
|
|
1421
|
+
##
|
|
1422
|
+
# RPC-specific configuration for `list_address_group_references`
|
|
1423
|
+
# @return [::Gapic::Config::Method]
|
|
1424
|
+
#
|
|
1425
|
+
attr_reader :list_address_group_references
|
|
1426
|
+
|
|
1427
|
+
# @private
|
|
1428
|
+
def initialize parent_rpcs = nil
|
|
1429
|
+
list_address_groups_config = parent_rpcs.list_address_groups if parent_rpcs.respond_to? :list_address_groups
|
|
1430
|
+
@list_address_groups = ::Gapic::Config::Method.new list_address_groups_config
|
|
1431
|
+
get_address_group_config = parent_rpcs.get_address_group if parent_rpcs.respond_to? :get_address_group
|
|
1432
|
+
@get_address_group = ::Gapic::Config::Method.new get_address_group_config
|
|
1433
|
+
create_address_group_config = parent_rpcs.create_address_group if parent_rpcs.respond_to? :create_address_group
|
|
1434
|
+
@create_address_group = ::Gapic::Config::Method.new create_address_group_config
|
|
1435
|
+
update_address_group_config = parent_rpcs.update_address_group if parent_rpcs.respond_to? :update_address_group
|
|
1436
|
+
@update_address_group = ::Gapic::Config::Method.new update_address_group_config
|
|
1437
|
+
add_address_group_items_config = parent_rpcs.add_address_group_items if parent_rpcs.respond_to? :add_address_group_items
|
|
1438
|
+
@add_address_group_items = ::Gapic::Config::Method.new add_address_group_items_config
|
|
1439
|
+
remove_address_group_items_config = parent_rpcs.remove_address_group_items if parent_rpcs.respond_to? :remove_address_group_items
|
|
1440
|
+
@remove_address_group_items = ::Gapic::Config::Method.new remove_address_group_items_config
|
|
1441
|
+
clone_address_group_items_config = parent_rpcs.clone_address_group_items if parent_rpcs.respond_to? :clone_address_group_items
|
|
1442
|
+
@clone_address_group_items = ::Gapic::Config::Method.new clone_address_group_items_config
|
|
1443
|
+
delete_address_group_config = parent_rpcs.delete_address_group if parent_rpcs.respond_to? :delete_address_group
|
|
1444
|
+
@delete_address_group = ::Gapic::Config::Method.new delete_address_group_config
|
|
1445
|
+
list_address_group_references_config = parent_rpcs.list_address_group_references if parent_rpcs.respond_to? :list_address_group_references
|
|
1446
|
+
@list_address_group_references = ::Gapic::Config::Method.new list_address_group_references_config
|
|
1447
|
+
|
|
1448
|
+
yield self if block_given?
|
|
1449
|
+
end
|
|
1450
|
+
end
|
|
1451
|
+
end
|
|
1452
|
+
end
|
|
1453
|
+
end
|
|
1454
|
+
end
|
|
1455
|
+
end
|
|
1456
|
+
end
|
|
1457
|
+
end
|