google-cloud-scheduler 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/scheduler.rb +3 -3
  4. data/lib/google/cloud/scheduler/v1.rb +139 -0
  5. data/lib/google/cloud/scheduler/v1/cloud_scheduler_client.rb +612 -0
  6. data/lib/google/cloud/scheduler/v1/cloud_scheduler_client_config.json +66 -0
  7. data/lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb +62 -0
  8. data/lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb +84 -0
  9. data/lib/google/cloud/scheduler/v1/credentials.rb +41 -0
  10. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/cloudscheduler.rb +142 -0
  11. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/job.rb +207 -0
  12. data/lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/target.rb +286 -0
  13. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/any.rb +130 -0
  14. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/duration.rb +91 -0
  15. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/empty.rb +29 -0
  16. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/field_mask.rb +230 -0
  17. data/lib/google/cloud/scheduler/v1/doc/google/protobuf/timestamp.rb +109 -0
  18. data/lib/google/cloud/scheduler/v1/doc/google/rpc/status.rb +87 -0
  19. data/lib/google/cloud/scheduler/v1/helpers.rb +48 -0
  20. data/lib/google/cloud/scheduler/v1/job_pb.rb +56 -0
  21. data/lib/google/cloud/scheduler/v1/target_pb.rb +58 -0
  22. data/lib/google/cloud/scheduler/v1beta1.rb +1 -1
  23. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client.rb +28 -16
  24. data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_services_pb.rb +23 -13
  25. data/lib/google/cloud/scheduler/v1beta1/credentials.rb +1 -1
  26. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/cloudscheduler.rb +31 -18
  27. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/job.rb +37 -25
  28. data/lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/target.rb +62 -42
  29. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/any.rb +1 -1
  30. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/duration.rb +1 -1
  31. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/empty.rb +1 -1
  32. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/field_mask.rb +1 -1
  33. data/lib/google/cloud/scheduler/v1beta1/doc/google/protobuf/timestamp.rb +1 -1
  34. data/lib/google/cloud/scheduler/v1beta1/doc/google/rpc/status.rb +18 -15
  35. data/lib/google/cloud/scheduler/v1beta1/helpers.rb +7 -7
  36. metadata +23 -5
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -18,8 +18,9 @@ module Google
18
18
  module Scheduler
19
19
  module V1beta1
20
20
  # Http target. The job will be pushed to the job handler by means of
21
- # an HTTP request via an {Google::Cloud::Scheduler::V1beta1::HttpTarget#http_method http_method} such as HTTP
22
- # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
21
+ # an HTTP request via an
22
+ # {Google::Cloud::Scheduler::V1beta1::HttpTarget#http_method http_method} such as
23
+ # HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
23
24
  # response code in the range [200 - 299]. A failure to receive a response
24
25
  # constitutes a failed execution. For a redirected request, the response
25
26
  # returned by the redirected request is considered.
@@ -61,14 +62,14 @@ module Google
61
62
  class HttpTarget; end
62
63
 
63
64
  # App Engine target. The job will be pushed to a job handler by means
64
- # of an HTTP request via an {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#http_method http_method} such
65
- # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
66
- # HTTP response code in the range [200 - 299]. Error 503 is
67
- # considered an App Engine system error instead of an application
68
- # error. Requests returning error 503 will be retried regardless of
69
- # retry configuration and not counted against retry counts. Any other
70
- # response code, or a failure to receive a response before the
71
- # deadline, constitutes a failed attempt.
65
+ # of an HTTP request via an
66
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#http_method http_method}
67
+ # such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
68
+ # response code in the range [200 - 299]. Error 503 is considered an App Engine
69
+ # system error instead of an application error. Requests returning error 503
70
+ # will be retried regardless of retry configuration and not counted against
71
+ # retry counts. Any other response code, or a failure to receive a response
72
+ # before the deadline, constitutes a failed attempt.
72
73
  # @!attribute [rw] http_method
73
74
  # @return [Google::Cloud::Scheduler::V1beta1::HttpMethod]
74
75
  # The HTTP method to use for the request. PATCH and OPTIONS are not
@@ -99,8 +100,9 @@ module Google
99
100
  # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
100
101
  # modified `User-Agent`.
101
102
  #
102
- # If the job has an {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#body body}, Cloud Scheduler sets the
103
- # following headers:
103
+ # If the job has an
104
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#body body}, Cloud
105
+ # Scheduler sets the following headers:
104
106
  #
105
107
  # * `Content-Type`: By default, the `Content-Type` header is set to
106
108
  # `"application/octet-stream"`. The default can be overridden by explictly
@@ -114,18 +116,21 @@ module Google
114
116
  #
115
117
  # * `X-Google-*`: For Google internal use only.
116
118
  # * `X-AppEngine-*`: For Google internal use only. See
117
- # [Reading request headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
119
+ # [Reading request
120
+ # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
118
121
  #
119
122
  # In addition, some App Engine headers, which contain
120
123
  # job-specific information, are also be sent to the job handler; see
121
- # [request headers](https://cloud.google.comappengine/docs/standard/python/config/cron#securing_urls_for_cron).
124
+ # [request
125
+ # headers](https://cloud.google.com/appengine/docs/standard/python/config/cron#securing_urls_for_cron).
122
126
  # @!attribute [rw] body
123
127
  # @return [String]
124
128
  # Body.
125
129
  #
126
130
  # HTTP request body. A request body is allowed only if the HTTP method is
127
131
  # POST or PUT. It will result in invalid argument error to set a body on a
128
- # job with an incompatible {Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
132
+ # job with an incompatible
133
+ # {Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
129
134
  class AppEngineHttpTarget; end
130
135
 
131
136
  # Pub/Sub target. The job will be delivered by publishing a message to
@@ -158,10 +163,14 @@ module Google
158
163
  # App Engine Routing.
159
164
  #
160
165
  # For more information about services, versions, and instances see
161
- # [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
162
- # [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
163
- # [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and
164
- # [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
166
+ # [An Overview of App
167
+ # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
168
+ # [Microservices Architecture on Google App
169
+ # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
170
+ # [App Engine Standard request
171
+ # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
172
+ # and [App Engine Flex request
173
+ # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
165
174
  # @!attribute [rw] service
166
175
  # @return [String]
167
176
  # App service.
@@ -182,10 +191,13 @@ module Google
182
191
  # the job is attempted.
183
192
  #
184
193
  # Requests can only be sent to a specific instance if
185
- # [manual scaling is used in App Engine Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
194
+ # [manual scaling is used in App Engine
195
+ # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
186
196
  # App Engine Flex does not support instances. For more information, see
187
- # [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) and
188
- # [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
197
+ # [App Engine Standard request
198
+ # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
199
+ # and [App Engine Flex request
200
+ # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
189
201
  # @!attribute [rw] host
190
202
  # @return [String]
191
203
  # Output only. The host that the job is sent to.
@@ -209,43 +221,51 @@ module Google
209
221
  # example <app-id>.appspot.com, which is associated with the
210
222
  # job's project ID.
211
223
  #
212
- # * `service =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
224
+ # * `service =`
225
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
213
226
  #
214
- # * `version =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
227
+ # * `version =`
228
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
215
229
  #
216
230
  # * `version_dot_service =`
217
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
218
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
231
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.'
232
+ # +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
219
233
  #
220
- # * `instance =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance}
234
+ # * `instance =`
235
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance}
221
236
  #
222
237
  # * `instance_dot_service =`
223
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
224
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
238
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
239
+ # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
225
240
  #
226
241
  # * `instance_dot_version =`
227
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
228
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
242
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
243
+ # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
229
244
  #
230
245
  # * `instance_dot_version_dot_service =`
231
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
232
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
246
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
247
+ # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
248
+ # `+ '.' +`
233
249
  # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
234
250
  #
235
251
  #
236
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service} is empty, then the job will be sent
237
- # to the service which is the default service when the job is attempted.
252
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service} is
253
+ # empty, then the job will be sent to the service which is the default
254
+ # service when the job is attempted.
238
255
  #
239
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} is empty, then the job will be sent
240
- # to the version which is the default version when the job is attempted.
256
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} is
257
+ # empty, then the job will be sent to the version which is the default
258
+ # version when the job is attempted.
241
259
  #
242
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is empty, then the job will be
243
- # sent to an instance which is available when the job is attempted.
260
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is
261
+ # empty, then the job will be sent to an instance which is available when the
262
+ # job is attempted.
244
263
  #
245
264
  # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service},
246
265
  # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}, or
247
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is invalid, then the job will be sent
248
- # to the default version of the default service when the job is attempted.
266
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is
267
+ # invalid, then the job will be sent to the default version of the default
268
+ # service when the job is attempted.
249
269
  class AppEngineRouting; end
250
270
 
251
271
  # The HTTP method used to execute the job.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,24 +15,25 @@
15
15
 
16
16
  module Google
17
17
  module Rpc
18
- # The `Status` type defines a logical error model that is suitable for different
19
- # programming environments, including REST APIs and RPC APIs. It is used by
20
- # [gRPC](https://github.com/grpc). The error model is designed to be:
18
+ # The `Status` type defines a logical error model that is suitable for
19
+ # different programming environments, including REST APIs and RPC APIs. It is
20
+ # used by [gRPC](https://github.com/grpc). The error model is designed to be:
21
21
  #
22
22
  # * Simple to use and understand for most users
23
23
  # * Flexible enough to meet unexpected needs
24
24
  #
25
25
  # = Overview
26
26
  #
27
- # The `Status` message contains three pieces of data: error code, error message,
28
- # and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes if needed. The
30
- # error message should be a developer-facing English message that helps
31
- # developers *understand* and *resolve* the error. If a localized user-facing
32
- # error message is needed, put the localized message in the error details or
33
- # localize it in the client. The optional error details may contain arbitrary
34
- # information about the error. There is a predefined set of error detail types
35
- # in the package `google.rpc` that can be used for common error conditions.
27
+ # The `Status` message contains three pieces of data: error code, error
28
+ # message, and error details. The error code should be an enum value of
29
+ # {Google::Rpc::Code}, but it may accept additional error codes
30
+ # if needed. The error message should be a developer-facing English message
31
+ # that helps developers *understand* and *resolve* the error. If a localized
32
+ # user-facing error message is needed, put the localized message in the error
33
+ # details or localize it in the client. The optional error details may contain
34
+ # arbitrary information about the error. There is a predefined set of error
35
+ # detail types in the package `google.rpc` that can be used for common error
36
+ # conditions.
36
37
  #
37
38
  # = Language mapping
38
39
  #
@@ -69,12 +70,14 @@ module Google
69
70
  # be used directly after any stripping needed for security/privacy reasons.
70
71
  # @!attribute [rw] code
71
72
  # @return [Integer]
72
- # The status code, which should be an enum value of {Google::Rpc::Code}.
73
+ # The status code, which should be an enum value of
74
+ # {Google::Rpc::Code}.
73
75
  # @!attribute [rw] message
74
76
  # @return [String]
75
77
  # A developer-facing error message, which should be in English. Any
76
78
  # user-facing error message should be localized and sent in the
77
- # {Google::Rpc::Status#details} field, or localized by the client.
79
+ # {Google::Rpc::Status#details} field, or localized
80
+ # by the client.
78
81
  # @!attribute [rw] details
79
82
  # @return [Array<Google::Protobuf::Any>]
80
83
  # A list of messages that carry the error details. There is a common set of
@@ -27,13 +27,6 @@ module Google
27
27
  self.class.job_path project, location, job
28
28
  end
29
29
 
30
- # Alias for Google::Cloud::Scheduler::V1beta1::CloudSchedulerClient.project_path.
31
- # @param project [String]
32
- # @return [String]
33
- def project_path project
34
- self.class.project_path project
35
- end
36
-
37
30
  # Alias for Google::Cloud::Scheduler::V1beta1::CloudSchedulerClient.location_path.
38
31
  # @param project [String]
39
32
  # @param location [String]
@@ -41,6 +34,13 @@ module Google
41
34
  def location_path project, location
42
35
  self.class.location_path project, location
43
36
  end
37
+
38
+ # Alias for Google::Cloud::Scheduler::V1beta1::CloudSchedulerClient.project_path.
39
+ # @param project [String]
40
+ # @return [String]
41
+ def project_path project
42
+ self.class.project_path project
43
+ end
44
44
  end
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.59.2
61
+ version: 0.64.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.59.2
68
+ version: 0.64.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +104,24 @@ files:
104
104
  - LICENSE
105
105
  - README.md
106
106
  - lib/google/cloud/scheduler.rb
107
+ - lib/google/cloud/scheduler/v1.rb
108
+ - lib/google/cloud/scheduler/v1/cloud_scheduler_client.rb
109
+ - lib/google/cloud/scheduler/v1/cloud_scheduler_client_config.json
110
+ - lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb
111
+ - lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb
112
+ - lib/google/cloud/scheduler/v1/credentials.rb
113
+ - lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/cloudscheduler.rb
114
+ - lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/job.rb
115
+ - lib/google/cloud/scheduler/v1/doc/google/cloud/scheduler/v1/target.rb
116
+ - lib/google/cloud/scheduler/v1/doc/google/protobuf/any.rb
117
+ - lib/google/cloud/scheduler/v1/doc/google/protobuf/duration.rb
118
+ - lib/google/cloud/scheduler/v1/doc/google/protobuf/empty.rb
119
+ - lib/google/cloud/scheduler/v1/doc/google/protobuf/field_mask.rb
120
+ - lib/google/cloud/scheduler/v1/doc/google/protobuf/timestamp.rb
121
+ - lib/google/cloud/scheduler/v1/doc/google/rpc/status.rb
122
+ - lib/google/cloud/scheduler/v1/helpers.rb
123
+ - lib/google/cloud/scheduler/v1/job_pb.rb
124
+ - lib/google/cloud/scheduler/v1/target_pb.rb
107
125
  - lib/google/cloud/scheduler/v1beta1.rb
108
126
  - lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client.rb
109
127
  - lib/google/cloud/scheduler/v1beta1/cloud_scheduler_client_config.json
@@ -142,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
160
  version: '0'
143
161
  requirements: []
144
162
  rubyforge_project:
145
- rubygems_version: 2.7.7
163
+ rubygems_version: 2.7.6
146
164
  signing_key:
147
165
  specification_version: 4
148
166
  summary: API Client library for Cloud Scheduler API