google-cloud-scheduler-v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +71 -0
  6. data/lib/google-cloud-scheduler-v1beta1.rb +21 -0
  7. data/lib/google/cloud/common_resources_pb.rb +15 -0
  8. data/lib/google/cloud/scheduler/v1beta1.rb +35 -0
  9. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler.rb +50 -0
  10. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler/client.rb +978 -0
  11. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler/credentials.rb +51 -0
  12. data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler/paths.rb +86 -0
  13. data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_pb.rb +66 -0
  14. data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_services_pb.rb +83 -0
  15. data/lib/google/cloud/scheduler/v1beta1/job_pb.rb +59 -0
  16. data/lib/google/cloud/scheduler/v1beta1/target_pb.rb +73 -0
  17. data/lib/google/cloud/scheduler/v1beta1/version.rb +28 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/field_behavior.rb +59 -0
  20. data/proto_docs/google/api/resource.rb +247 -0
  21. data/proto_docs/google/cloud/scheduler/v1beta1/cloudscheduler.rb +155 -0
  22. data/proto_docs/google/cloud/scheduler/v1beta1/job.rb +231 -0
  23. data/proto_docs/google/cloud/scheduler/v1beta1/target.rb +385 -0
  24. data/proto_docs/google/protobuf/any.rb +138 -0
  25. data/proto_docs/google/protobuf/duration.rb +98 -0
  26. data/proto_docs/google/protobuf/empty.rb +36 -0
  27. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  28. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  29. data/proto_docs/google/rpc/status.rb +46 -0
  30. metadata +187 -0
@@ -0,0 +1,231 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Scheduler
23
+ module V1beta1
24
+ # Configuration for a job.
25
+ # The maximum allowed size for a job is 100KB.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Optionally caller-specified in {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#create_job CreateJob}, after
29
+ # which it becomes output only.
30
+ #
31
+ # The job name. For example:
32
+ # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
33
+ #
34
+ # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
35
+ # hyphens (-), colons (:), or periods (.).
36
+ # For more information, see
37
+ # [Identifying
38
+ # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
39
+ # * `LOCATION_ID` is the canonical ID for the job's location.
40
+ # The list of available locations can be obtained by calling
41
+ # [ListLocations][google.cloud.location.Locations.ListLocations].
42
+ # For more information, see https://cloud.google.com/about/locations/.
43
+ # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
44
+ # hyphens (-), or underscores (_). The maximum length is 500 characters.
45
+ # @!attribute [rw] description
46
+ # @return [::String]
47
+ # Optionally caller-specified in {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#create_job CreateJob} or
48
+ # {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#update_job UpdateJob}.
49
+ #
50
+ # A human-readable description for the job. This string must not contain
51
+ # more than 500 characters.
52
+ # @!attribute [rw] pubsub_target
53
+ # @return [::Google::Cloud::Scheduler::V1beta1::PubsubTarget]
54
+ # Pub/Sub target.
55
+ # @!attribute [rw] app_engine_http_target
56
+ # @return [::Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget]
57
+ # App Engine HTTP target.
58
+ # @!attribute [rw] http_target
59
+ # @return [::Google::Cloud::Scheduler::V1beta1::HttpTarget]
60
+ # HTTP target.
61
+ # @!attribute [rw] schedule
62
+ # @return [::String]
63
+ # Required, except when used with {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#update_job UpdateJob}.
64
+ #
65
+ # Describes the schedule on which the job will be executed.
66
+ #
67
+ # The schedule can be either of the following types:
68
+ #
69
+ # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
70
+ # * English-like
71
+ # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
72
+ #
73
+ # As a general rule, execution `n + 1` of a job will not begin
74
+ # until execution `n` has finished. Cloud Scheduler will never
75
+ # allow two simultaneously outstanding executions. For example,
76
+ # this implies that if the `n+1`th execution is scheduled to run at
77
+ # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
78
+ # execution will not start until `16:15`.
79
+ # A scheduled start time will be delayed if the previous
80
+ # execution has not ended when its scheduled time occurs.
81
+ #
82
+ # If {::Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count} > 0 and a job attempt fails,
83
+ # the job will be tried a total of {::Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}
84
+ # times, with exponential backoff, until the next scheduled start
85
+ # time.
86
+ # @!attribute [rw] time_zone
87
+ # @return [::String]
88
+ # Specifies the time zone to be used in interpreting
89
+ # {::Google::Cloud::Scheduler::V1beta1::Job#schedule schedule}. The value of this field must be a time
90
+ # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
91
+ #
92
+ # Note that some time zones include a provision for
93
+ # daylight savings time. The rules for daylight saving time are
94
+ # determined by the chosen tz. For UTC use the string "utc". If a
95
+ # time zone is not specified, the default will be in UTC (also known
96
+ # as GMT).
97
+ # @!attribute [rw] user_update_time
98
+ # @return [::Google::Protobuf::Timestamp]
99
+ # Output only. The creation time of the job.
100
+ # @!attribute [rw] state
101
+ # @return [::Google::Cloud::Scheduler::V1beta1::Job::State]
102
+ # Output only. State of the job.
103
+ # @!attribute [rw] status
104
+ # @return [::Google::Rpc::Status]
105
+ # Output only. The response from the target for the last attempted execution.
106
+ # @!attribute [rw] schedule_time
107
+ # @return [::Google::Protobuf::Timestamp]
108
+ # Output only. The next time the job is scheduled. Note that this may be a
109
+ # retry of a previously failed attempt or the next execution time
110
+ # according to the schedule.
111
+ # @!attribute [rw] last_attempt_time
112
+ # @return [::Google::Protobuf::Timestamp]
113
+ # Output only. The time the last job attempt started.
114
+ # @!attribute [rw] retry_config
115
+ # @return [::Google::Cloud::Scheduler::V1beta1::RetryConfig]
116
+ # Settings that determine the retry behavior.
117
+ # @!attribute [rw] attempt_deadline
118
+ # @return [::Google::Protobuf::Duration]
119
+ # The deadline for job attempts. If the request handler does not respond by
120
+ # this deadline then the request is cancelled and the attempt is marked as a
121
+ # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
122
+ # execution logs. Cloud Scheduler will retry the job according
123
+ # to the {::Google::Cloud::Scheduler::V1beta1::RetryConfig RetryConfig}.
124
+ #
125
+ # The allowed duration for this deadline is:
126
+ #
127
+ # * For {::Google::Cloud::Scheduler::V1beta1::Job#http_target HTTP targets}, between 15 seconds and 30 minutes.
128
+ # * For {::Google::Cloud::Scheduler::V1beta1::Job#app_engine_http_target App Engine HTTP targets}, between 15
129
+ # seconds and 24 hours.
130
+ # * For {::Google::Cloud::Scheduler::V1beta1::Job#pubsub_target PubSub targets}, this field is ignored.
131
+ class Job
132
+ include ::Google::Protobuf::MessageExts
133
+ extend ::Google::Protobuf::MessageExts::ClassMethods
134
+
135
+ # State of the job.
136
+ module State
137
+ # Unspecified state.
138
+ STATE_UNSPECIFIED = 0
139
+
140
+ # The job is executing normally.
141
+ ENABLED = 1
142
+
143
+ # The job is paused by the user. It will not execute. A user can
144
+ # intentionally pause the job using
145
+ # {::Google::Cloud::Scheduler::V1beta1::PauseJobRequest PauseJobRequest}.
146
+ PAUSED = 2
147
+
148
+ # The job is disabled by the system due to error. The user
149
+ # cannot directly set a job to be disabled.
150
+ DISABLED = 3
151
+
152
+ # The job state resulting from a failed {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#update_job CloudScheduler.UpdateJob}
153
+ # operation. To recover a job from this state, retry
154
+ # {::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client#update_job CloudScheduler.UpdateJob} until a successful response is received.
155
+ UPDATE_FAILED = 4
156
+ end
157
+ end
158
+
159
+ # Settings that determine the retry behavior.
160
+ #
161
+ # By default, if a job does not complete successfully (meaning that
162
+ # an acknowledgement is not received from the handler, then it will be retried
163
+ # with exponential backoff according to the settings in {::Google::Cloud::Scheduler::V1beta1::RetryConfig RetryConfig}.
164
+ # @!attribute [rw] retry_count
165
+ # @return [::Integer]
166
+ # The number of attempts that the system will make to run a job using the
167
+ # exponential backoff procedure described by
168
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#max_doublings max_doublings}.
169
+ #
170
+ # The default value of retry_count is zero.
171
+ #
172
+ # If retry_count is zero, a job attempt will *not* be retried if
173
+ # it fails. Instead the Cloud Scheduler system will wait for the
174
+ # next scheduled execution time.
175
+ #
176
+ # If retry_count is set to a non-zero number then Cloud Scheduler
177
+ # will retry failed attempts, using exponential backoff,
178
+ # retry_count times, or until the next scheduled execution time,
179
+ # whichever comes first.
180
+ #
181
+ # Values greater than 5 and negative values are not allowed.
182
+ # @!attribute [rw] max_retry_duration
183
+ # @return [::Google::Protobuf::Duration]
184
+ # The time limit for retrying a failed job, measured from time when an
185
+ # execution was first attempted. If specified with
186
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count}, the job will be retried until both
187
+ # limits are reached.
188
+ #
189
+ # The default value for max_retry_duration is zero, which means retry
190
+ # duration is unlimited.
191
+ # @!attribute [rw] min_backoff_duration
192
+ # @return [::Google::Protobuf::Duration]
193
+ # The minimum amount of time to wait before retrying a job after
194
+ # it fails.
195
+ #
196
+ # The default value of this field is 5 seconds.
197
+ # @!attribute [rw] max_backoff_duration
198
+ # @return [::Google::Protobuf::Duration]
199
+ # The maximum amount of time to wait before retrying a job after
200
+ # it fails.
201
+ #
202
+ # The default value of this field is 1 hour.
203
+ # @!attribute [rw] max_doublings
204
+ # @return [::Integer]
205
+ # The time between retries will double `max_doublings` times.
206
+ #
207
+ # A job's retry interval starts at
208
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#min_backoff_duration min_backoff_duration}, then doubles
209
+ # `max_doublings` times, then increases linearly, and finally
210
+ # retries retries at intervals of
211
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration} up to
212
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count} times.
213
+ #
214
+ # For example, if {::Google::Cloud::Scheduler::V1beta1::RetryConfig#min_backoff_duration min_backoff_duration} is
215
+ # 10s, {::Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration} is 300s, and
216
+ # `max_doublings` is 3, then the a job will first be retried in 10s. The
217
+ # retry interval will double three times, and then increase linearly by
218
+ # 2^3 * 10s. Finally, the job will retry at intervals of
219
+ # {::Google::Cloud::Scheduler::V1beta1::RetryConfig#max_backoff_duration max_backoff_duration} until the job has
220
+ # been attempted {::Google::Cloud::Scheduler::V1beta1::RetryConfig#retry_count retry_count} times. Thus, the
221
+ # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
222
+ #
223
+ # The default value of this field is 5.
224
+ class RetryConfig
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+ end
229
+ end
230
+ end
231
+ end
@@ -0,0 +1,385 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Scheduler
23
+ module V1beta1
24
+ # Http target. The job will be pushed to the job handler by means of
25
+ # an HTTP request via an {::Google::Cloud::Scheduler::V1beta1::HttpTarget#http_method http_method} such as HTTP
26
+ # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
27
+ # response code in the range [200 - 299]. A failure to receive a response
28
+ # constitutes a failed execution. For a redirected request, the response
29
+ # returned by the redirected request is considered.
30
+ # @!attribute [rw] uri
31
+ # @return [::String]
32
+ # Required. The full URI path that the request will be sent to. This string
33
+ # must begin with either "http://" or "https://". Some examples of
34
+ # valid values for {::Google::Cloud::Scheduler::V1beta1::HttpTarget#uri uri} are:
35
+ # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
36
+ # encode some characters for safety and compatibility. The maximum allowed
37
+ # URL length is 2083 characters after encoding.
38
+ # @!attribute [rw] http_method
39
+ # @return [::Google::Cloud::Scheduler::V1beta1::HttpMethod]
40
+ # Which HTTP method to use for the request.
41
+ # @!attribute [rw] headers
42
+ # @return [::Google::Protobuf::Map{::String => ::String}]
43
+ # The user can specify HTTP request headers to send with the job's
44
+ # HTTP request. This map contains the header field names and
45
+ # values. Repeated headers are not supported, but a header value can
46
+ # contain commas. These headers represent a subset of the headers
47
+ # that will accompany the job's HTTP request. Some HTTP request
48
+ # headers will be ignored or replaced. A partial list of headers that
49
+ # will be ignored or replaced is below:
50
+ # - Host: This will be computed by Cloud Scheduler and derived from
51
+ # {::Google::Cloud::Scheduler::V1beta1::HttpTarget#uri uri}.
52
+ # * `Content-Length`: This will be computed by Cloud Scheduler.
53
+ # * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`.
54
+ # * `X-Google-*`: Google internal use only.
55
+ # * `X-AppEngine-*`: Google internal use only.
56
+ #
57
+ # The total size of headers must be less than 80KB.
58
+ # @!attribute [rw] body
59
+ # @return [::String]
60
+ # HTTP request body. A request body is allowed only if the HTTP
61
+ # method is POST, PUT, or PATCH. It is an error to set body on a job with an
62
+ # incompatible {::Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
63
+ # @!attribute [rw] oauth_token
64
+ # @return [::Google::Cloud::Scheduler::V1beta1::OAuthToken]
65
+ # If specified, an
66
+ # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
67
+ # will be generated and attached as an `Authorization` header in the HTTP
68
+ # request.
69
+ #
70
+ # This type of authorization should generally only be used when calling
71
+ # Google APIs hosted on *.googleapis.com.
72
+ # @!attribute [rw] oidc_token
73
+ # @return [::Google::Cloud::Scheduler::V1beta1::OidcToken]
74
+ # If specified, an
75
+ # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
76
+ # token will be generated and attached as an `Authorization` header in the
77
+ # HTTP request.
78
+ #
79
+ # This type of authorization can be used for many scenarios, including
80
+ # calling Cloud Run, or endpoints where you intend to validate the token
81
+ # yourself.
82
+ class HttpTarget
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+
86
+ # @!attribute [rw] key
87
+ # @return [::String]
88
+ # @!attribute [rw] value
89
+ # @return [::String]
90
+ class HeadersEntry
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+ end
95
+
96
+ # App Engine target. The job will be pushed to a job handler by means
97
+ # of an HTTP request via an {::Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#http_method http_method} such
98
+ # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
99
+ # HTTP response code in the range [200 - 299]. Error 503 is
100
+ # considered an App Engine system error instead of an application
101
+ # error. Requests returning error 503 will be retried regardless of
102
+ # retry configuration and not counted against retry counts. Any other
103
+ # response code, or a failure to receive a response before the
104
+ # deadline, constitutes a failed attempt.
105
+ # @!attribute [rw] http_method
106
+ # @return [::Google::Cloud::Scheduler::V1beta1::HttpMethod]
107
+ # The HTTP method to use for the request. PATCH and OPTIONS are not
108
+ # permitted.
109
+ # @!attribute [rw] app_engine_routing
110
+ # @return [::Google::Cloud::Scheduler::V1beta1::AppEngineRouting]
111
+ # App Engine Routing setting for the job.
112
+ # @!attribute [rw] relative_uri
113
+ # @return [::String]
114
+ # The relative URI.
115
+ #
116
+ # The relative URL must begin with "/" and must be a valid HTTP relative URL.
117
+ # It can contain a path, query string arguments, and `#` fragments.
118
+ # If the relative URL is empty, then the root path "/" will be used.
119
+ # No spaces are allowed, and the maximum length allowed is 2083 characters.
120
+ # @!attribute [rw] headers
121
+ # @return [::Google::Protobuf::Map{::String => ::String}]
122
+ # HTTP request headers.
123
+ #
124
+ # This map contains the header field names and values. Headers can be set
125
+ # when the job is created.
126
+ #
127
+ # Cloud Scheduler sets some headers to default values:
128
+ #
129
+ # * `User-Agent`: By default, this header is
130
+ # `"AppEngine-Google; (+http://code.google.com/appengine)"`.
131
+ # This header can be modified, but Cloud Scheduler will append
132
+ # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
133
+ # modified `User-Agent`.
134
+ # * `X-CloudScheduler`: This header will be set to true.
135
+ #
136
+ # If the job has an {::Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#body body}, Cloud Scheduler sets
137
+ # the following headers:
138
+ #
139
+ # * `Content-Type`: By default, the `Content-Type` header is set to
140
+ # `"application/octet-stream"`. The default can be overridden by explictly
141
+ # setting `Content-Type` to a particular media type when the job is
142
+ # created.
143
+ # For example, `Content-Type` can be set to `"application/json"`.
144
+ # * `Content-Length`: This is computed by Cloud Scheduler. This value is
145
+ # output only. It cannot be changed.
146
+ #
147
+ # The headers below are output only. They cannot be set or overridden:
148
+ #
149
+ # * `X-Google-*`: For Google internal use only.
150
+ # * `X-AppEngine-*`: For Google internal use only.
151
+ #
152
+ # In addition, some App Engine headers, which contain
153
+ # job-specific information, are also be sent to the job handler.
154
+ # @!attribute [rw] body
155
+ # @return [::String]
156
+ # Body.
157
+ #
158
+ # HTTP request body. A request body is allowed only if the HTTP method is
159
+ # POST or PUT. It will result in invalid argument error to set a body on a
160
+ # job with an incompatible {::Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
161
+ class AppEngineHttpTarget
162
+ include ::Google::Protobuf::MessageExts
163
+ extend ::Google::Protobuf::MessageExts::ClassMethods
164
+
165
+ # @!attribute [rw] key
166
+ # @return [::String]
167
+ # @!attribute [rw] value
168
+ # @return [::String]
169
+ class HeadersEntry
170
+ include ::Google::Protobuf::MessageExts
171
+ extend ::Google::Protobuf::MessageExts::ClassMethods
172
+ end
173
+ end
174
+
175
+ # Pub/Sub target. The job will be delivered by publishing a message to
176
+ # the given Pub/Sub topic.
177
+ # @!attribute [rw] topic_name
178
+ # @return [::String]
179
+ # Required. The name of the Cloud Pub/Sub topic to which messages will
180
+ # be published when a job is delivered. The topic name must be in the
181
+ # same format as required by PubSub's
182
+ # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
183
+ # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
184
+ #
185
+ # The topic must be in the same project as the Cloud Scheduler job.
186
+ # @!attribute [rw] data
187
+ # @return [::String]
188
+ # The message payload for PubsubMessage.
189
+ #
190
+ # Pubsub message must contain either non-empty data, or at least one
191
+ # attribute.
192
+ # @!attribute [rw] attributes
193
+ # @return [::Google::Protobuf::Map{::String => ::String}]
194
+ # Attributes for PubsubMessage.
195
+ #
196
+ # Pubsub message must contain either non-empty data, or at least one
197
+ # attribute.
198
+ class PubsubTarget
199
+ include ::Google::Protobuf::MessageExts
200
+ extend ::Google::Protobuf::MessageExts::ClassMethods
201
+
202
+ # @!attribute [rw] key
203
+ # @return [::String]
204
+ # @!attribute [rw] value
205
+ # @return [::String]
206
+ class AttributesEntry
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+ end
210
+ end
211
+
212
+ # App Engine Routing.
213
+ #
214
+ # For more information about services, versions, and instances see
215
+ # [An Overview of App
216
+ # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
217
+ # [Microservices Architecture on Google App
218
+ # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
219
+ # [App Engine Standard request
220
+ # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
221
+ # and [App Engine Flex request
222
+ # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
223
+ # @!attribute [rw] service
224
+ # @return [::String]
225
+ # App service.
226
+ #
227
+ # By default, the job is sent to the service which is the default
228
+ # service when the job is attempted.
229
+ # @!attribute [rw] version
230
+ # @return [::String]
231
+ # App version.
232
+ #
233
+ # By default, the job is sent to the version which is the default
234
+ # version when the job is attempted.
235
+ # @!attribute [rw] instance
236
+ # @return [::String]
237
+ # App instance.
238
+ #
239
+ # By default, the job is sent to an instance which is available when
240
+ # the job is attempted.
241
+ #
242
+ # Requests can only be sent to a specific instance if
243
+ # [manual scaling is used in App Engine
244
+ # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
245
+ # App Engine Flex does not support instances. For more information, see
246
+ # [App Engine Standard request
247
+ # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
248
+ # and [App Engine Flex request
249
+ # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
250
+ # @!attribute [rw] host
251
+ # @return [::String]
252
+ # Output only. The host that the job is sent to.
253
+ #
254
+ # For more information about how App Engine requests are routed, see
255
+ # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
256
+ #
257
+ # The host is constructed as:
258
+ #
259
+ #
260
+ # * `host = [application_domain_name]`</br>
261
+ # `| [service] + '.' + [application_domain_name]`</br>
262
+ # `| [version] + '.' + [application_domain_name]`</br>
263
+ # `| [version_dot_service]+ '.' + [application_domain_name]`</br>
264
+ # `| [instance] + '.' + [application_domain_name]`</br>
265
+ # `| [instance_dot_service] + '.' + [application_domain_name]`</br>
266
+ # `| [instance_dot_version] + '.' + [application_domain_name]`</br>
267
+ # `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
268
+ #
269
+ # * `application_domain_name` = The domain name of the app, for
270
+ # example <app-id>.appspot.com, which is associated with the
271
+ # job's project ID.
272
+ #
273
+ # * `service =` {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
274
+ #
275
+ # * `version =` {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
276
+ #
277
+ # * `version_dot_service =`
278
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
279
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
280
+ #
281
+ # * `instance =` {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance}
282
+ #
283
+ # * `instance_dot_service =`
284
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
285
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
286
+ #
287
+ # * `instance_dot_version =`
288
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
289
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
290
+ #
291
+ # * `instance_dot_version_dot_service =`
292
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
293
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
294
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
295
+ #
296
+ #
297
+ # If {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service} is empty, then the job will be sent
298
+ # to the service which is the default service when the job is attempted.
299
+ #
300
+ # If {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} is empty, then the job will be sent
301
+ # to the version which is the default version when the job is attempted.
302
+ #
303
+ # If {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is empty, then the job will be
304
+ # sent to an instance which is available when the job is attempted.
305
+ #
306
+ # If {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service},
307
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}, or
308
+ # {::Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is invalid, then the job will be sent
309
+ # to the default version of the default service when the job is attempted.
310
+ class AppEngineRouting
311
+ include ::Google::Protobuf::MessageExts
312
+ extend ::Google::Protobuf::MessageExts::ClassMethods
313
+ end
314
+
315
+ # Contains information needed for generating an
316
+ # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
317
+ # This type of authorization should generally only be used when calling Google
318
+ # APIs hosted on *.googleapis.com.
319
+ # @!attribute [rw] service_account_email
320
+ # @return [::String]
321
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
322
+ # to be used for generating OAuth token.
323
+ # The service account must be within the same project as the job. The caller
324
+ # must have iam.serviceAccounts.actAs permission for the service account.
325
+ # @!attribute [rw] scope
326
+ # @return [::String]
327
+ # OAuth scope to be used for generating OAuth access token.
328
+ # If not specified, "https://www.googleapis.com/auth/cloud-platform"
329
+ # will be used.
330
+ class OAuthToken
331
+ include ::Google::Protobuf::MessageExts
332
+ extend ::Google::Protobuf::MessageExts::ClassMethods
333
+ end
334
+
335
+ # Contains information needed for generating an
336
+ # [OpenID Connect
337
+ # token](https://developers.google.com/identity/protocols/OpenIDConnect).
338
+ # This type of authorization can be used for many scenarios, including
339
+ # calling Cloud Run, or endpoints where you intend to validate the token
340
+ # yourself.
341
+ # @!attribute [rw] service_account_email
342
+ # @return [::String]
343
+ # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
344
+ # to be used for generating OIDC token.
345
+ # The service account must be within the same project as the job. The caller
346
+ # must have iam.serviceAccounts.actAs permission for the service account.
347
+ # @!attribute [rw] audience
348
+ # @return [::String]
349
+ # Audience to be used when generating OIDC token. If not specified, the URI
350
+ # specified in target will be used.
351
+ class OidcToken
352
+ include ::Google::Protobuf::MessageExts
353
+ extend ::Google::Protobuf::MessageExts::ClassMethods
354
+ end
355
+
356
+ # The HTTP method used to execute the job.
357
+ module HttpMethod
358
+ # HTTP method unspecified. Defaults to POST.
359
+ HTTP_METHOD_UNSPECIFIED = 0
360
+
361
+ # HTTP POST
362
+ POST = 1
363
+
364
+ # HTTP GET
365
+ GET = 2
366
+
367
+ # HTTP HEAD
368
+ HEAD = 3
369
+
370
+ # HTTP PUT
371
+ PUT = 4
372
+
373
+ # HTTP DELETE
374
+ DELETE = 5
375
+
376
+ # HTTP PATCH
377
+ PATCH = 6
378
+
379
+ # HTTP OPTIONS
380
+ OPTIONS = 7
381
+ end
382
+ end
383
+ end
384
+ end
385
+ end