google-cloud-network_security-v1beta1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfa3eac5e9f90efe418e181b35a16ca8a7b70cfe14d56d57386bd4f65219707c
4
- data.tar.gz: 4f3e6f9bab137a10135df5ec1eff7f8c2d7e332af73967f1c1f8fa9ded2d3e17
3
+ metadata.gz: 1f115238b504c1926a7bf623a6b0b341e1e8bc8e26801f6029eceeb886814200
4
+ data.tar.gz: 57e2037c9a8c7444f3b77d566b8a39ffc745569e58abd73f93bb689fca152d4e
5
5
  SHA512:
6
- metadata.gz: 557895ed41b9149bf3b86b963d6dbddac44349a5837d74cb87982198fb50a1d93ce43e384c209675e43ac8030c33c3a04d2d0c987080914038e633d51797d3ce
7
- data.tar.gz: ad40882e4497f9a735a1352850c015f22f639d46c00a95283cfc156a1566a8e43bf953b211d5a083c6c2392e30c27acec6771e7bfc36c2cb26a0465b4d3b3420
6
+ metadata.gz: a080627d2a0e1f89ee15793046d8e49c190d768e1e4d0b86e72bc8a457e57928fff45cd7f271fb20994b4927e4f477c11cdd4d2aef5d8ef465c0485204fa2fcb
7
+ data.tar.gz: 80bed47092f5d0a5574c20107b71967dd8559a4f784cf8b898765bdf23e4d87039feb43e475fcf458d47bea93e86b881c654bb06637837ff4e7b01e83a0c652a
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,183 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module NetworkSecurity
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/network_security/v1beta1/rest"
28
+ # client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.new
29
+ #
30
+ module V1beta1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "NetworkSecurity"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1beta1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1beta1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ ),
77
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
78
+ uri_method: :get,
79
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
80
+ matches: [
81
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+/?$}, false]
82
+ ],
83
+ body: nil
84
+ ),
85
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
86
+ uri_method: :get,
87
+ uri_template: "/v1beta1/{resource}:getIamPolicy",
88
+ matches: [
89
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+/?$}, false]
90
+ ],
91
+ body: nil
92
+ )
93
+ ]
94
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
95
+
96
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
97
+ uri_method: :post,
98
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
99
+ matches: [
100
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+/?$}, false]
101
+ ],
102
+ body: "*"
103
+ ),
104
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
105
+ uri_method: :post,
106
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
107
+ matches: [
108
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+/?$}, false]
109
+ ],
110
+ body: "*"
111
+ ),
112
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
113
+ uri_method: :post,
114
+ uri_template: "/v1beta1/{resource}:setIamPolicy",
115
+ matches: [
116
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+/?$}, false]
117
+ ],
118
+ body: "*"
119
+ )
120
+ ]
121
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
122
+
123
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
124
+ uri_method: :post,
125
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
126
+ matches: [
127
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+/?$}, false]
128
+ ],
129
+ body: "*"
130
+ ),
131
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
132
+ uri_method: :post,
133
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
134
+ matches: [
135
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+/?$}, false]
136
+ ],
137
+ body: "*"
138
+ ),
139
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
140
+ uri_method: :post,
141
+ uri_template: "/v1beta1/{resource}:testIamPermissions",
142
+ matches: [
143
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+/?$}, false]
144
+ ],
145
+ body: "*"
146
+ )
147
+ ]
148
+ default_config
149
+ end
150
+ yield @configure if block_given?
151
+ @configure
152
+ end
153
+
154
+ ##
155
+ # @private
156
+ # Configuration class for the google.cloud.networksecurity.v1beta1 package.
157
+ #
158
+ # This class contains common configuration for all services
159
+ # of the google.cloud.networksecurity.v1beta1 package.
160
+ #
161
+ # This configuration is for internal use of the client library classes,
162
+ # and it is not intended that the end-users will read or change it.
163
+ #
164
+ class Configuration
165
+ extend ::Gapic::Config
166
+
167
+ # @private
168
+ # Overrides for http bindings for the RPC of the mixins for this package.
169
+ # Services in this package should use these when creating clients for the mixin services.
170
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
171
+ config_attr :bindings_override, {}, ::Hash, nil
172
+
173
+ # @private
174
+ def initialize parent_config = nil
175
+ @parent_config = parent_config unless parent_config.nil?
176
+
177
+ yield self if block_given?
178
+ end
179
+ end
180
+ end
181
+ end
182
+ end
183
+ end
@@ -239,13 +239,11 @@ module Google
239
239
  # # Call the list_authorization_policies method.
240
240
  # result = client.list_authorization_policies request
241
241
  #
242
- # # The returned object is of type Gapic::PagedEnumerable. You can
243
- # # iterate over all elements by calling #each, and the enumerable
244
- # # will lazily make API calls to fetch subsequent pages. Other
245
- # # methods are also available for managing paging directly.
246
- # result.each do |response|
242
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
243
+ # # over elements, and API calls will be issued to fetch pages as needed.
244
+ # result.each do |item|
247
245
  # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy.
248
- # p response
246
+ # p item
249
247
  # end
250
248
  #
251
249
  def list_authorization_policies request, options = nil
@@ -425,14 +423,14 @@ module Google
425
423
  # # Call the create_authorization_policy method.
426
424
  # result = client.create_authorization_policy request
427
425
  #
428
- # # The returned object is of type Gapic::Operation. You can use this
429
- # # object to check the status of an operation, cancel it, or wait
430
- # # for results. Here is how to block until completion:
426
+ # # The returned object is of type Gapic::Operation. You can use it to
427
+ # # check the status of an operation, cancel it, or wait for results.
428
+ # # Here is how to wait for a response.
431
429
  # result.wait_until_done! timeout: 60
432
430
  # if result.response?
433
431
  # p result.response
434
432
  # else
435
- # puts "Error!"
433
+ # puts "No response received."
436
434
  # end
437
435
  #
438
436
  def create_authorization_policy request, options = nil
@@ -524,14 +522,14 @@ module Google
524
522
  # # Call the update_authorization_policy method.
525
523
  # result = client.update_authorization_policy request
526
524
  #
527
- # # The returned object is of type Gapic::Operation. You can use this
528
- # # object to check the status of an operation, cancel it, or wait
529
- # # for results. Here is how to block until completion:
525
+ # # The returned object is of type Gapic::Operation. You can use it to
526
+ # # check the status of an operation, cancel it, or wait for results.
527
+ # # Here is how to wait for a response.
530
528
  # result.wait_until_done! timeout: 60
531
529
  # if result.response?
532
530
  # p result.response
533
531
  # else
534
- # puts "Error!"
532
+ # puts "No response received."
535
533
  # end
536
534
  #
537
535
  def update_authorization_policy request, options = nil
@@ -618,14 +616,14 @@ module Google
618
616
  # # Call the delete_authorization_policy method.
619
617
  # result = client.delete_authorization_policy request
620
618
  #
621
- # # The returned object is of type Gapic::Operation. You can use this
622
- # # object to check the status of an operation, cancel it, or wait
623
- # # for results. Here is how to block until completion:
619
+ # # The returned object is of type Gapic::Operation. You can use it to
620
+ # # check the status of an operation, cancel it, or wait for results.
621
+ # # Here is how to wait for a response.
624
622
  # result.wait_until_done! timeout: 60
625
623
  # if result.response?
626
624
  # p result.response
627
625
  # else
628
- # puts "Error!"
626
+ # puts "No response received."
629
627
  # end
630
628
  #
631
629
  def delete_authorization_policy request, options = nil
@@ -719,13 +717,11 @@ module Google
719
717
  # # Call the list_server_tls_policies method.
720
718
  # result = client.list_server_tls_policies request
721
719
  #
722
- # # The returned object is of type Gapic::PagedEnumerable. You can
723
- # # iterate over all elements by calling #each, and the enumerable
724
- # # will lazily make API calls to fetch subsequent pages. Other
725
- # # methods are also available for managing paging directly.
726
- # result.each do |response|
720
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
721
+ # # over elements, and API calls will be issued to fetch pages as needed.
722
+ # result.each do |item|
727
723
  # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy.
728
- # p response
724
+ # p item
729
725
  # end
730
726
  #
731
727
  def list_server_tls_policies request, options = nil
@@ -905,14 +901,14 @@ module Google
905
901
  # # Call the create_server_tls_policy method.
906
902
  # result = client.create_server_tls_policy request
907
903
  #
908
- # # The returned object is of type Gapic::Operation. You can use this
909
- # # object to check the status of an operation, cancel it, or wait
910
- # # for results. Here is how to block until completion:
904
+ # # The returned object is of type Gapic::Operation. You can use it to
905
+ # # check the status of an operation, cancel it, or wait for results.
906
+ # # Here is how to wait for a response.
911
907
  # result.wait_until_done! timeout: 60
912
908
  # if result.response?
913
909
  # p result.response
914
910
  # else
915
- # puts "Error!"
911
+ # puts "No response received."
916
912
  # end
917
913
  #
918
914
  def create_server_tls_policy request, options = nil
@@ -1005,14 +1001,14 @@ module Google
1005
1001
  # # Call the update_server_tls_policy method.
1006
1002
  # result = client.update_server_tls_policy request
1007
1003
  #
1008
- # # The returned object is of type Gapic::Operation. You can use this
1009
- # # object to check the status of an operation, cancel it, or wait
1010
- # # for results. Here is how to block until completion:
1004
+ # # The returned object is of type Gapic::Operation. You can use it to
1005
+ # # check the status of an operation, cancel it, or wait for results.
1006
+ # # Here is how to wait for a response.
1011
1007
  # result.wait_until_done! timeout: 60
1012
1008
  # if result.response?
1013
1009
  # p result.response
1014
1010
  # else
1015
- # puts "Error!"
1011
+ # puts "No response received."
1016
1012
  # end
1017
1013
  #
1018
1014
  def update_server_tls_policy request, options = nil
@@ -1099,14 +1095,14 @@ module Google
1099
1095
  # # Call the delete_server_tls_policy method.
1100
1096
  # result = client.delete_server_tls_policy request
1101
1097
  #
1102
- # # The returned object is of type Gapic::Operation. You can use this
1103
- # # object to check the status of an operation, cancel it, or wait
1104
- # # for results. Here is how to block until completion:
1098
+ # # The returned object is of type Gapic::Operation. You can use it to
1099
+ # # check the status of an operation, cancel it, or wait for results.
1100
+ # # Here is how to wait for a response.
1105
1101
  # result.wait_until_done! timeout: 60
1106
1102
  # if result.response?
1107
1103
  # p result.response
1108
1104
  # else
1109
- # puts "Error!"
1105
+ # puts "No response received."
1110
1106
  # end
1111
1107
  #
1112
1108
  def delete_server_tls_policy request, options = nil
@@ -1200,13 +1196,11 @@ module Google
1200
1196
  # # Call the list_client_tls_policies method.
1201
1197
  # result = client.list_client_tls_policies request
1202
1198
  #
1203
- # # The returned object is of type Gapic::PagedEnumerable. You can
1204
- # # iterate over all elements by calling #each, and the enumerable
1205
- # # will lazily make API calls to fetch subsequent pages. Other
1206
- # # methods are also available for managing paging directly.
1207
- # result.each do |response|
1199
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1200
+ # # over elements, and API calls will be issued to fetch pages as needed.
1201
+ # result.each do |item|
1208
1202
  # # Each element is of type ::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy.
1209
- # p response
1203
+ # p item
1210
1204
  # end
1211
1205
  #
1212
1206
  def list_client_tls_policies request, options = nil
@@ -1386,14 +1380,14 @@ module Google
1386
1380
  # # Call the create_client_tls_policy method.
1387
1381
  # result = client.create_client_tls_policy request
1388
1382
  #
1389
- # # The returned object is of type Gapic::Operation. You can use this
1390
- # # object to check the status of an operation, cancel it, or wait
1391
- # # for results. Here is how to block until completion:
1383
+ # # The returned object is of type Gapic::Operation. You can use it to
1384
+ # # check the status of an operation, cancel it, or wait for results.
1385
+ # # Here is how to wait for a response.
1392
1386
  # result.wait_until_done! timeout: 60
1393
1387
  # if result.response?
1394
1388
  # p result.response
1395
1389
  # else
1396
- # puts "Error!"
1390
+ # puts "No response received."
1397
1391
  # end
1398
1392
  #
1399
1393
  def create_client_tls_policy request, options = nil
@@ -1486,14 +1480,14 @@ module Google
1486
1480
  # # Call the update_client_tls_policy method.
1487
1481
  # result = client.update_client_tls_policy request
1488
1482
  #
1489
- # # The returned object is of type Gapic::Operation. You can use this
1490
- # # object to check the status of an operation, cancel it, or wait
1491
- # # for results. Here is how to block until completion:
1483
+ # # The returned object is of type Gapic::Operation. You can use it to
1484
+ # # check the status of an operation, cancel it, or wait for results.
1485
+ # # Here is how to wait for a response.
1492
1486
  # result.wait_until_done! timeout: 60
1493
1487
  # if result.response?
1494
1488
  # p result.response
1495
1489
  # else
1496
- # puts "Error!"
1490
+ # puts "No response received."
1497
1491
  # end
1498
1492
  #
1499
1493
  def update_client_tls_policy request, options = nil
@@ -1580,14 +1574,14 @@ module Google
1580
1574
  # # Call the delete_client_tls_policy method.
1581
1575
  # result = client.delete_client_tls_policy request
1582
1576
  #
1583
- # # The returned object is of type Gapic::Operation. You can use this
1584
- # # object to check the status of an operation, cancel it, or wait
1585
- # # for results. Here is how to block until completion:
1577
+ # # The returned object is of type Gapic::Operation. You can use it to
1578
+ # # check the status of an operation, cancel it, or wait for results.
1579
+ # # Here is how to wait for a response.
1586
1580
  # result.wait_until_done! timeout: 60
1587
1581
  # if result.response?
1588
1582
  # p result.response
1589
1583
  # else
1590
- # puts "Error!"
1584
+ # puts "No response received."
1591
1585
  # end
1592
1586
  #
1593
1587
  def delete_client_tls_policy request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil