google-cloud-binary_authorization-v1beta1 0.3.2 → 0.4.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.
@@ -44,15 +44,34 @@ module Google
44
44
  ##
45
45
  # Create a fully-qualified Policy resource string.
46
46
  #
47
- # The resource will be in the following format:
47
+ # @overload policy_path(project:)
48
+ # The resource will be in the following format:
48
49
  #
49
- # `projects/{project}/policy`
50
+ # `projects/{project}/policy`
50
51
  #
51
- # @param project [String]
52
+ # @param project [String]
53
+ #
54
+ # @overload policy_path(location:)
55
+ # The resource will be in the following format:
56
+ #
57
+ # `locations/{location}/policy`
58
+ #
59
+ # @param location [String]
52
60
  #
53
61
  # @return [::String]
54
- def policy_path project:
55
- "projects/#{project}/policy"
62
+ def policy_path **args
63
+ resources = {
64
+ "project" => (proc do |project:|
65
+ "projects/#{project}/policy"
66
+ end),
67
+ "location" => (proc do |location:|
68
+ "locations/#{location}/policy"
69
+ end)
70
+ }
71
+
72
+ resource = resources[args.keys.sort.join(":")]
73
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
74
+ resource.call(**args)
56
75
  end
57
76
 
58
77
  ##
@@ -0,0 +1,388 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/binaryauthorization/v1beta1/service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module BinaryAuthorization
25
+ module V1beta1
26
+ module SystemPolicy
27
+ ##
28
+ # Client for the SystemPolicy service.
29
+ #
30
+ # API for working with the system policy.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :system_policy_stub
37
+
38
+ ##
39
+ # Configure the SystemPolicy Client class.
40
+ #
41
+ # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all SystemPolicy clients
47
+ # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # Configure the SystemPolicy Client instance.
75
+ #
76
+ # The configuration is set to the derived mode, meaning that values can be changed,
77
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
78
+ # should be made on {Client.configure}.
79
+ #
80
+ # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration}
81
+ # for a description of the configuration fields.
82
+ #
83
+ # @yield [config] Configure the Client client.
84
+ # @yieldparam config [Client::Configuration]
85
+ #
86
+ # @return [Client::Configuration]
87
+ #
88
+ def configure
89
+ yield @config if block_given?
90
+ @config
91
+ end
92
+
93
+ ##
94
+ # Create a new SystemPolicy client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the SystemPolicy client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # These require statements are intentionally placed here to initialize
111
+ # the gRPC module only when it's required.
112
+ # See https://github.com/googleapis/toolkit/issues/446
113
+ require "gapic/grpc"
114
+ require "google/cloud/binaryauthorization/v1beta1/service_services_pb"
115
+
116
+ # Create the configuration object
117
+ @config = Configuration.new Client.configure
118
+
119
+ # Yield the configuration if needed
120
+ yield @config if block_given?
121
+
122
+ # Create credentials
123
+ credentials = @config.credentials
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
125
+ # but only if the default endpoint does not have a region prefix.
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
127
+ !@config.endpoint.split(".").first.include?("-")
128
+ credentials ||= Credentials.default scope: @config.scope,
129
+ enable_self_signed_jwt: enable_self_signed_jwt
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
131
+ credentials = Credentials.new credentials, scope: @config.scope
132
+ end
133
+ @quota_project_id = @config.quota_project
134
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
+
136
+ @system_policy_stub = ::Gapic::ServiceStub.new(
137
+ ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicyV1Beta1::Stub,
138
+ credentials: credentials,
139
+ endpoint: @config.endpoint,
140
+ channel_args: @config.channel_args,
141
+ interceptors: @config.interceptors
142
+ )
143
+ end
144
+
145
+ # Service calls
146
+
147
+ ##
148
+ # Gets the current system policy in the specified location.
149
+ #
150
+ # @overload get_system_policy(request, options = nil)
151
+ # Pass arguments to `get_system_policy` via a request object, either of type
152
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash.
153
+ #
154
+ # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Hash]
155
+ # A request object representing the call parameters. Required. To specify no
156
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
157
+ # @param options [::Gapic::CallOptions, ::Hash]
158
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
159
+ #
160
+ # @overload get_system_policy(name: nil)
161
+ # Pass arguments to `get_system_policy` via keyword arguments. Note that at
162
+ # least one keyword argument is required. To specify no parameters, or to keep all
163
+ # the default parameter values, pass an empty Hash as a request object (see above).
164
+ #
165
+ # @param name [::String]
166
+ # Required. The resource name, in the format `locations/*/policy`.
167
+ # Note that the system policy is not associated with a project.
168
+ #
169
+ # @yield [response, operation] Access the result along with the RPC operation
170
+ # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy]
171
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
172
+ #
173
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy]
174
+ #
175
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
176
+ #
177
+ # @example Basic example
178
+ # require "google/cloud/binary_authorization/v1beta1"
179
+ #
180
+ # # Create a client object. The client can be reused for multiple calls.
181
+ # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new
182
+ #
183
+ # # Create a request. To set request fields, pass in keyword arguments.
184
+ # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new
185
+ #
186
+ # # Call the get_system_policy method.
187
+ # result = client.get_system_policy request
188
+ #
189
+ # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy.
190
+ # p result
191
+ #
192
+ def get_system_policy request, options = nil
193
+ raise ::ArgumentError, "request must be provided" if request.nil?
194
+
195
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest
196
+
197
+ # Converts hash and nil to an options object
198
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
199
+
200
+ # Customize the options with defaults
201
+ metadata = @config.rpcs.get_system_policy.metadata.to_h
202
+
203
+ # Set x-goog-api-client and x-goog-user-project headers
204
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
205
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
206
+ gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION
207
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
+
209
+ header_params = {}
210
+ if request.name
211
+ header_params["name"] = request.name
212
+ end
213
+
214
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
215
+ metadata[:"x-goog-request-params"] ||= request_params_header
216
+
217
+ options.apply_defaults timeout: @config.rpcs.get_system_policy.timeout,
218
+ metadata: metadata,
219
+ retry_policy: @config.rpcs.get_system_policy.retry_policy
220
+
221
+ options.apply_defaults timeout: @config.timeout,
222
+ metadata: @config.metadata,
223
+ retry_policy: @config.retry_policy
224
+
225
+ @system_policy_stub.call_rpc :get_system_policy, request, options: options do |response, operation|
226
+ yield response, operation if block_given?
227
+ return response
228
+ end
229
+ rescue ::GRPC::BadStatus => e
230
+ raise ::Google::Cloud::Error.from_error(e)
231
+ end
232
+
233
+ ##
234
+ # Configuration class for the SystemPolicy API.
235
+ #
236
+ # This class represents the configuration for SystemPolicy,
237
+ # providing control over timeouts, retry behavior, logging, transport
238
+ # parameters, and other low-level controls. Certain parameters can also be
239
+ # applied individually to specific RPCs. See
240
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration::Rpcs}
241
+ # for a list of RPCs that can be configured independently.
242
+ #
243
+ # Configuration can be applied globally to all clients, or to a single client
244
+ # on construction.
245
+ #
246
+ # @example
247
+ #
248
+ # # Modify the global config, setting the timeout for
249
+ # # get_system_policy to 20 seconds,
250
+ # # and all remaining timeouts to 10 seconds.
251
+ # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config|
252
+ # config.timeout = 10.0
253
+ # config.rpcs.get_system_policy.timeout = 20.0
254
+ # end
255
+ #
256
+ # # Apply the above configuration only to a new client.
257
+ # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config|
258
+ # config.timeout = 10.0
259
+ # config.rpcs.get_system_policy.timeout = 20.0
260
+ # end
261
+ #
262
+ # @!attribute [rw] endpoint
263
+ # The hostname or hostname:port of the service endpoint.
264
+ # Defaults to `"binaryauthorization.googleapis.com"`.
265
+ # @return [::String]
266
+ # @!attribute [rw] credentials
267
+ # Credentials to send with calls. You may provide any of the following types:
268
+ # * (`String`) The path to a service account key file in JSON format
269
+ # * (`Hash`) A service account key as a Hash
270
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
271
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
272
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
273
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
274
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
275
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
276
+ # * (`nil`) indicating no credentials
277
+ # @return [::Object]
278
+ # @!attribute [rw] scope
279
+ # The OAuth scopes
280
+ # @return [::Array<::String>]
281
+ # @!attribute [rw] lib_name
282
+ # The library name as recorded in instrumentation and logging
283
+ # @return [::String]
284
+ # @!attribute [rw] lib_version
285
+ # The library version as recorded in instrumentation and logging
286
+ # @return [::String]
287
+ # @!attribute [rw] channel_args
288
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
289
+ # `GRPC::Core::Channel` object is provided as the credential.
290
+ # @return [::Hash]
291
+ # @!attribute [rw] interceptors
292
+ # An array of interceptors that are run before calls are executed.
293
+ # @return [::Array<::GRPC::ClientInterceptor>]
294
+ # @!attribute [rw] timeout
295
+ # The call timeout in seconds.
296
+ # @return [::Numeric]
297
+ # @!attribute [rw] metadata
298
+ # Additional gRPC headers to be sent with the call.
299
+ # @return [::Hash{::Symbol=>::String}]
300
+ # @!attribute [rw] retry_policy
301
+ # The retry policy. The value is a hash with the following keys:
302
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
303
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
304
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
305
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
306
+ # trigger a retry.
307
+ # @return [::Hash]
308
+ # @!attribute [rw] quota_project
309
+ # A separate project against which to charge quota.
310
+ # @return [::String]
311
+ #
312
+ class Configuration
313
+ extend ::Gapic::Config
314
+
315
+ config_attr :endpoint, "binaryauthorization.googleapis.com", ::String
316
+ config_attr :credentials, nil do |value|
317
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
318
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
319
+ allowed.any? { |klass| klass === value }
320
+ end
321
+ config_attr :scope, nil, ::String, ::Array, nil
322
+ config_attr :lib_name, nil, ::String, nil
323
+ config_attr :lib_version, nil, ::String, nil
324
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
325
+ config_attr :interceptors, nil, ::Array, nil
326
+ config_attr :timeout, nil, ::Numeric, nil
327
+ config_attr :metadata, nil, ::Hash, nil
328
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
329
+ config_attr :quota_project, nil, ::String, nil
330
+
331
+ # @private
332
+ def initialize parent_config = nil
333
+ @parent_config = parent_config unless parent_config.nil?
334
+
335
+ yield self if block_given?
336
+ end
337
+
338
+ ##
339
+ # Configurations for individual RPCs
340
+ # @return [Rpcs]
341
+ #
342
+ def rpcs
343
+ @rpcs ||= begin
344
+ parent_rpcs = nil
345
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
346
+ Rpcs.new parent_rpcs
347
+ end
348
+ end
349
+
350
+ ##
351
+ # Configuration RPC class for the SystemPolicy API.
352
+ #
353
+ # Includes fields providing the configuration for each RPC in this service.
354
+ # Each configuration object is of type `Gapic::Config::Method` and includes
355
+ # the following configuration fields:
356
+ #
357
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
358
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
359
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
360
+ # include the following keys:
361
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
362
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
363
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
364
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
365
+ # trigger a retry.
366
+ #
367
+ class Rpcs
368
+ ##
369
+ # RPC-specific configuration for `get_system_policy`
370
+ # @return [::Gapic::Config::Method]
371
+ #
372
+ attr_reader :get_system_policy
373
+
374
+ # @private
375
+ def initialize parent_rpcs = nil
376
+ get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy
377
+ @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config
378
+
379
+ yield self if block_given?
380
+ end
381
+ end
382
+ end
383
+ end
384
+ end
385
+ end
386
+ end
387
+ end
388
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module BinaryAuthorization
24
+ module V1beta1
25
+ module SystemPolicy
26
+ # Credentials for the SystemPolicy API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "BINARY_AUTHORIZATION_CREDENTIALS",
33
+ "BINARY_AUTHORIZATION_KEYFILE",
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "BINARY_AUTHORIZATION_CREDENTIALS_JSON",
38
+ "BINARY_AUTHORIZATION_KEYFILE_JSON",
39
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
+ "GOOGLE_CLOUD_KEYFILE_JSON",
41
+ "GCLOUD_KEYFILE_JSON"
42
+ ]
43
+ self.paths = [
44
+ "~/.config/google_cloud/application_default_credentials.json"
45
+ ]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Cloud
22
+ module BinaryAuthorization
23
+ module V1beta1
24
+ module SystemPolicy
25
+ # Path helper methods for the SystemPolicy API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Policy resource string.
29
+ #
30
+ # @overload policy_path(project:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/policy`
34
+ #
35
+ # @param project [String]
36
+ #
37
+ # @overload policy_path(location:)
38
+ # The resource will be in the following format:
39
+ #
40
+ # `locations/{location}/policy`
41
+ #
42
+ # @param location [String]
43
+ #
44
+ # @return [::String]
45
+ def policy_path **args
46
+ resources = {
47
+ "project" => (proc do |project:|
48
+ "projects/#{project}/policy"
49
+ end),
50
+ "location" => (proc do |location:|
51
+ "locations/#{location}/policy"
52
+ end)
53
+ }
54
+
55
+ resource = resources[args.keys.sort.join(":")]
56
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
57
+ resource.call(**args)
58
+ end
59
+
60
+ extend self
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/binary_authorization/v1beta1/version"
24
+
25
+ require "google/cloud/binary_authorization/v1beta1/system_policy/credentials"
26
+ require "google/cloud/binary_authorization/v1beta1/system_policy/paths"
27
+ require "google/cloud/binary_authorization/v1beta1/system_policy/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module BinaryAuthorization
32
+ module V1beta1
33
+ ##
34
+ # API for working with the system policy.
35
+ #
36
+ # To load this service and instantiate a client:
37
+ #
38
+ # require "google/cloud/binary_authorization/v1beta1/system_policy"
39
+ # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new
40
+ #
41
+ module SystemPolicy
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ helper_path = ::File.join __dir__, "system_policy", "helpers.rb"
49
+ require "google/cloud/binary_authorization/v1beta1/system_policy/helpers" if ::File.file? helper_path
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module BinaryAuthorization
23
23
  module V1beta1
24
- VERSION = "0.3.2"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/binary_authorization/v1beta1/binauthz_management_service"
20
+ require "google/cloud/binary_authorization/v1beta1/system_policy"
20
21
  require "google/cloud/binary_authorization/v1beta1/version"
21
22
 
22
23
  module Google
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto
3
3
 
4
+ require 'google/protobuf/timestamp_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/protobuf/timestamp_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto", :syntax => :proto3) do
9
9
  add_message "google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/binaryauthorization/v1beta1/resources.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
- require 'google/api/annotations_pb'
7
4
  require 'google/api/field_behavior_pb'
8
5
  require 'google/api/resource_pb'
9
6
  require 'google/protobuf/timestamp_pb'
7
+ require 'google/api/annotations_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/cloud/binaryauthorization/v1beta1/resources.proto", :syntax => :proto3) do
12
12
  add_message "google.cloud.binaryauthorization.v1beta1.Policy" do
@@ -15,6 +15,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  optional :global_policy_evaluation_mode, :enum, 7, "google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode"
16
16
  repeated :admission_whitelist_patterns, :message, 2, "google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern"
17
17
  map :cluster_admission_rules, :string, :message, 3, "google.cloud.binaryauthorization.v1beta1.AdmissionRule"
18
+ map :kubernetes_namespace_admission_rules, :string, :message, 10, "google.cloud.binaryauthorization.v1beta1.AdmissionRule"
19
+ map :kubernetes_service_account_admission_rules, :string, :message, 8, "google.cloud.binaryauthorization.v1beta1.AdmissionRule"
20
+ map :istio_service_identity_admission_rules, :string, :message, 9, "google.cloud.binaryauthorization.v1beta1.AdmissionRule"
18
21
  optional :default_admission_rule, :message, 4, "google.cloud.binaryauthorization.v1beta1.AdmissionRule"
19
22
  optional :update_time, :message, 5, "google.protobuf.Timestamp"
20
23
  end
@@ -70,8 +73,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
70
73
  value :RSA_SIGN_PKCS1_4096_SHA256, 7
71
74
  value :RSA_SIGN_PKCS1_4096_SHA512, 8
72
75
  value :ECDSA_P256_SHA256, 9
76
+ value :EC_SIGN_P256_SHA256, 9
73
77
  value :ECDSA_P384_SHA384, 10
78
+ value :EC_SIGN_P384_SHA384, 10
74
79
  value :ECDSA_P521_SHA512, 11
80
+ value :EC_SIGN_P521_SHA512, 11
75
81
  end
76
82
  add_message "google.cloud.binaryauthorization.v1beta1.AttestorPublicKey" do
77
83
  optional :comment, :string, 1