Skip to content

Commit d6a0248

Browse files
Generate Tasks v2beta3 (#2529)
1 parent b29a0db commit d6a0248

26 files changed

Lines changed: 5209 additions & 11 deletions

google-cloud-tasks/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Release History
22

3+
### 0.2.5 / 2018-10-18
4+
5+
* Release v2beta3.
6+
37
### 0.2.4 / 2018-09-20
48

59
* Update documentation.
6-
* Change documentation URL to googleapis GitHub org.
10+
* Change documentation URL to googleapis GitHub org.
711

812
### 0.2.3 / 2018-09-10
913

google-cloud-tasks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $ gem install google-cloud-tasks
2727
- View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
2828
to see the full list of Cloud APIs that we cover.
2929

30-
[Client Library Documentation]: https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-tasks/latest/google/cloud/tasks/v2beta2
30+
[Client Library Documentation]: https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-tasks/latest/google/cloud/tasks/v2beta3
3131
[Product Documentation]: https://cloud.google.com/tasks
3232

3333
## Enabling Logging

google-cloud-tasks/lib/google/cloud/tasks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module Tasks
9191
# work in their applications.
9292
#
9393
# @param version [Symbol, String]
94-
# The major version of the service to be used. By default :v2beta2
94+
# The major version of the service to be used. By default :v2beta3
9595
# is used.
9696
# @overload new(version:, credentials:, scopes:, client_config:, timeout:)
9797
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
@@ -123,7 +123,7 @@ module Tasks
123123
# @param exception_transformer [Proc]
124124
# An optional proc that intercepts any exceptions raised during an API call to inject
125125
# custom error handling.
126-
def self.new(*args, version: :v2beta2, **kwargs)
126+
def self.new(*args, version: :v2beta3, **kwargs)
127127
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
128128
raise "The version: #{version} is not available. The available versions " \
129129
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
require "google/cloud/tasks/v2beta3/cloud_tasks_client"
17+
18+
module Google
19+
module Cloud
20+
module Tasks
21+
# rubocop:disable LineLength
22+
23+
##
24+
# # Ruby Client for Cloud Tasks API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
25+
#
26+
# [Cloud Tasks API][Product Documentation]:
27+
# Manages the execution of large numbers of distributed requests.
28+
# - [Product Documentation][]
29+
#
30+
# ## Quick Start
31+
# In order to use this library, you first need to go through the following
32+
# steps:
33+
#
34+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
35+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
36+
# 3. [Enable the Cloud Tasks API.](https://console.cloud.google.com/apis/library/tasks.googleapis.com)
37+
# 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
38+
#
39+
# ### Installation
40+
# ```
41+
# $ gem install google-cloud-tasks
42+
# ```
43+
#
44+
# ### Next Steps
45+
# - Read the [Cloud Tasks API Product documentation][Product Documentation]
46+
# to learn more about the product and see How-to Guides.
47+
# - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
48+
# to see the full list of Cloud APIs that we cover.
49+
#
50+
# [Product Documentation]: https://cloud.google.com/tasks
51+
#
52+
# ## Enabling Logging
53+
#
54+
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
55+
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
56+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
57+
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
58+
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
59+
#
60+
# Configuring a Ruby stdlib logger:
61+
#
62+
# ```ruby
63+
# require "logger"
64+
#
65+
# module MyLogger
66+
# LOGGER = Logger.new $stderr, level: Logger::WARN
67+
# def logger
68+
# LOGGER
69+
# end
70+
# end
71+
#
72+
# # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
73+
# module GRPC
74+
# extend MyLogger
75+
# end
76+
# ```
77+
#
78+
module V2beta3
79+
# rubocop:enable LineLength
80+
81+
##
82+
# Cloud Tasks allows developers to manage the execution of background
83+
# work in their applications.
84+
#
85+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
86+
# Provides the means for authenticating requests made by the client. This parameter can
87+
# be many types.
88+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
89+
# authenticating requests made by this client.
90+
# A `String` will be treated as the path to the keyfile to be used for the construction of
91+
# credentials for this client.
92+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
93+
# credentials for this client.
94+
# A `GRPC::Core::Channel` will be used to make calls through.
95+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
96+
# should already be composed with a `GRPC::Core::CallCredentials` object.
97+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
98+
# metadata for requests, generally, to give OAuth credentials.
99+
# @param scopes [Array<String>]
100+
# The OAuth scopes for this service. This parameter is ignored if
101+
# an updater_proc is supplied.
102+
# @param client_config [Hash]
103+
# A Hash for call options for each method. See
104+
# Google::Gax#construct_settings for the structure of
105+
# this data. Falls back to the default config if not specified
106+
# or the specified config is missing data points.
107+
# @param timeout [Numeric]
108+
# The default timeout, in seconds, for calls made through this client.
109+
# @param metadata [Hash]
110+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
111+
# @param exception_transformer [Proc]
112+
# An optional proc that intercepts any exceptions raised during an API call to inject
113+
# custom error handling.
114+
def self.new \
115+
credentials: nil,
116+
scopes: nil,
117+
client_config: nil,
118+
timeout: nil,
119+
metadata: nil,
120+
exception_transformer: nil,
121+
lib_name: nil,
122+
lib_version: nil
123+
kwargs = {
124+
credentials: credentials,
125+
scopes: scopes,
126+
client_config: client_config,
127+
timeout: timeout,
128+
metadata: metadata,
129+
exception_transformer: exception_transformer,
130+
lib_name: lib_name,
131+
lib_version: lib_version
132+
}.select { |_, v| v != nil }
133+
Google::Cloud::Tasks::V2beta3::CloudTasksClient.new(**kwargs)
134+
end
135+
end
136+
end
137+
end
138+
end

0 commit comments

Comments
 (0)