google-cloud-network_security-v1beta1 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/network_security/v1beta1/network_security/client.rb +74 -31
- data/lib/google/cloud/network_security/v1beta1/network_security/operations.rb +25 -20
- data/lib/google/cloud/network_security/v1beta1/network_security/rest/client.rb +74 -31
- data/lib/google/cloud/network_security/v1beta1/network_security/rest/operations.rb +54 -42
- data/lib/google/cloud/network_security/v1beta1/network_security/rest/service_stub.rb +134 -92
- data/lib/google/cloud/network_security/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16637bff67e4cbd2d359dc9edac103aab5ecab7593ead546b0689590e138098
|
4
|
+
data.tar.gz: 464f45cba0a25456b06a7a0dbd61234bf338e97963e8b95e6d4dc3a186894dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c6c36c276830f0771821f5376a137b074640d61aef2843f2274b9e8a4ed0cb54e68356f9f6efa78a1698d08918ad92d3c17f96e7f79da18a87212a6cb3c6f4
|
7
|
+
data.tar.gz: b5e97d275c2ab6f82db7eb5820197c764d6bd2af63b43007e0aee24562670f5d615857945dd675c75feafd7d17b1485883138c0d81957188ef7cf04a900466ed
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/traffic-director/docs/reference/network-security/rest/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/network_security/v1beta1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# information.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
37
40
|
# @private
|
38
41
|
DEFAULT_ENDPOINT_TEMPLATE = "networksecurity.$UNIVERSE_DOMAIN$"
|
39
42
|
|
@@ -167,14 +170,26 @@ module Google
|
|
167
170
|
universe_domain: @config.universe_domain,
|
168
171
|
channel_args: @config.channel_args,
|
169
172
|
interceptors: @config.interceptors,
|
170
|
-
channel_pool_config: @config.channel_pool
|
173
|
+
channel_pool_config: @config.channel_pool,
|
174
|
+
logger: @config.logger
|
171
175
|
)
|
172
176
|
|
177
|
+
@network_security_stub.stub_logger&.info do |entry|
|
178
|
+
entry.set_system_name
|
179
|
+
entry.set_service
|
180
|
+
entry.message = "Created client for #{entry.service}"
|
181
|
+
entry.set_credentials_fields credentials
|
182
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
183
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
184
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
185
|
+
end
|
186
|
+
|
173
187
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
174
188
|
config.credentials = credentials
|
175
189
|
config.quota_project = @quota_project_id
|
176
190
|
config.endpoint = @network_security_stub.endpoint
|
177
191
|
config.universe_domain = @network_security_stub.universe_domain
|
192
|
+
config.logger = @network_security_stub.logger if config.respond_to? :logger=
|
178
193
|
end
|
179
194
|
|
180
195
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -182,6 +197,7 @@ module Google
|
|
182
197
|
config.quota_project = @quota_project_id
|
183
198
|
config.endpoint = @network_security_stub.endpoint
|
184
199
|
config.universe_domain = @network_security_stub.universe_domain
|
200
|
+
config.logger = @network_security_stub.logger if config.respond_to? :logger=
|
185
201
|
end
|
186
202
|
end
|
187
203
|
|
@@ -206,6 +222,15 @@ module Google
|
|
206
222
|
#
|
207
223
|
attr_reader :iam_policy_client
|
208
224
|
|
225
|
+
##
|
226
|
+
# The logger used for request/response debug logging.
|
227
|
+
#
|
228
|
+
# @return [Logger]
|
229
|
+
#
|
230
|
+
def logger
|
231
|
+
@network_security_stub.logger
|
232
|
+
end
|
233
|
+
|
209
234
|
# Service calls
|
210
235
|
|
211
236
|
##
|
@@ -276,10 +301,11 @@ module Google
|
|
276
301
|
# Customize the options with defaults
|
277
302
|
metadata = @config.rpcs.list_authorization_policies.metadata.to_h
|
278
303
|
|
279
|
-
# Set x-goog-api-client
|
304
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
280
305
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
281
306
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
282
307
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
308
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
283
309
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
310
|
|
285
311
|
header_params = {}
|
@@ -301,7 +327,7 @@ module Google
|
|
301
327
|
@network_security_stub.call_rpc :list_authorization_policies, request, options: options do |response, operation|
|
302
328
|
response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_authorization_policies, request, response, operation, options
|
303
329
|
yield response, operation if block_given?
|
304
|
-
|
330
|
+
throw :response, response
|
305
331
|
end
|
306
332
|
rescue ::GRPC::BadStatus => e
|
307
333
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -363,10 +389,11 @@ module Google
|
|
363
389
|
# Customize the options with defaults
|
364
390
|
metadata = @config.rpcs.get_authorization_policy.metadata.to_h
|
365
391
|
|
366
|
-
# Set x-goog-api-client
|
392
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
367
393
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
368
394
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
369
395
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
396
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
370
397
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
371
398
|
|
372
399
|
header_params = {}
|
@@ -387,7 +414,6 @@ module Google
|
|
387
414
|
|
388
415
|
@network_security_stub.call_rpc :get_authorization_policy, request, options: options do |response, operation|
|
389
416
|
yield response, operation if block_given?
|
390
|
-
return response
|
391
417
|
end
|
392
418
|
rescue ::GRPC::BadStatus => e
|
393
419
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -463,10 +489,11 @@ module Google
|
|
463
489
|
# Customize the options with defaults
|
464
490
|
metadata = @config.rpcs.create_authorization_policy.metadata.to_h
|
465
491
|
|
466
|
-
# Set x-goog-api-client
|
492
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
467
493
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
468
494
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
469
495
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
496
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
470
497
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
471
498
|
|
472
499
|
header_params = {}
|
@@ -488,7 +515,7 @@ module Google
|
|
488
515
|
@network_security_stub.call_rpc :create_authorization_policy, request, options: options do |response, operation|
|
489
516
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
490
517
|
yield response, operation if block_given?
|
491
|
-
|
518
|
+
throw :response, response
|
492
519
|
end
|
493
520
|
rescue ::GRPC::BadStatus => e
|
494
521
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -562,10 +589,11 @@ module Google
|
|
562
589
|
# Customize the options with defaults
|
563
590
|
metadata = @config.rpcs.update_authorization_policy.metadata.to_h
|
564
591
|
|
565
|
-
# Set x-goog-api-client
|
592
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
566
593
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
567
594
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
568
595
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
596
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
569
597
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
570
598
|
|
571
599
|
header_params = {}
|
@@ -587,7 +615,7 @@ module Google
|
|
587
615
|
@network_security_stub.call_rpc :update_authorization_policy, request, options: options do |response, operation|
|
588
616
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
589
617
|
yield response, operation if block_given?
|
590
|
-
|
618
|
+
throw :response, response
|
591
619
|
end
|
592
620
|
rescue ::GRPC::BadStatus => e
|
593
621
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -656,10 +684,11 @@ module Google
|
|
656
684
|
# Customize the options with defaults
|
657
685
|
metadata = @config.rpcs.delete_authorization_policy.metadata.to_h
|
658
686
|
|
659
|
-
# Set x-goog-api-client
|
687
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
660
688
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
661
689
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
662
690
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
691
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
663
692
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
664
693
|
|
665
694
|
header_params = {}
|
@@ -681,7 +710,7 @@ module Google
|
|
681
710
|
@network_security_stub.call_rpc :delete_authorization_policy, request, options: options do |response, operation|
|
682
711
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
683
712
|
yield response, operation if block_given?
|
684
|
-
|
713
|
+
throw :response, response
|
685
714
|
end
|
686
715
|
rescue ::GRPC::BadStatus => e
|
687
716
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -754,10 +783,11 @@ module Google
|
|
754
783
|
# Customize the options with defaults
|
755
784
|
metadata = @config.rpcs.list_server_tls_policies.metadata.to_h
|
756
785
|
|
757
|
-
# Set x-goog-api-client
|
786
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
758
787
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
759
788
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
760
789
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
790
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
761
791
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
762
792
|
|
763
793
|
header_params = {}
|
@@ -779,7 +809,7 @@ module Google
|
|
779
809
|
@network_security_stub.call_rpc :list_server_tls_policies, request, options: options do |response, operation|
|
780
810
|
response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_server_tls_policies, request, response, operation, options
|
781
811
|
yield response, operation if block_given?
|
782
|
-
|
812
|
+
throw :response, response
|
783
813
|
end
|
784
814
|
rescue ::GRPC::BadStatus => e
|
785
815
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -841,10 +871,11 @@ module Google
|
|
841
871
|
# Customize the options with defaults
|
842
872
|
metadata = @config.rpcs.get_server_tls_policy.metadata.to_h
|
843
873
|
|
844
|
-
# Set x-goog-api-client
|
874
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
845
875
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
846
876
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
847
877
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
878
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
848
879
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
849
880
|
|
850
881
|
header_params = {}
|
@@ -865,7 +896,6 @@ module Google
|
|
865
896
|
|
866
897
|
@network_security_stub.call_rpc :get_server_tls_policy, request, options: options do |response, operation|
|
867
898
|
yield response, operation if block_given?
|
868
|
-
return response
|
869
899
|
end
|
870
900
|
rescue ::GRPC::BadStatus => e
|
871
901
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -941,10 +971,11 @@ module Google
|
|
941
971
|
# Customize the options with defaults
|
942
972
|
metadata = @config.rpcs.create_server_tls_policy.metadata.to_h
|
943
973
|
|
944
|
-
# Set x-goog-api-client
|
974
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
945
975
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
946
976
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
947
977
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
978
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
948
979
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
949
980
|
|
950
981
|
header_params = {}
|
@@ -966,7 +997,7 @@ module Google
|
|
966
997
|
@network_security_stub.call_rpc :create_server_tls_policy, request, options: options do |response, operation|
|
967
998
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
968
999
|
yield response, operation if block_given?
|
969
|
-
|
1000
|
+
throw :response, response
|
970
1001
|
end
|
971
1002
|
rescue ::GRPC::BadStatus => e
|
972
1003
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1041,10 +1072,11 @@ module Google
|
|
1041
1072
|
# Customize the options with defaults
|
1042
1073
|
metadata = @config.rpcs.update_server_tls_policy.metadata.to_h
|
1043
1074
|
|
1044
|
-
# Set x-goog-api-client
|
1075
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1045
1076
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1046
1077
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1047
1078
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1079
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1048
1080
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1049
1081
|
|
1050
1082
|
header_params = {}
|
@@ -1066,7 +1098,7 @@ module Google
|
|
1066
1098
|
@network_security_stub.call_rpc :update_server_tls_policy, request, options: options do |response, operation|
|
1067
1099
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1068
1100
|
yield response, operation if block_given?
|
1069
|
-
|
1101
|
+
throw :response, response
|
1070
1102
|
end
|
1071
1103
|
rescue ::GRPC::BadStatus => e
|
1072
1104
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1135,10 +1167,11 @@ module Google
|
|
1135
1167
|
# Customize the options with defaults
|
1136
1168
|
metadata = @config.rpcs.delete_server_tls_policy.metadata.to_h
|
1137
1169
|
|
1138
|
-
# Set x-goog-api-client
|
1170
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1139
1171
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1140
1172
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1141
1173
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1174
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1142
1175
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1143
1176
|
|
1144
1177
|
header_params = {}
|
@@ -1160,7 +1193,7 @@ module Google
|
|
1160
1193
|
@network_security_stub.call_rpc :delete_server_tls_policy, request, options: options do |response, operation|
|
1161
1194
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1162
1195
|
yield response, operation if block_given?
|
1163
|
-
|
1196
|
+
throw :response, response
|
1164
1197
|
end
|
1165
1198
|
rescue ::GRPC::BadStatus => e
|
1166
1199
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1233,10 +1266,11 @@ module Google
|
|
1233
1266
|
# Customize the options with defaults
|
1234
1267
|
metadata = @config.rpcs.list_client_tls_policies.metadata.to_h
|
1235
1268
|
|
1236
|
-
# Set x-goog-api-client
|
1269
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1237
1270
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1238
1271
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1239
1272
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1273
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1240
1274
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1241
1275
|
|
1242
1276
|
header_params = {}
|
@@ -1258,7 +1292,7 @@ module Google
|
|
1258
1292
|
@network_security_stub.call_rpc :list_client_tls_policies, request, options: options do |response, operation|
|
1259
1293
|
response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_client_tls_policies, request, response, operation, options
|
1260
1294
|
yield response, operation if block_given?
|
1261
|
-
|
1295
|
+
throw :response, response
|
1262
1296
|
end
|
1263
1297
|
rescue ::GRPC::BadStatus => e
|
1264
1298
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1320,10 +1354,11 @@ module Google
|
|
1320
1354
|
# Customize the options with defaults
|
1321
1355
|
metadata = @config.rpcs.get_client_tls_policy.metadata.to_h
|
1322
1356
|
|
1323
|
-
# Set x-goog-api-client
|
1357
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1324
1358
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1325
1359
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1326
1360
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1361
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1327
1362
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1328
1363
|
|
1329
1364
|
header_params = {}
|
@@ -1344,7 +1379,6 @@ module Google
|
|
1344
1379
|
|
1345
1380
|
@network_security_stub.call_rpc :get_client_tls_policy, request, options: options do |response, operation|
|
1346
1381
|
yield response, operation if block_given?
|
1347
|
-
return response
|
1348
1382
|
end
|
1349
1383
|
rescue ::GRPC::BadStatus => e
|
1350
1384
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1420,10 +1454,11 @@ module Google
|
|
1420
1454
|
# Customize the options with defaults
|
1421
1455
|
metadata = @config.rpcs.create_client_tls_policy.metadata.to_h
|
1422
1456
|
|
1423
|
-
# Set x-goog-api-client
|
1457
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1424
1458
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1425
1459
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1426
1460
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1461
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1427
1462
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1428
1463
|
|
1429
1464
|
header_params = {}
|
@@ -1445,7 +1480,7 @@ module Google
|
|
1445
1480
|
@network_security_stub.call_rpc :create_client_tls_policy, request, options: options do |response, operation|
|
1446
1481
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1447
1482
|
yield response, operation if block_given?
|
1448
|
-
|
1483
|
+
throw :response, response
|
1449
1484
|
end
|
1450
1485
|
rescue ::GRPC::BadStatus => e
|
1451
1486
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1520,10 +1555,11 @@ module Google
|
|
1520
1555
|
# Customize the options with defaults
|
1521
1556
|
metadata = @config.rpcs.update_client_tls_policy.metadata.to_h
|
1522
1557
|
|
1523
|
-
# Set x-goog-api-client
|
1558
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1524
1559
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1525
1560
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1526
1561
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1562
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1527
1563
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1528
1564
|
|
1529
1565
|
header_params = {}
|
@@ -1545,7 +1581,7 @@ module Google
|
|
1545
1581
|
@network_security_stub.call_rpc :update_client_tls_policy, request, options: options do |response, operation|
|
1546
1582
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1547
1583
|
yield response, operation if block_given?
|
1548
|
-
|
1584
|
+
throw :response, response
|
1549
1585
|
end
|
1550
1586
|
rescue ::GRPC::BadStatus => e
|
1551
1587
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1614,10 +1650,11 @@ module Google
|
|
1614
1650
|
# Customize the options with defaults
|
1615
1651
|
metadata = @config.rpcs.delete_client_tls_policy.metadata.to_h
|
1616
1652
|
|
1617
|
-
# Set x-goog-api-client
|
1653
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1618
1654
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1619
1655
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1620
1656
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
1657
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1621
1658
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1622
1659
|
|
1623
1660
|
header_params = {}
|
@@ -1639,7 +1676,7 @@ module Google
|
|
1639
1676
|
@network_security_stub.call_rpc :delete_client_tls_policy, request, options: options do |response, operation|
|
1640
1677
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1641
1678
|
yield response, operation if block_given?
|
1642
|
-
|
1679
|
+
throw :response, response
|
1643
1680
|
end
|
1644
1681
|
rescue ::GRPC::BadStatus => e
|
1645
1682
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1728,6 +1765,11 @@ module Google
|
|
1728
1765
|
# default endpoint URL. The default value of nil uses the environment
|
1729
1766
|
# universe (usually the default "googleapis.com" universe).
|
1730
1767
|
# @return [::String,nil]
|
1768
|
+
# @!attribute [rw] logger
|
1769
|
+
# A custom logger to use for request/response debug logging, or the value
|
1770
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1771
|
+
# explicitly disable logging.
|
1772
|
+
# @return [::Logger,:default,nil]
|
1731
1773
|
#
|
1732
1774
|
class Configuration
|
1733
1775
|
extend ::Gapic::Config
|
@@ -1752,6 +1794,7 @@ module Google
|
|
1752
1794
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1753
1795
|
config_attr :quota_project, nil, ::String, nil
|
1754
1796
|
config_attr :universe_domain, nil, ::String, nil
|
1797
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1755
1798
|
|
1756
1799
|
# @private
|
1757
1800
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module NetworkSecurity
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "networksecurity.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -121,14 +124,6 @@ module Google
|
|
121
124
|
# Lists operations that match the specified filter in the request. If the
|
122
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
123
126
|
#
|
124
|
-
# NOTE: the `name` binding allows API services to override the binding
|
125
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
126
|
-
# override the binding, API services can add a binding such as
|
127
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
128
|
-
# For backwards compatibility, the default name includes the operations
|
129
|
-
# collection id, however overriding users must ensure the name binding
|
130
|
-
# is the parent resource, without the operations collection id.
|
131
|
-
#
|
132
127
|
# @overload list_operations(request, options = nil)
|
133
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
134
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -191,10 +186,11 @@ module Google
|
|
191
186
|
# Customize the options with defaults
|
192
187
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
188
|
|
194
|
-
# Set x-goog-api-client
|
189
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
190
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
191
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
192
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
193
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
194
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
195
|
|
200
196
|
header_params = {}
|
@@ -217,7 +213,7 @@ module Google
|
|
217
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
218
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
219
215
|
yield response, operation if block_given?
|
220
|
-
|
216
|
+
throw :response, response
|
221
217
|
end
|
222
218
|
rescue ::GRPC::BadStatus => e
|
223
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -287,10 +283,11 @@ module Google
|
|
287
283
|
# Customize the options with defaults
|
288
284
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
285
|
|
290
|
-
# Set x-goog-api-client
|
286
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
287
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
288
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
289
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
290
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
291
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
292
|
|
296
293
|
header_params = {}
|
@@ -312,7 +309,7 @@ module Google
|
|
312
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
313
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
314
311
|
yield response, operation if block_given?
|
315
|
-
|
312
|
+
throw :response, response
|
316
313
|
end
|
317
314
|
rescue ::GRPC::BadStatus => e
|
318
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -376,10 +373,11 @@ module Google
|
|
376
373
|
# Customize the options with defaults
|
377
374
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
375
|
|
379
|
-
# Set x-goog-api-client
|
376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
377
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
378
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
379
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
380
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
381
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
382
|
|
385
383
|
header_params = {}
|
@@ -400,7 +398,6 @@ module Google
|
|
400
398
|
|
401
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
402
400
|
yield response, operation if block_given?
|
403
|
-
return response
|
404
401
|
end
|
405
402
|
rescue ::GRPC::BadStatus => e
|
406
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -415,8 +412,9 @@ module Google
|
|
415
412
|
# other methods to check whether the cancellation succeeded or whether the
|
416
413
|
# operation completed despite cancellation. On successful cancellation,
|
417
414
|
# the operation is not deleted; instead, it becomes an operation with
|
418
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
419
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
420
418
|
#
|
421
419
|
# @overload cancel_operation(request, options = nil)
|
422
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -470,10 +468,11 @@ module Google
|
|
470
468
|
# Customize the options with defaults
|
471
469
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
470
|
|
473
|
-
# Set x-goog-api-client
|
471
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
472
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
473
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
474
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
475
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
476
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
477
|
|
479
478
|
header_params = {}
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -574,10 +572,11 @@ module Google
|
|
574
572
|
# Customize the options with defaults
|
575
573
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
574
|
|
577
|
-
# Set x-goog-api-client
|
575
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
576
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
577
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
578
|
gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION
|
579
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
580
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
581
|
|
583
582
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
@@ -591,7 +590,7 @@ module Google
|
|
591
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
592
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
593
592
|
yield response, operation if block_given?
|
594
|
-
|
593
|
+
throw :response, response
|
595
594
|
end
|
596
595
|
rescue ::GRPC::BadStatus => e
|
597
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -680,6 +679,11 @@ module Google
|
|
680
679
|
# default endpoint URL. The default value of nil uses the environment
|
681
680
|
# universe (usually the default "googleapis.com" universe).
|
682
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
683
687
|
#
|
684
688
|
class Configuration
|
685
689
|
extend ::Gapic::Config
|
@@ -704,6 +708,7 @@ module Google
|
|
704
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
705
709
|
config_attr :quota_project, nil, ::String, nil
|
706
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
707
712
|
|
708
713
|
# @private
|
709
714
|
def initialize parent_config = nil
|