google-cloud-channel-v1 0.19.0 → 0.21.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/channel/v1/channel_partner_links_pb.rb +26 -23
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb +4 -2
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb +3 -1
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb +4 -2
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb +7 -5
- data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb +3 -3
- data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +257 -2
- data/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb +3 -1
- data/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +17 -0
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +203 -2
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb +7 -5
- data/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb +164 -46
- data/lib/google/cloud/channel/v1/common_pb.rb +25 -50
- data/lib/google/cloud/channel/v1/customers_pb.rb +27 -24
- data/lib/google/cloud/channel/v1/entitlement_changes_pb.rb +26 -54
- data/lib/google/cloud/channel/v1/entitlements_pb.rb +28 -73
- data/lib/google/cloud/channel/v1/offers_pb.rb +28 -104
- data/lib/google/cloud/channel/v1/operations_pb.rb +24 -18
- data/lib/google/cloud/channel/v1/products_pb.rb +24 -24
- data/lib/google/cloud/channel/v1/reports_service_pb.rb +29 -94
- data/lib/google/cloud/channel/v1/repricing_pb.rb +27 -52
- data/lib/google/cloud/channel/v1/service_pb.rb +39 -345
- data/lib/google/cloud/channel/v1/service_services_pb.rb +40 -0
- data/lib/google/cloud/channel/v1/subscriber_event_pb.rb +24 -35
- data/lib/google/cloud/channel/v1/version.rb +1 -1
- data/proto_docs/google/cloud/channel/v1/service.rb +112 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -165,7 +165,7 @@ module Google
|
|
165
165
|
credentials = @config.credentials
|
166
166
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
167
167
|
# but only if the default endpoint does not have a region prefix.
|
168
|
-
enable_self_signed_jwt = @config.endpoint ==
|
168
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
169
169
|
!@config.endpoint.split(".").first.include?("-")
|
170
170
|
credentials ||= Credentials.default scope: @config.scope,
|
171
171
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -3584,6 +3584,191 @@ module Google
|
|
3584
3584
|
raise ::Google::Cloud::Error.from_error(e)
|
3585
3585
|
end
|
3586
3586
|
|
3587
|
+
##
|
3588
|
+
# Lists the Rebilling supported SKU groups the account is authorized to
|
3589
|
+
# sell.
|
3590
|
+
# Reference: https://cloud.google.com/skus/sku-groups
|
3591
|
+
#
|
3592
|
+
# Possible Error Codes:
|
3593
|
+
#
|
3594
|
+
# * PERMISSION_DENIED: If the account making the request and the account
|
3595
|
+
# being queried are different, or the account doesn't exist.
|
3596
|
+
# * INTERNAL: Any non-user error related to technical issues in the
|
3597
|
+
# backend. In this case, contact Cloud Channel support.
|
3598
|
+
#
|
3599
|
+
# Return Value:
|
3600
|
+
# If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources.
|
3601
|
+
# The data for each resource is displayed in the alphabetical order of SKU
|
3602
|
+
# group display name.
|
3603
|
+
# The data for each resource is displayed in the ascending order of
|
3604
|
+
# {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name}
|
3605
|
+
#
|
3606
|
+
# If unsuccessful, returns an error.
|
3607
|
+
#
|
3608
|
+
# @overload list_sku_groups(request, options = nil)
|
3609
|
+
# Pass arguments to `list_sku_groups` via a request object, either of type
|
3610
|
+
# {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash.
|
3611
|
+
#
|
3612
|
+
# @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash]
|
3613
|
+
# A request object representing the call parameters. Required. To specify no
|
3614
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3615
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3616
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3617
|
+
#
|
3618
|
+
# @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil)
|
3619
|
+
# Pass arguments to `list_sku_groups` via keyword arguments. Note that at
|
3620
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3621
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3622
|
+
#
|
3623
|
+
# @param parent [::String]
|
3624
|
+
# Required. The resource name of the account from which to list SKU groups.
|
3625
|
+
# Parent uses the format: accounts/\\{account}.
|
3626
|
+
# @param page_size [::Integer]
|
3627
|
+
# Optional. The maximum number of SKU groups to return. The service may
|
3628
|
+
# return fewer than this value. If unspecified, returns a maximum of 1000 SKU
|
3629
|
+
# groups. The maximum value is 1000; values above 1000 will be coerced to
|
3630
|
+
# 1000.
|
3631
|
+
# @param page_token [::String]
|
3632
|
+
# Optional. A token identifying a page of results beyond the first page.
|
3633
|
+
# Obtained through
|
3634
|
+
# [ListSkuGroups.next_page_token][] of the previous
|
3635
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_groups CloudChannelService.ListSkuGroups}
|
3636
|
+
# call.
|
3637
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3638
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>]
|
3639
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3640
|
+
#
|
3641
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>]
|
3642
|
+
#
|
3643
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3644
|
+
def list_sku_groups request, options = nil
|
3645
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3646
|
+
|
3647
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest
|
3648
|
+
|
3649
|
+
# Converts hash and nil to an options object
|
3650
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3651
|
+
|
3652
|
+
# Customize the options with defaults
|
3653
|
+
call_metadata = @config.rpcs.list_sku_groups.metadata.to_h
|
3654
|
+
|
3655
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3656
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3657
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3658
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION,
|
3659
|
+
transports_version_send: [:rest]
|
3660
|
+
|
3661
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3662
|
+
|
3663
|
+
options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout,
|
3664
|
+
metadata: call_metadata,
|
3665
|
+
retry_policy: @config.rpcs.list_sku_groups.retry_policy
|
3666
|
+
|
3667
|
+
options.apply_defaults timeout: @config.timeout,
|
3668
|
+
metadata: @config.metadata,
|
3669
|
+
retry_policy: @config.retry_policy
|
3670
|
+
|
3671
|
+
@cloud_channel_service_stub.list_sku_groups request, options do |result, operation|
|
3672
|
+
result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, "sku_groups", request, result, options
|
3673
|
+
yield result, operation if block_given?
|
3674
|
+
return result
|
3675
|
+
end
|
3676
|
+
rescue ::Gapic::Rest::Error => e
|
3677
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3678
|
+
end
|
3679
|
+
|
3680
|
+
##
|
3681
|
+
# Lists the Billable SKUs in a given SKU group.
|
3682
|
+
#
|
3683
|
+
# Possible error codes:
|
3684
|
+
# PERMISSION_DENIED: If the account making the request and the account
|
3685
|
+
# being queried for are different, or the account doesn't exist.
|
3686
|
+
# INVALID_ARGUMENT: Missing or invalid required parameters in the
|
3687
|
+
# request.
|
3688
|
+
# INTERNAL: Any non-user error related to technical issue in the
|
3689
|
+
# backend. In this case, contact cloud channel support.
|
3690
|
+
#
|
3691
|
+
# Return Value:
|
3692
|
+
# If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku}
|
3693
|
+
# resources. The data for each resource is displayed in the ascending order
|
3694
|
+
# of:
|
3695
|
+
#
|
3696
|
+
# * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name}
|
3697
|
+
# * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name}
|
3698
|
+
#
|
3699
|
+
# If unsuccessful, returns an error.
|
3700
|
+
#
|
3701
|
+
# @overload list_sku_group_billable_skus(request, options = nil)
|
3702
|
+
# Pass arguments to `list_sku_group_billable_skus` via a request object, either of type
|
3703
|
+
# {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash.
|
3704
|
+
#
|
3705
|
+
# @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash]
|
3706
|
+
# A request object representing the call parameters. Required. To specify no
|
3707
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3708
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3709
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3710
|
+
#
|
3711
|
+
# @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil)
|
3712
|
+
# Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at
|
3713
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3714
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3715
|
+
#
|
3716
|
+
# @param parent [::String]
|
3717
|
+
# Required. Resource name of the SKU group.
|
3718
|
+
# Format: accounts/\\{account}/skuGroups/\\{sku_group}.
|
3719
|
+
# @param page_size [::Integer]
|
3720
|
+
# Optional. The maximum number of SKUs to return. The service may return
|
3721
|
+
# fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
|
3722
|
+
# The maximum value is 100000; values above 100000 will be coerced to 100000.
|
3723
|
+
# @param page_token [::String]
|
3724
|
+
# Optional. A token identifying a page of results beyond the first page.
|
3725
|
+
# Obtained through
|
3726
|
+
# [ListSkuGroupBillableSkus.next_page_token][] of the previous
|
3727
|
+
# {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus}
|
3728
|
+
# call.
|
3729
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3730
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>]
|
3731
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3732
|
+
#
|
3733
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>]
|
3734
|
+
#
|
3735
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3736
|
+
def list_sku_group_billable_skus request, options = nil
|
3737
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3738
|
+
|
3739
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest
|
3740
|
+
|
3741
|
+
# Converts hash and nil to an options object
|
3742
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3743
|
+
|
3744
|
+
# Customize the options with defaults
|
3745
|
+
call_metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h
|
3746
|
+
|
3747
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
3748
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3749
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3750
|
+
gapic_version: ::Google::Cloud::Channel::V1::VERSION,
|
3751
|
+
transports_version_send: [:rest]
|
3752
|
+
|
3753
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3754
|
+
|
3755
|
+
options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout,
|
3756
|
+
metadata: call_metadata,
|
3757
|
+
retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy
|
3758
|
+
|
3759
|
+
options.apply_defaults timeout: @config.timeout,
|
3760
|
+
metadata: @config.metadata,
|
3761
|
+
retry_policy: @config.retry_policy
|
3762
|
+
|
3763
|
+
@cloud_channel_service_stub.list_sku_group_billable_skus request, options do |result, operation|
|
3764
|
+
result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, "billable_skus", request, result, options
|
3765
|
+
yield result, operation if block_given?
|
3766
|
+
return result
|
3767
|
+
end
|
3768
|
+
rescue ::Gapic::Rest::Error => e
|
3769
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3770
|
+
end
|
3771
|
+
|
3587
3772
|
##
|
3588
3773
|
# Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource.
|
3589
3774
|
#
|
@@ -4507,7 +4692,9 @@ module Google
|
|
4507
4692
|
class Configuration
|
4508
4693
|
extend ::Gapic::Config
|
4509
4694
|
|
4510
|
-
|
4695
|
+
DEFAULT_ENDPOINT = "cloudchannel.googleapis.com"
|
4696
|
+
|
4697
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
4511
4698
|
config_attr :credentials, nil do |value|
|
4512
4699
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
4513
4700
|
allowed.any? { |klass| klass === value }
|
@@ -4738,6 +4925,16 @@ module Google
|
|
4738
4925
|
#
|
4739
4926
|
attr_reader :delete_channel_partner_repricing_config
|
4740
4927
|
##
|
4928
|
+
# RPC-specific configuration for `list_sku_groups`
|
4929
|
+
# @return [::Gapic::Config::Method]
|
4930
|
+
#
|
4931
|
+
attr_reader :list_sku_groups
|
4932
|
+
##
|
4933
|
+
# RPC-specific configuration for `list_sku_group_billable_skus`
|
4934
|
+
# @return [::Gapic::Config::Method]
|
4935
|
+
#
|
4936
|
+
attr_reader :list_sku_group_billable_skus
|
4937
|
+
##
|
4741
4938
|
# RPC-specific configuration for `lookup_offer`
|
4742
4939
|
# @return [::Gapic::Config::Method]
|
4743
4940
|
#
|
@@ -4862,6 +5059,10 @@ module Google
|
|
4862
5059
|
@update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config
|
4863
5060
|
delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config
|
4864
5061
|
@delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config
|
5062
|
+
list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups
|
5063
|
+
@list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config
|
5064
|
+
list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus
|
5065
|
+
@list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config
|
4865
5066
|
lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer
|
4866
5067
|
@lookup_offer = ::Gapic::Config::Method.new lookup_offer_config
|
4867
5068
|
list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
|
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "cloudchannel.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|