google-cloud-binary_authorization-v1 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb +4 -6
  5. data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb +835 -0
  6. data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb +464 -0
  7. data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb +58 -0
  8. data/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb +7 -1
  9. data/lib/google/cloud/binary_authorization/v1/rest.rb +39 -0
  10. data/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb +345 -0
  11. data/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb +107 -0
  12. data/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb +52 -0
  13. data/lib/google/cloud/binary_authorization/v1/system_policy.rb +7 -1
  14. data/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb +356 -0
  15. data/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb +108 -0
  16. data/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb +51 -0
  17. data/lib/google/cloud/binary_authorization/v1/validation_helper.rb +7 -1
  18. data/lib/google/cloud/binary_authorization/v1/version.rb +1 -1
  19. data/lib/google/cloud/binary_authorization/v1.rb +7 -2
  20. data/lib/google/cloud/binaryauthorization/v1/resources_pb.rb +0 -1
  21. data/proto_docs/google/api/client.rb +318 -0
  22. data/proto_docs/google/api/launch_stage.rb +71 -0
  23. data/proto_docs/google/cloud/binaryauthorization/v1/service.rb +2 -2
  24. data/proto_docs/google/protobuf/duration.rb +98 -0
  25. data/proto_docs/google/protobuf/empty.rb +0 -2
  26. metadata +23 -8
@@ -0,0 +1,356 @@
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 "google/cloud/errors"
20
+ require "google/cloud/binaryauthorization/v1/service_pb"
21
+ require "google/cloud/binary_authorization/v1/validation_helper/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module BinaryAuthorization
26
+ module V1
27
+ module ValidationHelper
28
+ module Rest
29
+ ##
30
+ # REST client for the ValidationHelper service.
31
+ #
32
+ # BinAuthz Attestor verification
33
+ #
34
+ class Client
35
+ # @private
36
+ attr_reader :validation_helper_stub
37
+
38
+ ##
39
+ # Configure the ValidationHelper Client class.
40
+ #
41
+ # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all ValidationHelper clients
47
+ # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::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", "V1"]
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 ValidationHelper 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::V1::ValidationHelper::Rest::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 ValidationHelper REST client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the ValidationHelper client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # Create the configuration object
111
+ @config = Configuration.new Client.configure
112
+
113
+ # Yield the configuration if needed
114
+ yield @config if block_given?
115
+
116
+ # Create credentials
117
+ credentials = @config.credentials
118
+ # Use self-signed JWT if the endpoint is unchanged from default,
119
+ # but only if the default endpoint does not have a region prefix.
120
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
121
+ !@config.endpoint.split(".").first.include?("-")
122
+ credentials ||= Credentials.default scope: @config.scope,
123
+ enable_self_signed_jwt: enable_self_signed_jwt
124
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
125
+ credentials = Credentials.new credentials, scope: @config.scope
126
+ end
127
+
128
+ @quota_project_id = @config.quota_project
129
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
130
+
131
+ @validation_helper_stub = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
132
+ end
133
+
134
+ # Service calls
135
+
136
+ ##
137
+ # Returns whether the given Attestation for the given image URI
138
+ # was signed by the given Attestor
139
+ #
140
+ # @overload validate_attestation_occurrence(request, options = nil)
141
+ # Pass arguments to `validate_attestation_occurrence` via a request object, either of type
142
+ # {::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest} or an equivalent Hash.
143
+ #
144
+ # @param request [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash]
145
+ # A request object representing the call parameters. Required. To specify no
146
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
147
+ # @param options [::Gapic::CallOptions, ::Hash]
148
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
149
+ #
150
+ # @overload validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil)
151
+ # Pass arguments to `validate_attestation_occurrence` via keyword arguments. Note that at
152
+ # least one keyword argument is required. To specify no parameters, or to keep all
153
+ # the default parameter values, pass an empty Hash as a request object (see above).
154
+ #
155
+ # @param attestor [::String]
156
+ # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the
157
+ # [occurrence][grafeas.v1.Occurrence], in the format
158
+ # `projects/*/attestors/*`.
159
+ # @param attestation [::Grafeas::V1::AttestationOccurrence, ::Hash]
160
+ # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to
161
+ # be checked that it can be verified by the Attestor. It does not have to be
162
+ # an existing entity in Container Analysis. It must otherwise be a valid
163
+ # AttestationOccurrence.
164
+ # @param occurrence_note [::String]
165
+ # Required. The resource name of the [Note][grafeas.v1.Note] to which the
166
+ # containing [Occurrence][grafeas.v1.Occurrence] is associated.
167
+ # @param occurrence_resource_uri [::String]
168
+ # Required. The URI of the artifact (e.g. container image) that is the
169
+ # subject of the containing [Occurrence][grafeas.v1.Occurrence].
170
+ # @yield [result, operation] Access the result along with the TransportOperation object
171
+ # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse]
172
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
173
+ #
174
+ # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse]
175
+ #
176
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
177
+ def validate_attestation_occurrence request, options = nil
178
+ raise ::ArgumentError, "request must be provided" if request.nil?
179
+
180
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest
181
+
182
+ # Converts hash and nil to an options object
183
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
184
+
185
+ # Customize the options with defaults
186
+ call_metadata = @config.rpcs.validate_attestation_occurrence.metadata.to_h
187
+
188
+ # Set x-goog-api-client and x-goog-user-project headers
189
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
190
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
191
+ gapic_version: ::Google::Cloud::BinaryAuthorization::V1::VERSION,
192
+ transports_version_send: [:rest]
193
+
194
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
195
+
196
+ options.apply_defaults timeout: @config.rpcs.validate_attestation_occurrence.timeout,
197
+ metadata: call_metadata,
198
+ retry_policy: @config.rpcs.validate_attestation_occurrence.retry_policy
199
+
200
+ options.apply_defaults timeout: @config.timeout,
201
+ metadata: @config.metadata,
202
+ retry_policy: @config.retry_policy
203
+
204
+ @validation_helper_stub.validate_attestation_occurrence request, options do |result, operation|
205
+ yield result, operation if block_given?
206
+ return result
207
+ end
208
+ rescue ::Gapic::Rest::Error => e
209
+ raise ::Google::Cloud::Error.from_error(e)
210
+ end
211
+
212
+ ##
213
+ # Configuration class for the ValidationHelper REST API.
214
+ #
215
+ # This class represents the configuration for ValidationHelper REST,
216
+ # providing control over timeouts, retry behavior, logging, transport
217
+ # parameters, and other low-level controls. Certain parameters can also be
218
+ # applied individually to specific RPCs. See
219
+ # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration::Rpcs}
220
+ # for a list of RPCs that can be configured independently.
221
+ #
222
+ # Configuration can be applied globally to all clients, or to a single client
223
+ # on construction.
224
+ #
225
+ # @example
226
+ #
227
+ # # Modify the global config, setting the timeout for
228
+ # # validate_attestation_occurrence to 20 seconds,
229
+ # # and all remaining timeouts to 10 seconds.
230
+ # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.configure do |config|
231
+ # config.timeout = 10.0
232
+ # config.rpcs.validate_attestation_occurrence.timeout = 20.0
233
+ # end
234
+ #
235
+ # # Apply the above configuration only to a new client.
236
+ # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config|
237
+ # config.timeout = 10.0
238
+ # config.rpcs.validate_attestation_occurrence.timeout = 20.0
239
+ # end
240
+ #
241
+ # @!attribute [rw] endpoint
242
+ # The hostname or hostname:port of the service endpoint.
243
+ # Defaults to `"binaryauthorization.googleapis.com"`.
244
+ # @return [::String]
245
+ # @!attribute [rw] credentials
246
+ # Credentials to send with calls. You may provide any of the following types:
247
+ # * (`String`) The path to a service account key file in JSON format
248
+ # * (`Hash`) A service account key as a Hash
249
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
250
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
251
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
252
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
253
+ # * (`nil`) indicating no credentials
254
+ # @return [::Object]
255
+ # @!attribute [rw] scope
256
+ # The OAuth scopes
257
+ # @return [::Array<::String>]
258
+ # @!attribute [rw] lib_name
259
+ # The library name as recorded in instrumentation and logging
260
+ # @return [::String]
261
+ # @!attribute [rw] lib_version
262
+ # The library version as recorded in instrumentation and logging
263
+ # @return [::String]
264
+ # @!attribute [rw] timeout
265
+ # The call timeout in seconds.
266
+ # @return [::Numeric]
267
+ # @!attribute [rw] metadata
268
+ # Additional headers to be sent with the call.
269
+ # @return [::Hash{::Symbol=>::String}]
270
+ # @!attribute [rw] retry_policy
271
+ # The retry policy. The value is a hash with the following keys:
272
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
273
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
274
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
275
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
276
+ # trigger a retry.
277
+ # @return [::Hash]
278
+ # @!attribute [rw] quota_project
279
+ # A separate project against which to charge quota.
280
+ # @return [::String]
281
+ #
282
+ class Configuration
283
+ extend ::Gapic::Config
284
+
285
+ config_attr :endpoint, "binaryauthorization.googleapis.com", ::String
286
+ config_attr :credentials, nil do |value|
287
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
288
+ allowed.any? { |klass| klass === value }
289
+ end
290
+ config_attr :scope, nil, ::String, ::Array, nil
291
+ config_attr :lib_name, nil, ::String, nil
292
+ config_attr :lib_version, nil, ::String, nil
293
+ config_attr :timeout, nil, ::Numeric, nil
294
+ config_attr :metadata, nil, ::Hash, nil
295
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
296
+ config_attr :quota_project, nil, ::String, nil
297
+
298
+ # @private
299
+ def initialize parent_config = nil
300
+ @parent_config = parent_config unless parent_config.nil?
301
+
302
+ yield self if block_given?
303
+ end
304
+
305
+ ##
306
+ # Configurations for individual RPCs
307
+ # @return [Rpcs]
308
+ #
309
+ def rpcs
310
+ @rpcs ||= begin
311
+ parent_rpcs = nil
312
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
313
+ Rpcs.new parent_rpcs
314
+ end
315
+ end
316
+
317
+ ##
318
+ # Configuration RPC class for the ValidationHelper API.
319
+ #
320
+ # Includes fields providing the configuration for each RPC in this service.
321
+ # Each configuration object is of type `Gapic::Config::Method` and includes
322
+ # the following configuration fields:
323
+ #
324
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
325
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
326
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
327
+ # include the following keys:
328
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
329
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
330
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
331
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
332
+ # trigger a retry.
333
+ #
334
+ class Rpcs
335
+ ##
336
+ # RPC-specific configuration for `validate_attestation_occurrence`
337
+ # @return [::Gapic::Config::Method]
338
+ #
339
+ attr_reader :validate_attestation_occurrence
340
+
341
+ # @private
342
+ def initialize parent_rpcs = nil
343
+ validate_attestation_occurrence_config = parent_rpcs.validate_attestation_occurrence if parent_rpcs.respond_to? :validate_attestation_occurrence
344
+ @validate_attestation_occurrence = ::Gapic::Config::Method.new validate_attestation_occurrence_config
345
+
346
+ yield self if block_given?
347
+ end
348
+ end
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
354
+ end
355
+ end
356
+ end
@@ -0,0 +1,108 @@
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 "google/cloud/binaryauthorization/v1/service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module BinaryAuthorization
24
+ module V1
25
+ module ValidationHelper
26
+ module Rest
27
+ ##
28
+ # REST service stub for the ValidationHelper service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the validate_attestation_occurrence REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse]
56
+ # A result object deserialized from the server's reply
57
+ def validate_attestation_occurrence request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_validate_attestation_occurrence_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # @private
83
+ #
84
+ # GRPC transcoding helper method for the validate_attestation_occurrence REST call
85
+ #
86
+ # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest]
87
+ # A request object representing the call parameters. Required.
88
+ # @return [Array(String, [String, nil], Hash{String => String})]
89
+ # Uri, Body, Query string parameters
90
+ def self.transcode_validate_attestation_occurrence_request request_pb
91
+ transcoder = Gapic::Rest::GrpcTranscoder.new
92
+ .with_bindings(
93
+ uri_method: :post,
94
+ uri_template: "/v1/{attestor}:validateAttestationOccurrence",
95
+ body: "*",
96
+ matches: [
97
+ ["attestor", %r{^projects/[^/]+/attestors/[^/]+/?$}, false]
98
+ ]
99
+ )
100
+ transcoder.transcode request_pb
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,51 @@
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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/binary_authorization/v1/version"
24
+
25
+ require "google/cloud/binary_authorization/v1/validation_helper/credentials"
26
+ require "google/cloud/binary_authorization/v1/validation_helper/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module BinaryAuthorization
31
+ module V1
32
+ ##
33
+ # BinAuthz Attestor verification
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/cloud/binary_authorization/v1/validation_helper/rest"
38
+ # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new
39
+ #
40
+ module ValidationHelper
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/cloud/binary_authorization/v1/validation_helper/rest/helpers" if ::File.file? helper_path
@@ -24,6 +24,7 @@ require "google/cloud/binary_authorization/v1/version"
24
24
 
25
25
  require "google/cloud/binary_authorization/v1/validation_helper/credentials"
26
26
  require "google/cloud/binary_authorization/v1/validation_helper/client"
27
+ require "google/cloud/binary_authorization/v1/validation_helper/rest"
27
28
 
28
29
  module Google
29
30
  module Cloud
@@ -32,11 +33,16 @@ module Google
32
33
  ##
33
34
  # BinAuthz Attestor verification
34
35
  #
35
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
36
37
  #
37
38
  # require "google/cloud/binary_authorization/v1/validation_helper"
38
39
  # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new
39
40
  #
41
+ # @example Load this service and instantiate a REST client
42
+ #
43
+ # require "google/cloud/binary_authorization/v1/validation_helper/rest"
44
+ # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new
45
+ #
40
46
  module ValidationHelper
41
47
  end
42
48
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module BinaryAuthorization
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,13 +25,18 @@ module Google
25
25
  module Cloud
26
26
  module BinaryAuthorization
27
27
  ##
28
- # To load this package, including all its services, and instantiate a client:
28
+ # API client module.
29
29
  #
30
- # @example
30
+ # @example Load this package, including all its services, and instantiate a gRPC client
31
31
  #
32
32
  # require "google/cloud/binary_authorization/v1"
33
33
  # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new
34
34
  #
35
+ # @example Load this package, including all its services, and instantiate a REST client
36
+ #
37
+ # require "google/cloud/binary_authorization/v1"
38
+ # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new
39
+ #
35
40
  module V1
36
41
  end
37
42
  end
@@ -6,7 +6,6 @@ require 'google/protobuf'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/protobuf/timestamp_pb'
9
- require 'google/api/annotations_pb'
10
9
 
11
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
11
  add_file("google/cloud/binaryauthorization/v1/resources.proto", :syntax => :proto3) do