google-cloud-channel 1.2.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd6d2c47463996bfaa6867fe6957d4bfca94860ec493f66c9a0c326bd882ae5e
4
- data.tar.gz: 1c2b9b7fe67402712546075a738062686ffaca588f7cb52f73b17929c0ace823
3
+ metadata.gz: 8bf1e03ac4e18a64b54dfaaf6490b4b3b06f5da933cd9cea34ce3017f99876f2
4
+ data.tar.gz: 73b671a07910592f30c77ccda520e00cfcbd43466a2960404a7194de5379d629
5
5
  SHA512:
6
- metadata.gz: 5a0d435bc2985885bdbeadb7eb47d25e1e82a448878d08cde1f89083d11ffd118f8c351b8da5bf41e247bdead0e56edaa9ab9b80468fb911cba2282e8210f679
7
- data.tar.gz: 3820cffff9b0a3779fad7dd0417c48edf7ff23e788e83e2d7d96b03e4f0c33d8b01f2b942e32b95f6be225253873445f0e61ea6a37888155ba4942c7122b8a2c
6
+ metadata.gz: 594b8979f5b68460faae440b0866c12bffad3ae94ee9a6e00904f8f72c00b783d47d00b142d397cba15f203985aef3bcb6c8ad6033100e1e46d0c8277a8da7a0
7
+ data.tar.gz: 075b542ac44bd62279838042dc147b81bde7c04e6644832e6082f9aad558b3533e5372a880a5b33a269aad77ec1669b59bef0a7c4de82eaf3229365b8543cd8c
data/README.md CHANGED
@@ -34,32 +34,6 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudchannel.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Channel
23
- VERSION = "1.2.0"
23
+ VERSION = "1.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Channel::V1::CloudChannelReportsService::Client](https://googleapis.dev/ruby/google-cloud-channel-v1/latest/Google/Cloud/Channel/V1/CloudChannelReportsService/Client.html)
52
- # for version V1 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the CloudChannelReportsService service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About CloudChannelReportsService
59
61
  #
@@ -64,17 +66,19 @@ module Google
64
66
  #
65
67
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
66
68
  # Defaults to `:v1`.
67
- # @return [CloudChannelReportsService::Client] A client object for the specified version.
69
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
70
+ # @return [::Object] A client object for the specified version.
68
71
  #
69
- def self.cloud_channel_reports_service version: :v1, &block
72
+ def self.cloud_channel_reports_service version: :v1, transport: :grpc, &block
70
73
  require "google/cloud/channel/#{version.to_s.downcase}"
71
74
 
72
75
  package_name = Google::Cloud::Channel
73
76
  .constants
74
77
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
75
78
  .first
76
- package_module = Google::Cloud::Channel.const_get package_name
77
- package_module.const_get(:CloudChannelReportsService).const_get(:Client).new(&block)
79
+ service_module = Google::Cloud::Channel.const_get(package_name).const_get(:CloudChannelReportsService)
80
+ service_module = service_module.const_get(:Rest) if transport == :rest
81
+ service_module.const_get(:Client).new(&block)
78
82
  end
79
83
 
80
84
  ##
@@ -82,11 +86,13 @@ module Google
82
86
  #
83
87
  # By default, this returns an instance of
84
88
  # [Google::Cloud::Channel::V1::CloudChannelService::Client](https://googleapis.dev/ruby/google-cloud-channel-v1/latest/Google/Cloud/Channel/V1/CloudChannelService/Client.html)
85
- # for version V1 of the API.
86
- # However, you can specify specify a different API version by passing it in the
89
+ # for a gRPC client for version V1 of the API.
90
+ # However, you can specify a different API version by passing it in the
87
91
  # `version` parameter. If the CloudChannelService service is
88
92
  # supported by that API version, and the corresponding gem is available, the
89
93
  # appropriate versioned client will be returned.
94
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
95
+ # the `transport` parameter.
90
96
  #
91
97
  # ## About CloudChannelService
92
98
  #
@@ -100,29 +106,32 @@ module Google
100
106
  # 3. Resellers and distributors can manage customer entitlements.
101
107
  #
102
108
  # CloudChannelService exposes the following resources:
103
- # - Customers: An entityusually an enterprise—managed by a reseller or
104
- # distributor.
109
+ # - Customers: An entity-usually an
110
+ # enterprise-managed by a reseller or distributor.
105
111
  #
106
- # - Entitlements: An entity that provides a customer with the means to use
107
- # a service. Entitlements are created or updated as a result of a successful
108
- # fulfillment.
112
+ # - Entitlements: An entity that
113
+ # provides a customer with the means to use a service. Entitlements are created
114
+ # or updated as a result of a successful fulfillment.
109
115
  #
110
- # - ChannelPartnerLinks: An entity that identifies links between
111
- # distributors and their indirect resellers in a channel.
116
+ # - ChannelPartnerLinks: An
117
+ # entity that identifies links between distributors and their indirect
118
+ # resellers in a channel.
112
119
  #
113
120
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
114
121
  # Defaults to `:v1`.
115
- # @return [CloudChannelService::Client] A client object for the specified version.
122
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
123
+ # @return [::Object] A client object for the specified version.
116
124
  #
117
- def self.cloud_channel_service version: :v1, &block
125
+ def self.cloud_channel_service version: :v1, transport: :grpc, &block
118
126
  require "google/cloud/channel/#{version.to_s.downcase}"
119
127
 
120
128
  package_name = Google::Cloud::Channel
121
129
  .constants
122
130
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
123
131
  .first
124
- package_module = Google::Cloud::Channel.const_get package_name
125
- package_module.const_get(:CloudChannelService).const_get(:Client).new(&block)
132
+ service_module = Google::Cloud::Channel.const_get(package_name).const_get(:CloudChannelService)
133
+ service_module = service_module.const_get(:Rest) if transport == :rest
134
+ service_module.const_get(:Client).new(&block)
126
135
  end
127
136
 
128
137
  ##
@@ -142,7 +151,7 @@ module Google
142
151
  # * `timeout` (*type:* `Numeric`) -
143
152
  # Default timeout in seconds.
144
153
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
145
- # Additional gRPC headers to be sent with the call.
154
+ # Additional headers to be sent with the call.
146
155
  # * `retry_policy` (*type:* `Hash`) -
147
156
  # The retry policy. The value is a hash with the following keys:
148
157
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-channel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.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: 2022-10-24 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-channel-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.13'
19
+ version: '0.16'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.13'
29
+ version: '0.16'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.3.14
193
+ rubygems_version: 3.4.2
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API Client library for the Cloud Channel API