google-cloud-commerce-consumer-procurement-v1 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +3 -3
  4. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/client.rb +224 -1
  5. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/client.rb +210 -1
  6. data/lib/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_service/rest/service_stub.rb +120 -0
  7. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/client.rb +825 -0
  8. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/credentials.rb +51 -0
  9. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/paths.rb +54 -0
  10. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/client.rb +764 -0
  11. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/service_stub.rb +371 -0
  12. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service/rest.rb +56 -0
  13. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service.rb +59 -0
  14. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_pb.rb +69 -0
  15. data/lib/google/cloud/commerce/consumer/procurement/v1/license_management_service_services_pb.rb +57 -0
  16. data/lib/google/cloud/commerce/consumer/procurement/v1/procurement_service_pb.rb +8 -1
  17. data/lib/google/cloud/commerce/consumer/procurement/v1/procurement_service_services_pb.rb +7 -0
  18. data/lib/google/cloud/commerce/consumer/procurement/v1/rest.rb +2 -1
  19. data/lib/google/cloud/commerce/consumer/procurement/v1/version.rb +1 -1
  20. data/lib/google/cloud/commerce/consumer/procurement/v1.rb +3 -2
  21. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/license_management_service.rb +196 -0
  22. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/order.rb +14 -10
  23. data/proto_docs/google/cloud/commerce/consumer/procurement/v1/procurement_service.rb +115 -1
  24. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  25. metadata +14 -3
@@ -0,0 +1,371 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/commerce/consumer/procurement/v1/license_management_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Commerce
24
+ module Consumer
25
+ module Procurement
26
+ module V1
27
+ module LicenseManagementService
28
+ module Rest
29
+ ##
30
+ # REST service stub for the LicenseManagementService service.
31
+ # Service stub contains baseline method implementations
32
+ # including transcoding, making the REST call, and deserialing the response.
33
+ #
34
+ class ServiceStub
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
36
+ # These require statements are intentionally placed here to initialize
37
+ # the REST modules only when it's required.
38
+ require "gapic/rest"
39
+
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
44
+ numeric_enums: true,
45
+ raise_faraday_errors: false
46
+ end
47
+
48
+ ##
49
+ # The effective universe domain
50
+ #
51
+ # @return [String]
52
+ #
53
+ def universe_domain
54
+ @client_stub.universe_domain
55
+ end
56
+
57
+ ##
58
+ # The effective endpoint
59
+ #
60
+ # @return [String]
61
+ #
62
+ def endpoint
63
+ @client_stub.endpoint
64
+ end
65
+
66
+ ##
67
+ # Baseline implementation for the get_license_pool REST call
68
+ #
69
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::GetLicensePoolRequest]
70
+ # A request object representing the call parameters. Required.
71
+ # @param options [::Gapic::CallOptions]
72
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
73
+ #
74
+ # @yield [result, operation] Access the result along with the TransportOperation object
75
+ # @yieldparam result [::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool]
76
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
77
+ #
78
+ # @return [::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool]
79
+ # A result object deserialized from the server's reply
80
+ def get_license_pool request_pb, options = nil
81
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
82
+
83
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_license_pool_request request_pb
84
+ query_string_params = if query_string_params.any?
85
+ query_string_params.to_h { |p| p.split "=", 2 }
86
+ else
87
+ {}
88
+ end
89
+
90
+ response = @client_stub.make_http_request(
91
+ verb,
92
+ uri: uri,
93
+ body: body || "",
94
+ params: query_string_params,
95
+ options: options
96
+ )
97
+ operation = ::Gapic::Rest::TransportOperation.new response
98
+ result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool.decode_json response.body, ignore_unknown_fields: true
99
+
100
+ yield result, operation if block_given?
101
+ result
102
+ end
103
+
104
+ ##
105
+ # Baseline implementation for the update_license_pool REST call
106
+ #
107
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::UpdateLicensePoolRequest]
108
+ # A request object representing the call parameters. Required.
109
+ # @param options [::Gapic::CallOptions]
110
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
111
+ #
112
+ # @yield [result, operation] Access the result along with the TransportOperation object
113
+ # @yieldparam result [::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool]
114
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
115
+ #
116
+ # @return [::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool]
117
+ # A result object deserialized from the server's reply
118
+ def update_license_pool request_pb, options = nil
119
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
120
+
121
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_license_pool_request request_pb
122
+ query_string_params = if query_string_params.any?
123
+ query_string_params.to_h { |p| p.split "=", 2 }
124
+ else
125
+ {}
126
+ end
127
+
128
+ response = @client_stub.make_http_request(
129
+ verb,
130
+ uri: uri,
131
+ body: body || "",
132
+ params: query_string_params,
133
+ options: options
134
+ )
135
+ operation = ::Gapic::Rest::TransportOperation.new response
136
+ result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool.decode_json response.body, ignore_unknown_fields: true
137
+
138
+ yield result, operation if block_given?
139
+ result
140
+ end
141
+
142
+ ##
143
+ # Baseline implementation for the assign REST call
144
+ #
145
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignRequest]
146
+ # A request object representing the call parameters. Required.
147
+ # @param options [::Gapic::CallOptions]
148
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
149
+ #
150
+ # @yield [result, operation] Access the result along with the TransportOperation object
151
+ # @yieldparam result [::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignResponse]
152
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
153
+ #
154
+ # @return [::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignResponse]
155
+ # A result object deserialized from the server's reply
156
+ def assign request_pb, options = nil
157
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
158
+
159
+ verb, uri, query_string_params, body = ServiceStub.transcode_assign_request request_pb
160
+ query_string_params = if query_string_params.any?
161
+ query_string_params.to_h { |p| p.split "=", 2 }
162
+ else
163
+ {}
164
+ end
165
+
166
+ response = @client_stub.make_http_request(
167
+ verb,
168
+ uri: uri,
169
+ body: body || "",
170
+ params: query_string_params,
171
+ options: options
172
+ )
173
+ operation = ::Gapic::Rest::TransportOperation.new response
174
+ result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignResponse.decode_json response.body, ignore_unknown_fields: true
175
+
176
+ yield result, operation if block_given?
177
+ result
178
+ end
179
+
180
+ ##
181
+ # Baseline implementation for the unassign REST call
182
+ #
183
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignRequest]
184
+ # A request object representing the call parameters. Required.
185
+ # @param options [::Gapic::CallOptions]
186
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
187
+ #
188
+ # @yield [result, operation] Access the result along with the TransportOperation object
189
+ # @yieldparam result [::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignResponse]
190
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
191
+ #
192
+ # @return [::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignResponse]
193
+ # A result object deserialized from the server's reply
194
+ def unassign request_pb, options = nil
195
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
196
+
197
+ verb, uri, query_string_params, body = ServiceStub.transcode_unassign_request request_pb
198
+ query_string_params = if query_string_params.any?
199
+ query_string_params.to_h { |p| p.split "=", 2 }
200
+ else
201
+ {}
202
+ end
203
+
204
+ response = @client_stub.make_http_request(
205
+ verb,
206
+ uri: uri,
207
+ body: body || "",
208
+ params: query_string_params,
209
+ options: options
210
+ )
211
+ operation = ::Gapic::Rest::TransportOperation.new response
212
+ result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignResponse.decode_json response.body, ignore_unknown_fields: true
213
+
214
+ yield result, operation if block_given?
215
+ result
216
+ end
217
+
218
+ ##
219
+ # Baseline implementation for the enumerate_licensed_users REST call
220
+ #
221
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersRequest]
222
+ # A request object representing the call parameters. Required.
223
+ # @param options [::Gapic::CallOptions]
224
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
225
+ #
226
+ # @yield [result, operation] Access the result along with the TransportOperation object
227
+ # @yieldparam result [::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersResponse]
228
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
229
+ #
230
+ # @return [::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersResponse]
231
+ # A result object deserialized from the server's reply
232
+ def enumerate_licensed_users request_pb, options = nil
233
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
234
+
235
+ verb, uri, query_string_params, body = ServiceStub.transcode_enumerate_licensed_users_request request_pb
236
+ query_string_params = if query_string_params.any?
237
+ query_string_params.to_h { |p| p.split "=", 2 }
238
+ else
239
+ {}
240
+ end
241
+
242
+ response = @client_stub.make_http_request(
243
+ verb,
244
+ uri: uri,
245
+ body: body || "",
246
+ params: query_string_params,
247
+ options: options
248
+ )
249
+ operation = ::Gapic::Rest::TransportOperation.new response
250
+ result = ::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersResponse.decode_json response.body, ignore_unknown_fields: true
251
+
252
+ yield result, operation if block_given?
253
+ result
254
+ end
255
+
256
+ ##
257
+ # @private
258
+ #
259
+ # GRPC transcoding helper method for the get_license_pool REST call
260
+ #
261
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::GetLicensePoolRequest]
262
+ # A request object representing the call parameters. Required.
263
+ # @return [Array(String, [String, nil], Hash{String => String})]
264
+ # Uri, Body, Query string parameters
265
+ def self.transcode_get_license_pool_request request_pb
266
+ transcoder = Gapic::Rest::GrpcTranscoder.new
267
+ .with_bindings(
268
+ uri_method: :get,
269
+ uri_template: "/v1/{name}",
270
+ matches: [
271
+ ["name", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/?$}, false]
272
+ ]
273
+ )
274
+ transcoder.transcode request_pb
275
+ end
276
+
277
+ ##
278
+ # @private
279
+ #
280
+ # GRPC transcoding helper method for the update_license_pool REST call
281
+ #
282
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::UpdateLicensePoolRequest]
283
+ # A request object representing the call parameters. Required.
284
+ # @return [Array(String, [String, nil], Hash{String => String})]
285
+ # Uri, Body, Query string parameters
286
+ def self.transcode_update_license_pool_request request_pb
287
+ transcoder = Gapic::Rest::GrpcTranscoder.new
288
+ .with_bindings(
289
+ uri_method: :patch,
290
+ uri_template: "/v1/{license_pool.name}",
291
+ body: "license_pool",
292
+ matches: [
293
+ ["license_pool.name", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/[^/]+/?$}, false]
294
+ ]
295
+ )
296
+ transcoder.transcode request_pb
297
+ end
298
+
299
+ ##
300
+ # @private
301
+ #
302
+ # GRPC transcoding helper method for the assign REST call
303
+ #
304
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignRequest]
305
+ # A request object representing the call parameters. Required.
306
+ # @return [Array(String, [String, nil], Hash{String => String})]
307
+ # Uri, Body, Query string parameters
308
+ def self.transcode_assign_request request_pb
309
+ transcoder = Gapic::Rest::GrpcTranscoder.new
310
+ .with_bindings(
311
+ uri_method: :post,
312
+ uri_template: "/v1/{parent}:assign",
313
+ body: "*",
314
+ matches: [
315
+ ["parent", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/?$}, false]
316
+ ]
317
+ )
318
+ transcoder.transcode request_pb
319
+ end
320
+
321
+ ##
322
+ # @private
323
+ #
324
+ # GRPC transcoding helper method for the unassign REST call
325
+ #
326
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignRequest]
327
+ # A request object representing the call parameters. Required.
328
+ # @return [Array(String, [String, nil], Hash{String => String})]
329
+ # Uri, Body, Query string parameters
330
+ def self.transcode_unassign_request request_pb
331
+ transcoder = Gapic::Rest::GrpcTranscoder.new
332
+ .with_bindings(
333
+ uri_method: :post,
334
+ uri_template: "/v1/{parent}:unassign",
335
+ body: "*",
336
+ matches: [
337
+ ["parent", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/?$}, false]
338
+ ]
339
+ )
340
+ transcoder.transcode request_pb
341
+ end
342
+
343
+ ##
344
+ # @private
345
+ #
346
+ # GRPC transcoding helper method for the enumerate_licensed_users REST call
347
+ #
348
+ # @param request_pb [::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersRequest]
349
+ # A request object representing the call parameters. Required.
350
+ # @return [Array(String, [String, nil], Hash{String => String})]
351
+ # Uri, Body, Query string parameters
352
+ def self.transcode_enumerate_licensed_users_request request_pb
353
+ transcoder = Gapic::Rest::GrpcTranscoder.new
354
+ .with_bindings(
355
+ uri_method: :get,
356
+ uri_template: "/v1/{parent}:enumerateLicensedUsers",
357
+ matches: [
358
+ ["parent", %r{^billingAccounts/[^/]+/orders/[^/]+/licensePool/?$}, false]
359
+ ]
360
+ )
361
+ transcoder.transcode request_pb
362
+ end
363
+ end
364
+ end
365
+ end
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
371
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/commerce/consumer/procurement/v1/version"
24
+
25
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/credentials"
26
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/paths"
27
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Commerce
32
+ module Consumer
33
+ module Procurement
34
+ module V1
35
+ ##
36
+ # Service for managing licenses.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/commerce/consumer/procurement/v1/license_management_service/rest"
41
+ # client = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicenseManagementService::Rest::Client.new
42
+ #
43
+ module LicenseManagementService
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
56
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/commerce/consumer/procurement/v1/version"
24
+
25
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/credentials"
26
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/paths"
27
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/client"
28
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/rest"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Commerce
33
+ module Consumer
34
+ module Procurement
35
+ module V1
36
+ ##
37
+ # Service for managing licenses.
38
+ #
39
+ # @example Load this service and instantiate a gRPC client
40
+ #
41
+ # require "google/cloud/commerce/consumer/procurement/v1/license_management_service"
42
+ # client = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicenseManagementService::Client.new
43
+ #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/cloud/commerce/consumer/procurement/v1/license_management_service/rest"
47
+ # client = ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicenseManagementService::Rest::Client.new
48
+ #
49
+ module LicenseManagementService
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ helper_path = ::File.join __dir__, "license_management_service", "helpers.rb"
59
+ require "google/cloud/commerce/consumer/procurement/v1/license_management_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/commerce/consumer/procurement/v1/license_management_service.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/protobuf/duration_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+ require 'google/protobuf/timestamp_pb'
14
+
15
+
16
+ descriptor_data = "\nNgoogle/cloud/commerce/consumer/procurement/v1/license_management_service.proto\x12-google.cloud.commerce.consumer.procurement.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x83\x03\n\x12\x41ssignmentProtocol\x12x\n\x16manual_assignment_type\x18\x02 \x01(\x0b\x32V.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentTypeH\x00\x12t\n\x14\x61uto_assignment_type\x18\x03 \x01(\x0b\x32T.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentTypeH\x00\x1a\x16\n\x14ManualAssignmentType\x1aR\n\x12\x41utoAssignmentType\x12<\n\x14inactive_license_ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x42\x11\n\x0f\x61ssignment_type\"\xf2\x02\n\x0bLicensePool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12k\n\x1blicense_assignment_protocol\x18\x02 \x01(\x0b\x32\x41.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocolB\x03\xe0\x41\x02\x12$\n\x17\x61vailable_license_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13total_license_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03:\x9a\x01\xea\x41\x96\x01\n;cloudcommerceconsumerprocurement.googleapis.com/LicensePool\x12<billingAccounts/{billing_account}/orders/{order}/licensePool*\x0clicensePools2\x0blicensePool\"*\n\x15GetLicensePoolRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xa7\x01\n\x18UpdateLicensePoolRequest\x12U\n\x0clicense_pool\x18\x01 \x01(\x0b\x32:.google.cloud.commerce.consumer.procurement.v1.LicensePoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"<\n\rAssignRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tusernames\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x10\n\x0e\x41ssignResponse\">\n\x0fUnassignRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tusernames\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x12\n\x10UnassignResponse\"e\n\x1d\x45numerateLicensedUsersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x01\n\x0cLicensedUser\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x34\n\x0b\x61ssign_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x11recent_usage_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x8e\x01\n\x1e\x45numerateLicensedUsersResponse\x12S\n\x0elicensed_users\x18\x01 \x03(\x0b\x32;.google.cloud.commerce.consumer.procurement.v1.LicensedUser\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc5\n\n\x18LicenseManagementService\x12\xd4\x01\n\x0eGetLicensePool\x12\x44.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=billingAccounts/*/orders/*/licensePool}\x12\x8b\x02\n\x11UpdateLicensePool\x12G.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest\x1a:.google.cloud.commerce.consumer.procurement.v1.LicensePool\"q\xda\x41\x18license_pool,update_mask\x82\xd3\xe4\x93\x02P2@/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool/*}:\x0clicense_pool\x12\xdf\x01\n\x06\x41ssign\x12<.google.cloud.commerce.consumer.procurement.v1.AssignRequest\x1a=.google.cloud.commerce.consumer.procurement.v1.AssignResponse\"X\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02?\":/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign:\x01*\x12\xe7\x01\n\x08Unassign\x12>.google.cloud.commerce.consumer.procurement.v1.UnassignRequest\x1a?.google.cloud.commerce.consumer.procurement.v1.UnassignResponse\"Z\xda\x41\x10parent,usernames\x82\xd3\xe4\x93\x02\x41\"</v1/{parent=billingAccounts/*/orders/*/licensePool}:unassign:\x01*\x12\x92\x02\n\x16\x45numerateLicensedUsers\x12L.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest\x1aM.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1/{parent=billingAccounts/*/orders/*/licensePool}:enumerateLicensedUsers\x1a\x63\xca\x41/cloudcommerceconsumerprocurement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbe\x02\n1com.google.cloud.commerce.consumer.procurement.v1B\x1dLicenseManagementServiceProtoP\x01ZScloud.google.com/go/commerce/consumer/procurement/apiv1/procurementpb;procurementpb\xaa\x02-Google.Cloud.Commerce.Consumer.Procurement.V1\xca\x02-Google\\Cloud\\Commerce\\Consumer\\Procurement\\V1\xea\x02\x32Google::Cloud::Commerce::Consumer::Procurement::V1b\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
32
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
33
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
39
+ end
40
+ end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
43
+ end
44
+
45
+ module Google
46
+ module Cloud
47
+ module Commerce
48
+ module Consumer
49
+ module Procurement
50
+ module V1
51
+ AssignmentProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol").msgclass
52
+ AssignmentProtocol::ManualAssignmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType").msgclass
53
+ AssignmentProtocol::AutoAssignmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType").msgclass
54
+ LicensePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.LicensePool").msgclass
55
+ GetLicensePoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest").msgclass
56
+ UpdateLicensePoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest").msgclass
57
+ AssignRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.AssignRequest").msgclass
58
+ AssignResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.AssignResponse").msgclass
59
+ UnassignRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.UnassignRequest").msgclass
60
+ UnassignResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.UnassignResponse").msgclass
61
+ EnumerateLicensedUsersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest").msgclass
62
+ LicensedUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.LicensedUser").msgclass
63
+ EnumerateLicensedUsersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse").msgclass
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,57 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/commerce/consumer/procurement/v1/license_management_service.proto for package 'Google.Cloud.Commerce.Consumer.Procurement.V1'
3
+ # Original file comments:
4
+ # Copyright 2024 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/commerce/consumer/procurement/v1/license_management_service_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Commerce
25
+ module Consumer
26
+ module Procurement
27
+ module V1
28
+ module LicenseManagementService
29
+ # Service for managing licenses.
30
+ class Service
31
+
32
+ include ::GRPC::GenericService
33
+
34
+ self.marshal_class_method = :encode
35
+ self.unmarshal_class_method = :decode
36
+ self.service_name = 'google.cloud.commerce.consumer.procurement.v1.LicenseManagementService'
37
+
38
+ # Gets the license pool.
39
+ rpc :GetLicensePool, ::Google::Cloud::Commerce::Consumer::Procurement::V1::GetLicensePoolRequest, ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool
40
+ # Updates the license pool if one exists for this Order.
41
+ rpc :UpdateLicensePool, ::Google::Cloud::Commerce::Consumer::Procurement::V1::UpdateLicensePoolRequest, ::Google::Cloud::Commerce::Consumer::Procurement::V1::LicensePool
42
+ # Assigns a license to a user.
43
+ rpc :Assign, ::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignRequest, ::Google::Cloud::Commerce::Consumer::Procurement::V1::AssignResponse
44
+ # Unassigns a license from a user.
45
+ rpc :Unassign, ::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignRequest, ::Google::Cloud::Commerce::Consumer::Procurement::V1::UnassignResponse
46
+ # Enumerates all users assigned a license.
47
+ rpc :EnumerateLicensedUsers, ::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersRequest, ::Google::Cloud::Commerce::Consumer::Procurement::V1::EnumerateLicensedUsersResponse
48
+ end
49
+
50
+ Stub = Service.rpc_stub_class
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end