google-cloud-channel-v1 0.2.0 → 0.3.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: eb9be21142d360705fa02b9cbfa390cd526ac22cad9ab315021cb6bf5e6398f8
4
- data.tar.gz: 8591644ee0d42fabbc2bb6dbc0559e8a3f85fdf7c6c0be4d5c86cf0612d04205
3
+ metadata.gz: fd6c8c759ff480e4272b4dc8fbe5f9b6f6b7e192ba9df0a7643c802923c6d141
4
+ data.tar.gz: 982ed6226cdd0654950b16c3c6b1049e05abc6719aa6a25199fb43a45afe6969
5
5
  SHA512:
6
- metadata.gz: 227703c7eb0b85fad35959e5a76368fd427c0be43d2c595b6dae80ac94f647f454468664360b1c2260300caa9787d42927f0cf8b41f4b45c833e8e84d81393d8
7
- data.tar.gz: c5c55c352e04a7ddb4b5b23e8c57f95916df2ba8d4fecdfc7f110e430a35d4dfe535cca18f6870fede59d4a947d9dcefa3eddf3a53f76b90559bb173b0110d0e
6
+ metadata.gz: 785c515ff17320909a6cfe20d15b70299b4be78320776ab8ebdd7a59527b01c1f714bbec0c1e801aa10e284af2336766f5d1b2b905c22c402cc0800112ff71b7
7
+ data.tar.gz: 9a57aefc910c3ca3b0f5e1247983b5454ed6463b131a3db9b5c2fd73d626fd2d085176449f55a53a43166ee37eebc57fb76bcb21f99340a73cd2636a8475e9fc
@@ -3142,6 +3142,278 @@ module Google
3142
3142
  raise ::Google::Cloud::Error.from_error(e)
3143
3143
  end
3144
3144
 
3145
+ ##
3146
+ # Registers a service account with subscriber privileges on the Cloud Pub/Sub
3147
+ # topic created for this Channel Services account. Once you create a
3148
+ # subscriber, you will get the events as per {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent}
3149
+ #
3150
+ # Possible Error Codes:
3151
+ #
3152
+ # * PERMISSION_DENIED: If the reseller account making the request and the
3153
+ # reseller account being provided are different, or if the impersonated user
3154
+ # is not a super admin.
3155
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
3156
+ # request.
3157
+ # * INTERNAL: Any non-user error related to a technical issue in the
3158
+ # backend. In this case, contact Cloud Channel support.
3159
+ # * UNKNOWN: Any non-user error related to a technical issue in
3160
+ # the backend. In this case, contact Cloud Channel support.
3161
+ #
3162
+ # Return Value:
3163
+ # Topic name with service email address registered if successful,
3164
+ # otherwise error is returned.
3165
+ #
3166
+ # @overload register_subscriber(request, options = nil)
3167
+ # Pass arguments to `register_subscriber` via a request object, either of type
3168
+ # {::Google::Cloud::Channel::V1::RegisterSubscriberRequest} or an equivalent Hash.
3169
+ #
3170
+ # @param request [::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Hash]
3171
+ # A request object representing the call parameters. Required. To specify no
3172
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3173
+ # @param options [::Gapic::CallOptions, ::Hash]
3174
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3175
+ #
3176
+ # @overload register_subscriber(account: nil, service_account: nil)
3177
+ # Pass arguments to `register_subscriber` via keyword arguments. Note that at
3178
+ # least one keyword argument is required. To specify no parameters, or to keep all
3179
+ # the default parameter values, pass an empty Hash as a request object (see above).
3180
+ #
3181
+ # @param account [::String]
3182
+ # Required. Resource name of the account.
3183
+ # @param service_account [::String]
3184
+ # Required. Service account which will provide subscriber access to the
3185
+ # registered topic.
3186
+ #
3187
+ # @yield [response, operation] Access the result along with the RPC operation
3188
+ # @yieldparam response [::Google::Cloud::Channel::V1::RegisterSubscriberResponse]
3189
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3190
+ #
3191
+ # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse]
3192
+ #
3193
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3194
+ #
3195
+ def register_subscriber request, options = nil
3196
+ raise ::ArgumentError, "request must be provided" if request.nil?
3197
+
3198
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest
3199
+
3200
+ # Converts hash and nil to an options object
3201
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3202
+
3203
+ # Customize the options with defaults
3204
+ metadata = @config.rpcs.register_subscriber.metadata.to_h
3205
+
3206
+ # Set x-goog-api-client and x-goog-user-project headers
3207
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3208
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3209
+ gapic_version: ::Google::Cloud::Channel::V1::VERSION
3210
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3211
+
3212
+ header_params = {
3213
+ "account" => request.account
3214
+ }
3215
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3216
+ metadata[:"x-goog-request-params"] ||= request_params_header
3217
+
3218
+ options.apply_defaults timeout: @config.rpcs.register_subscriber.timeout,
3219
+ metadata: metadata,
3220
+ retry_policy: @config.rpcs.register_subscriber.retry_policy
3221
+ options.apply_defaults metadata: @config.metadata,
3222
+ retry_policy: @config.retry_policy
3223
+
3224
+ @cloud_channel_service_stub.call_rpc :register_subscriber, request, options: options do |response, operation|
3225
+ yield response, operation if block_given?
3226
+ return response
3227
+ end
3228
+ rescue ::GRPC::BadStatus => e
3229
+ raise ::Google::Cloud::Error.from_error(e)
3230
+ end
3231
+
3232
+ ##
3233
+ # Unregisters a service account with subscriber privileges on the Cloud
3234
+ # Pub/Sub topic created for this Channel Services account. If there are no
3235
+ # more service account left with sunbscriber privileges, the topic will be
3236
+ # deleted. You can check this by calling ListSubscribers api.
3237
+ #
3238
+ # Possible Error Codes:
3239
+ #
3240
+ # * PERMISSION_DENIED: If the reseller account making the request and the
3241
+ # reseller account being provided are different, or if the impersonated user
3242
+ # is not a super admin.
3243
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
3244
+ # request.
3245
+ # * NOT_FOUND: If the topic resource doesn't exist.
3246
+ # * INTERNAL: Any non-user error related to a technical issue in the
3247
+ # backend. In this case, contact Cloud Channel support.
3248
+ # * UNKNOWN: Any non-user error related to a technical issue in
3249
+ # the backend. In this case, contact Cloud Channel support.
3250
+ #
3251
+ # Return Value:
3252
+ # Topic name from which service email address has been unregistered if
3253
+ # successful, otherwise error is returned. If the service email was already
3254
+ # not associated with the topic, the success response will be returned.
3255
+ #
3256
+ # @overload unregister_subscriber(request, options = nil)
3257
+ # Pass arguments to `unregister_subscriber` via a request object, either of type
3258
+ # {::Google::Cloud::Channel::V1::UnregisterSubscriberRequest} or an equivalent Hash.
3259
+ #
3260
+ # @param request [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Hash]
3261
+ # A request object representing the call parameters. Required. To specify no
3262
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3263
+ # @param options [::Gapic::CallOptions, ::Hash]
3264
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3265
+ #
3266
+ # @overload unregister_subscriber(account: nil, service_account: nil)
3267
+ # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at
3268
+ # least one keyword argument is required. To specify no parameters, or to keep all
3269
+ # the default parameter values, pass an empty Hash as a request object (see above).
3270
+ #
3271
+ # @param account [::String]
3272
+ # Required. Resource name of the account.
3273
+ # @param service_account [::String]
3274
+ # Required. Service account which will be unregistered from getting subscriber access
3275
+ # to the topic.
3276
+ #
3277
+ # @yield [response, operation] Access the result along with the RPC operation
3278
+ # @yieldparam response [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse]
3279
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3280
+ #
3281
+ # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse]
3282
+ #
3283
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3284
+ #
3285
+ def unregister_subscriber request, options = nil
3286
+ raise ::ArgumentError, "request must be provided" if request.nil?
3287
+
3288
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest
3289
+
3290
+ # Converts hash and nil to an options object
3291
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3292
+
3293
+ # Customize the options with defaults
3294
+ metadata = @config.rpcs.unregister_subscriber.metadata.to_h
3295
+
3296
+ # Set x-goog-api-client and x-goog-user-project headers
3297
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3298
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3299
+ gapic_version: ::Google::Cloud::Channel::V1::VERSION
3300
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3301
+
3302
+ header_params = {
3303
+ "account" => request.account
3304
+ }
3305
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3306
+ metadata[:"x-goog-request-params"] ||= request_params_header
3307
+
3308
+ options.apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout,
3309
+ metadata: metadata,
3310
+ retry_policy: @config.rpcs.unregister_subscriber.retry_policy
3311
+ options.apply_defaults metadata: @config.metadata,
3312
+ retry_policy: @config.retry_policy
3313
+
3314
+ @cloud_channel_service_stub.call_rpc :unregister_subscriber, request, options: options do |response, operation|
3315
+ yield response, operation if block_given?
3316
+ return response
3317
+ end
3318
+ rescue ::GRPC::BadStatus => e
3319
+ raise ::Google::Cloud::Error.from_error(e)
3320
+ end
3321
+
3322
+ ##
3323
+ # Lists service accounts with subscriber privileges on the Cloud Pub/Sub
3324
+ # topic created for this Channel Services account.
3325
+ #
3326
+ # Possible Error Codes:
3327
+ #
3328
+ # * PERMISSION_DENIED: If the reseller account making the request and the
3329
+ # reseller account being provided are different, or if the account is not
3330
+ # a super admin.
3331
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
3332
+ # request.
3333
+ # * NOT_FOUND: If the topic resource doesn't exist.
3334
+ # * INTERNAL: Any non-user error related to a technical issue in the
3335
+ # backend. In this case, contact Cloud Channel support.
3336
+ # * UNKNOWN: Any non-user error related to a technical issue in
3337
+ # the backend. In this case, contact Cloud Channel support.
3338
+ #
3339
+ # Return Value:
3340
+ # List of service email addresses if successful, otherwise error is
3341
+ # returned.
3342
+ #
3343
+ # @overload list_subscribers(request, options = nil)
3344
+ # Pass arguments to `list_subscribers` via a request object, either of type
3345
+ # {::Google::Cloud::Channel::V1::ListSubscribersRequest} or an equivalent Hash.
3346
+ #
3347
+ # @param request [::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Hash]
3348
+ # A request object representing the call parameters. Required. To specify no
3349
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3350
+ # @param options [::Gapic::CallOptions, ::Hash]
3351
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3352
+ #
3353
+ # @overload list_subscribers(account: nil, page_size: nil, page_token: nil)
3354
+ # Pass arguments to `list_subscribers` via keyword arguments. Note that at
3355
+ # least one keyword argument is required. To specify no parameters, or to keep all
3356
+ # the default parameter values, pass an empty Hash as a request object (see above).
3357
+ #
3358
+ # @param account [::String]
3359
+ # Required. Resource name of the account.
3360
+ # @param page_size [::Integer]
3361
+ # Optional. The maximum number of service accounts to return. The service may return
3362
+ # fewer than this value.
3363
+ # If unspecified, at most 100 service accounts will be returned.
3364
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
3365
+ # @param page_token [::String]
3366
+ # Optional. A page token, received from a previous `ListSubscribers` call.
3367
+ # Provide this to retrieve the subsequent page.
3368
+ #
3369
+ # When paginating, all other parameters provided to `ListSubscribers` must
3370
+ # match the call that provided the page token.
3371
+ #
3372
+ # @yield [response, operation] Access the result along with the RPC operation
3373
+ # @yieldparam response [::Google::Cloud::Channel::V1::ListSubscribersResponse]
3374
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3375
+ #
3376
+ # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse]
3377
+ #
3378
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3379
+ #
3380
+ def list_subscribers request, options = nil
3381
+ raise ::ArgumentError, "request must be provided" if request.nil?
3382
+
3383
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest
3384
+
3385
+ # Converts hash and nil to an options object
3386
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3387
+
3388
+ # Customize the options with defaults
3389
+ metadata = @config.rpcs.list_subscribers.metadata.to_h
3390
+
3391
+ # Set x-goog-api-client and x-goog-user-project headers
3392
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3393
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3394
+ gapic_version: ::Google::Cloud::Channel::V1::VERSION
3395
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3396
+
3397
+ header_params = {
3398
+ "account" => request.account
3399
+ }
3400
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3401
+ metadata[:"x-goog-request-params"] ||= request_params_header
3402
+
3403
+ options.apply_defaults timeout: @config.rpcs.list_subscribers.timeout,
3404
+ metadata: metadata,
3405
+ retry_policy: @config.rpcs.list_subscribers.retry_policy
3406
+ options.apply_defaults metadata: @config.metadata,
3407
+ retry_policy: @config.retry_policy
3408
+
3409
+ @cloud_channel_service_stub.call_rpc :list_subscribers, request, options: options do |response, operation|
3410
+ yield response, operation if block_given?
3411
+ return response
3412
+ end
3413
+ rescue ::GRPC::BadStatus => e
3414
+ raise ::Google::Cloud::Error.from_error(e)
3415
+ end
3416
+
3145
3417
  ##
3146
3418
  # Configuration class for the CloudChannelService API.
3147
3419
  #
@@ -3428,6 +3700,21 @@ module Google
3428
3700
  # @return [::Gapic::Config::Method]
3429
3701
  #
3430
3702
  attr_reader :list_purchasable_offers
3703
+ ##
3704
+ # RPC-specific configuration for `register_subscriber`
3705
+ # @return [::Gapic::Config::Method]
3706
+ #
3707
+ attr_reader :register_subscriber
3708
+ ##
3709
+ # RPC-specific configuration for `unregister_subscriber`
3710
+ # @return [::Gapic::Config::Method]
3711
+ #
3712
+ attr_reader :unregister_subscriber
3713
+ ##
3714
+ # RPC-specific configuration for `list_subscribers`
3715
+ # @return [::Gapic::Config::Method]
3716
+ #
3717
+ attr_reader :list_subscribers
3431
3718
 
3432
3719
  # @private
3433
3720
  def initialize parent_rpcs = nil
@@ -3491,6 +3778,12 @@ module Google
3491
3778
  @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config
3492
3779
  list_purchasable_offers_config = parent_rpcs&.list_purchasable_offers if parent_rpcs&.respond_to? :list_purchasable_offers
3493
3780
  @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config
3781
+ register_subscriber_config = parent_rpcs&.register_subscriber if parent_rpcs&.respond_to? :register_subscriber
3782
+ @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config
3783
+ unregister_subscriber_config = parent_rpcs&.unregister_subscriber if parent_rpcs&.respond_to? :unregister_subscriber
3784
+ @unregister_subscriber = ::Gapic::Config::Method.new unregister_subscriber_config
3785
+ list_subscribers_config = parent_rpcs&.list_subscribers if parent_rpcs&.respond_to? :list_subscribers
3786
+ @list_subscribers = ::Gapic::Config::Method.new list_subscribers_config
3494
3787
 
3495
3788
  yield self if block_given?
3496
3789
  end
@@ -267,6 +267,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
267
267
  add_message "google.cloud.channel.v1.PurchasableOffer" do
268
268
  optional :offer, :message, 1, "google.cloud.channel.v1.Offer"
269
269
  end
270
+ add_message "google.cloud.channel.v1.RegisterSubscriberRequest" do
271
+ optional :account, :string, 1
272
+ optional :service_account, :string, 2
273
+ end
274
+ add_message "google.cloud.channel.v1.RegisterSubscriberResponse" do
275
+ optional :topic, :string, 1
276
+ end
277
+ add_message "google.cloud.channel.v1.UnregisterSubscriberRequest" do
278
+ optional :account, :string, 1
279
+ optional :service_account, :string, 2
280
+ end
281
+ add_message "google.cloud.channel.v1.UnregisterSubscriberResponse" do
282
+ optional :topic, :string, 1
283
+ end
284
+ add_message "google.cloud.channel.v1.ListSubscribersRequest" do
285
+ optional :account, :string, 1
286
+ optional :page_size, :int32, 2
287
+ optional :page_token, :string, 3
288
+ end
289
+ add_message "google.cloud.channel.v1.ListSubscribersResponse" do
290
+ optional :topic, :string, 1
291
+ repeated :service_accounts, :string, 2
292
+ optional :next_page_token, :string, 3
293
+ end
270
294
  end
271
295
  end
272
296
 
@@ -325,6 +349,12 @@ module Google
325
349
  ListPurchasableOffersRequest::ChangeOfferPurchase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase").msgclass
326
350
  ListPurchasableOffersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListPurchasableOffersResponse").msgclass
327
351
  PurchasableOffer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PurchasableOffer").msgclass
352
+ RegisterSubscriberRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RegisterSubscriberRequest").msgclass
353
+ RegisterSubscriberResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RegisterSubscriberResponse").msgclass
354
+ UnregisterSubscriberRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.UnregisterSubscriberRequest").msgclass
355
+ UnregisterSubscriberResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.UnregisterSubscriberResponse").msgclass
356
+ ListSubscribersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListSubscribersRequest").msgclass
357
+ ListSubscribersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListSubscribersResponse").msgclass
328
358
  end
329
359
  end
330
360
  end
@@ -670,6 +670,69 @@ module Google
670
670
  # * INVALID_ARGUMENT: Missing or invalid required parameters in the
671
671
  # request.
672
672
  rpc :ListPurchasableOffers, ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse
673
+ # Registers a service account with subscriber privileges on the Cloud Pub/Sub
674
+ # topic created for this Channel Services account. Once you create a
675
+ # subscriber, you will get the events as per [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
676
+ #
677
+ # Possible Error Codes:
678
+ #
679
+ # * PERMISSION_DENIED: If the reseller account making the request and the
680
+ # reseller account being provided are different, or if the impersonated user
681
+ # is not a super admin.
682
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
683
+ # request.
684
+ # * INTERNAL: Any non-user error related to a technical issue in the
685
+ # backend. In this case, contact Cloud Channel support.
686
+ # * UNKNOWN: Any non-user error related to a technical issue in
687
+ # the backend. In this case, contact Cloud Channel support.
688
+ #
689
+ # Return Value:
690
+ # Topic name with service email address registered if successful,
691
+ # otherwise error is returned.
692
+ rpc :RegisterSubscriber, ::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Google::Cloud::Channel::V1::RegisterSubscriberResponse
693
+ # Unregisters a service account with subscriber privileges on the Cloud
694
+ # Pub/Sub topic created for this Channel Services account. If there are no
695
+ # more service account left with sunbscriber privileges, the topic will be
696
+ # deleted. You can check this by calling ListSubscribers api.
697
+ #
698
+ # Possible Error Codes:
699
+ #
700
+ # * PERMISSION_DENIED: If the reseller account making the request and the
701
+ # reseller account being provided are different, or if the impersonated user
702
+ # is not a super admin.
703
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
704
+ # request.
705
+ # * NOT_FOUND: If the topic resource doesn't exist.
706
+ # * INTERNAL: Any non-user error related to a technical issue in the
707
+ # backend. In this case, contact Cloud Channel support.
708
+ # * UNKNOWN: Any non-user error related to a technical issue in
709
+ # the backend. In this case, contact Cloud Channel support.
710
+ #
711
+ # Return Value:
712
+ # Topic name from which service email address has been unregistered if
713
+ # successful, otherwise error is returned. If the service email was already
714
+ # not associated with the topic, the success response will be returned.
715
+ rpc :UnregisterSubscriber, ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse
716
+ # Lists service accounts with subscriber privileges on the Cloud Pub/Sub
717
+ # topic created for this Channel Services account.
718
+ #
719
+ # Possible Error Codes:
720
+ #
721
+ # * PERMISSION_DENIED: If the reseller account making the request and the
722
+ # reseller account being provided are different, or if the account is not
723
+ # a super admin.
724
+ # * INVALID_ARGUMENT: Missing or invalid required parameters in the
725
+ # request.
726
+ # * NOT_FOUND: If the topic resource doesn't exist.
727
+ # * INTERNAL: Any non-user error related to a technical issue in the
728
+ # backend. In this case, contact Cloud Channel support.
729
+ # * UNKNOWN: Any non-user error related to a technical issue in
730
+ # the backend. In this case, contact Cloud Channel support.
731
+ #
732
+ # Return Value:
733
+ # List of service email addresses if successful, otherwise error is
734
+ # returned.
735
+ rpc :ListSubscribers, ::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Google::Cloud::Channel::V1::ListSubscribersResponse
673
736
  end
674
737
 
675
738
  Stub = Service.rpc_stub_class
@@ -0,0 +1,56 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/channel/v1/subscriber_event.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/resource_pb'
7
+ require 'google/api/annotations_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("google/cloud/channel/v1/subscriber_event.proto", :syntax => :proto3) do
10
+ add_message "google.cloud.channel.v1.CustomerEvent" do
11
+ optional :customer, :string, 1
12
+ optional :event_type, :enum, 2, "google.cloud.channel.v1.CustomerEvent.Type"
13
+ end
14
+ add_enum "google.cloud.channel.v1.CustomerEvent.Type" do
15
+ value :TYPE_UNSPECIFIED, 0
16
+ end
17
+ add_message "google.cloud.channel.v1.EntitlementEvent" do
18
+ optional :entitlement, :string, 1
19
+ optional :event_type, :enum, 2, "google.cloud.channel.v1.EntitlementEvent.Type"
20
+ end
21
+ add_enum "google.cloud.channel.v1.EntitlementEvent.Type" do
22
+ value :TYPE_UNSPECIFIED, 0
23
+ value :CREATED, 1
24
+ value :PRICE_PLAN_SWITCHED, 3
25
+ value :COMMITMENT_CHANGED, 4
26
+ value :RENEWED, 5
27
+ value :SUSPENDED, 6
28
+ value :ACTIVATED, 7
29
+ value :CANCELLED, 8
30
+ value :SKU_CHANGED, 9
31
+ value :RENEWAL_SETTING_CHANGED, 10
32
+ value :PAID_SERVICE_STARTED, 11
33
+ value :LICENSE_ASSIGNMENT_CHANGED, 12
34
+ end
35
+ add_message "google.cloud.channel.v1.SubscriberEvent" do
36
+ oneof :event do
37
+ optional :customer_event, :message, 1, "google.cloud.channel.v1.CustomerEvent"
38
+ optional :entitlement_event, :message, 2, "google.cloud.channel.v1.EntitlementEvent"
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ module Google
45
+ module Cloud
46
+ module Channel
47
+ module V1
48
+ CustomerEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerEvent").msgclass
49
+ CustomerEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerEvent.Type").enummodule
50
+ EntitlementEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementEvent").msgclass
51
+ EntitlementEvent::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementEvent.Type").enummodule
52
+ SubscriberEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.SubscriberEvent").msgclass
53
+ end
54
+ end
55
+ end
56
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Channel
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1007,6 +1007,89 @@ module Google
1007
1007
  include ::Google::Protobuf::MessageExts
1008
1008
  extend ::Google::Protobuf::MessageExts::ClassMethods
1009
1009
  end
1010
+
1011
+ # Request Message for RegisterSubscriber.
1012
+ # @!attribute [rw] account
1013
+ # @return [::String]
1014
+ # Required. Resource name of the account.
1015
+ # @!attribute [rw] service_account
1016
+ # @return [::String]
1017
+ # Required. Service account which will provide subscriber access to the
1018
+ # registered topic.
1019
+ class RegisterSubscriberRequest
1020
+ include ::Google::Protobuf::MessageExts
1021
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1022
+ end
1023
+
1024
+ # Response Message for RegisterSubscriber.
1025
+ # @!attribute [rw] topic
1026
+ # @return [::String]
1027
+ # Name of the topic to which the subscriber will listen to.
1028
+ class RegisterSubscriberResponse
1029
+ include ::Google::Protobuf::MessageExts
1030
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1031
+ end
1032
+
1033
+ # Request Message for UnregisterSubscriber.
1034
+ # @!attribute [rw] account
1035
+ # @return [::String]
1036
+ # Required. Resource name of the account.
1037
+ # @!attribute [rw] service_account
1038
+ # @return [::String]
1039
+ # Required. Service account which will be unregistered from getting subscriber access
1040
+ # to the topic.
1041
+ class UnregisterSubscriberRequest
1042
+ include ::Google::Protobuf::MessageExts
1043
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1044
+ end
1045
+
1046
+ # Response Message for UnregisterSubscriber.
1047
+ # @!attribute [rw] topic
1048
+ # @return [::String]
1049
+ # Name of the topic from which the service account subscriber access has been
1050
+ # removed.
1051
+ class UnregisterSubscriberResponse
1052
+ include ::Google::Protobuf::MessageExts
1053
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1054
+ end
1055
+
1056
+ # Request Message for ListSubscribers.
1057
+ # @!attribute [rw] account
1058
+ # @return [::String]
1059
+ # Required. Resource name of the account.
1060
+ # @!attribute [rw] page_size
1061
+ # @return [::Integer]
1062
+ # Optional. The maximum number of service accounts to return. The service may return
1063
+ # fewer than this value.
1064
+ # If unspecified, at most 100 service accounts will be returned.
1065
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1066
+ # @!attribute [rw] page_token
1067
+ # @return [::String]
1068
+ # Optional. A page token, received from a previous `ListSubscribers` call.
1069
+ # Provide this to retrieve the subsequent page.
1070
+ #
1071
+ # When paginating, all other parameters provided to `ListSubscribers` must
1072
+ # match the call that provided the page token.
1073
+ class ListSubscribersRequest
1074
+ include ::Google::Protobuf::MessageExts
1075
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1076
+ end
1077
+
1078
+ # Response Message for ListSubscribers.
1079
+ # @!attribute [rw] topic
1080
+ # @return [::String]
1081
+ # Name of the topic registered with the reseller.
1082
+ # @!attribute [rw] service_accounts
1083
+ # @return [::Array<::String>]
1084
+ # List of service accounts which have subscriber access to the topic.
1085
+ # @!attribute [rw] next_page_token
1086
+ # @return [::String]
1087
+ # A token that can be sent as `page_token` to retrieve the next page.
1088
+ # If this field is omitted, there are no subsequent pages.
1089
+ class ListSubscribersResponse
1090
+ include ::Google::Protobuf::MessageExts
1091
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1092
+ end
1010
1093
  end
1011
1094
  end
1012
1095
  end
@@ -0,0 +1,113 @@
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 Channel
23
+ module V1
24
+ # Represents Pub/Sub message content describing customer update.
25
+ # @!attribute [rw] customer
26
+ # @return [::String]
27
+ # Resource name of the customer.
28
+ # Format: accounts/\\{account_id}/customers/\\{customer_id}
29
+ # @!attribute [rw] event_type
30
+ # @return [::Google::Cloud::Channel::V1::CustomerEvent::Type]
31
+ # Type of event which happened on the customer.
32
+ class CustomerEvent
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+
36
+ # Type of customer event.
37
+ module Type
38
+ # Default value. This state doesn't show unless an error occurs.
39
+ TYPE_UNSPECIFIED = 0
40
+ end
41
+ end
42
+
43
+ # Represents Pub/Sub message content describing entitlement update.
44
+ # @!attribute [rw] entitlement
45
+ # @return [::String]
46
+ # Resource name of an entitlement of the form:
47
+ # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id}
48
+ # @!attribute [rw] event_type
49
+ # @return [::Google::Cloud::Channel::V1::EntitlementEvent::Type]
50
+ # Type of event which happened on the entitlement.
51
+ class EntitlementEvent
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # Type of entitlement event.
56
+ module Type
57
+ # Default value. This state doesn't show unless an error occurs.
58
+ TYPE_UNSPECIFIED = 0
59
+
60
+ # A new entitlement was created.
61
+ CREATED = 1
62
+
63
+ # The offer type associated with an entitlement was changed.
64
+ # This is not triggered if an entitlement converts from a commit offer to a
65
+ # flexible offer as part of a renewal.
66
+ PRICE_PLAN_SWITCHED = 3
67
+
68
+ # Annual commitment for a commit plan was changed.
69
+ COMMITMENT_CHANGED = 4
70
+
71
+ # An annual entitlement was renewed.
72
+ RENEWED = 5
73
+
74
+ # Entitlement was suspended.
75
+ SUSPENDED = 6
76
+
77
+ # Entitlement was unsuspended.
78
+ ACTIVATED = 7
79
+
80
+ # Entitlement was cancelled.
81
+ CANCELLED = 8
82
+
83
+ # Entitlement was upgraded or downgraded (e.g. from Google Workspace
84
+ # Business Standard to Google Workspace Business Plus).
85
+ SKU_CHANGED = 9
86
+
87
+ # The renewal settings of an entitlement has changed.
88
+ RENEWAL_SETTING_CHANGED = 10
89
+
90
+ # Paid service has started on trial entitlement.
91
+ PAID_SERVICE_STARTED = 11
92
+
93
+ # License was assigned to or revoked from a user.
94
+ LICENSE_ASSIGNMENT_CHANGED = 12
95
+ end
96
+ end
97
+
98
+ # Represents information which resellers will get as part of notification from
99
+ # Cloud Pub/Sub.
100
+ # @!attribute [rw] customer_event
101
+ # @return [::Google::Cloud::Channel::V1::CustomerEvent]
102
+ # Customer event send as part of Pub/Sub event to partners.
103
+ # @!attribute [rw] entitlement_event
104
+ # @return [::Google::Cloud::Channel::V1::EntitlementEvent]
105
+ # Entitlement event send as part of Pub/Sub event to partners.
106
+ class SubscriberEvent
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-channel-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -181,6 +181,7 @@ files:
181
181
  - lib/google/cloud/channel/v1/products_pb.rb
182
182
  - lib/google/cloud/channel/v1/service_pb.rb
183
183
  - lib/google/cloud/channel/v1/service_services_pb.rb
184
+ - lib/google/cloud/channel/v1/subscriber_event_pb.rb
184
185
  - lib/google/cloud/channel/v1/version.rb
185
186
  - proto_docs/README.md
186
187
  - proto_docs/google/api/field_behavior.rb
@@ -193,6 +194,7 @@ files:
193
194
  - proto_docs/google/cloud/channel/v1/operations.rb
194
195
  - proto_docs/google/cloud/channel/v1/products.rb
195
196
  - proto_docs/google/cloud/channel/v1/service.rb
197
+ - proto_docs/google/cloud/channel/v1/subscriber_event.rb
196
198
  - proto_docs/google/longrunning/operations.rb
197
199
  - proto_docs/google/protobuf/any.rb
198
200
  - proto_docs/google/protobuf/duration.rb