1"""Generated message classes for cloudscheduler version v1.
2
3Creates and manages jobs run on a regular recurring schedule.
4"""
5# NOTE: This file is autogenerated and should not be edited by hand.
6
7from __future__ import absolute_import
8
9from apitools.base.protorpclite import messages as _messages
10from apitools.base.py import encoding
11from apitools.base.py import extra_types
12
13
14package = 'cloudscheduler'
15
16
17class AppEngineHttpTarget(_messages.Message):
18  r"""App Engine target. The job will be pushed to a job handler by means of
19  an HTTP request via an http_method such as HTTP POST, HTTP GET, etc. The job
20  is acknowledged by means of an HTTP response code in the range [200 - 299].
21  Error 503 is considered an App Engine system error instead of an application
22  error. Requests returning error 503 will be retried regardless of retry
23  configuration and not counted against retry counts. Any other response code,
24  or a failure to receive a response before the deadline, constitutes a failed
25  attempt.
26
27  Enums:
28    HttpMethodValueValuesEnum: The HTTP method to use for the request. PATCH
29      and OPTIONS are not permitted.
30
31  Messages:
32    HeadersValue: HTTP request headers.  This map contains the header field
33      names and values. Headers can be set when the job is created.  Cloud
34      Scheduler sets some headers to default values:  * `User-Agent`: By
35      default, this header is   `"AppEngine-Google;
36      (+http://code.google.com/appengine)"`.   This header can be modified,
37      but Cloud Scheduler will append   `"AppEngine-Google;
38      (+http://code.google.com/appengine)"` to the   modified `User-Agent`. *
39      `X-CloudScheduler`: This header will be set to true.  If the job has an
40      body, Cloud Scheduler sets the following headers:  * `Content-Type`: By
41      default, the `Content-Type` header is set to   `"application/octet-
42      stream"`. The default can be overridden by explictly   setting `Content-
43      Type` to a particular media type when the job is   created.   For
44      example, `Content-Type` can be set to `"application/json"`. * `Content-
45      Length`: This is computed by Cloud Scheduler. This value is   output
46      only. It cannot be changed.  The headers below are output only. They
47      cannot be set or overridden:  * `X-Google-*`: For Google internal use
48      only. * `X-AppEngine-*`: For Google internal use only.  In addition,
49      some App Engine headers, which contain job-specific information, are
50      also be sent to the job handler.
51
52  Fields:
53    appEngineRouting: App Engine Routing setting for the job.
54    body: Body.  HTTP request body. A request body is allowed only if the HTTP
55      method is POST or PUT. It will result in invalid argument error to set a
56      body on a job with an incompatible HttpMethod.
57    headers: HTTP request headers.  This map contains the header field names
58      and values. Headers can be set when the job is created.  Cloud Scheduler
59      sets some headers to default values:  * `User-Agent`: By default, this
60      header is   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
61      This header can be modified, but Cloud Scheduler will append
62      `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
63      modified `User-Agent`. * `X-CloudScheduler`: This header will be set to
64      true.  If the job has an body, Cloud Scheduler sets the following
65      headers:  * `Content-Type`: By default, the `Content-Type` header is set
66      to   `"application/octet-stream"`. The default can be overridden by
67      explictly   setting `Content-Type` to a particular media type when the
68      job is   created.   For example, `Content-Type` can be set to
69      `"application/json"`. * `Content-Length`: This is computed by Cloud
70      Scheduler. This value is   output only. It cannot be changed.  The
71      headers below are output only. They cannot be set or overridden:  *
72      `X-Google-*`: For Google internal use only. * `X-AppEngine-*`: For
73      Google internal use only.  In addition, some App Engine headers, which
74      contain job-specific information, are also be sent to the job handler.
75    httpMethod: The HTTP method to use for the request. PATCH and OPTIONS are
76      not permitted.
77    relativeUri: The relative URI.  The relative URL must begin with "/" and
78      must be a valid HTTP relative URL. It can contain a path, query string
79      arguments, and `#` fragments. If the relative URL is empty, then the
80      root path "/" will be used. No spaces are allowed, and the maximum
81      length allowed is 2083 characters.
82  """
83
84  class HttpMethodValueValuesEnum(_messages.Enum):
85    r"""The HTTP method to use for the request. PATCH and OPTIONS are not
86    permitted.
87
88    Values:
89      HTTP_METHOD_UNSPECIFIED: HTTP method unspecified. Defaults to POST.
90      POST: HTTP POST
91      GET: HTTP GET
92      HEAD: HTTP HEAD
93      PUT: HTTP PUT
94      DELETE: HTTP DELETE
95      PATCH: HTTP PATCH
96      OPTIONS: HTTP OPTIONS
97    """
98    HTTP_METHOD_UNSPECIFIED = 0
99    POST = 1
100    GET = 2
101    HEAD = 3
102    PUT = 4
103    DELETE = 5
104    PATCH = 6
105    OPTIONS = 7
106
107  @encoding.MapUnrecognizedFields('additionalProperties')
108  class HeadersValue(_messages.Message):
109    r"""HTTP request headers.  This map contains the header field names and
110    values. Headers can be set when the job is created.  Cloud Scheduler sets
111    some headers to default values:  * `User-Agent`: By default, this header
112    is   `"AppEngine-Google; (+http://code.google.com/appengine)"`.   This
113    header can be modified, but Cloud Scheduler will append   `"AppEngine-
114    Google; (+http://code.google.com/appengine)"` to the   modified `User-
115    Agent`. * `X-CloudScheduler`: This header will be set to true.  If the job
116    has an body, Cloud Scheduler sets the following headers:  * `Content-
117    Type`: By default, the `Content-Type` header is set to
118    `"application/octet-stream"`. The default can be overridden by explictly
119    setting `Content-Type` to a particular media type when the job is
120    created.   For example, `Content-Type` can be set to `"application/json"`.
121    * `Content-Length`: This is computed by Cloud Scheduler. This value is
122    output only. It cannot be changed.  The headers below are output only.
123    They cannot be set or overridden:  * `X-Google-*`: For Google internal use
124    only. * `X-AppEngine-*`: For Google internal use only.  In addition, some
125    App Engine headers, which contain job-specific information, are also be
126    sent to the job handler.
127
128    Messages:
129      AdditionalProperty: An additional property for a HeadersValue object.
130
131    Fields:
132      additionalProperties: Additional properties of type HeadersValue
133    """
134
135    class AdditionalProperty(_messages.Message):
136      r"""An additional property for a HeadersValue object.
137
138      Fields:
139        key: Name of the additional property.
140        value: A string attribute.
141      """
142
143      key = _messages.StringField(1)
144      value = _messages.StringField(2)
145
146    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
147
148  appEngineRouting = _messages.MessageField('AppEngineRouting', 1)
149  body = _messages.BytesField(2)
150  headers = _messages.MessageField('HeadersValue', 3)
151  httpMethod = _messages.EnumField('HttpMethodValueValuesEnum', 4)
152  relativeUri = _messages.StringField(5)
153
154
155class AppEngineRouting(_messages.Message):
156  r"""App Engine Routing.  For more information about services, versions, and
157  instances see [An Overview of App
158  Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-
159  engine), [Microservices Architecture on Google App
160  Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-
161  engine), [App Engine Standard request
162  routing](https://cloud.google.com/appengine/docs/standard/python/how-
163  requests-are-routed), and [App Engine Flex request
164  routing](https://cloud.google.com/appengine/docs/flexible/python/how-
165  requests-are-routed).
166
167  Fields:
168    host: Output only. The host that the job is sent to.  For more information
169      about how App Engine requests are routed, see
170      [here](https://cloud.google.com/appengine/docs/standard/python/how-
171      requests-are-routed).  The host is constructed as:   * `host =
172      [application_domain_name]`</br>   `| [service] + '.' +
173      [application_domain_name]`</br>   `| [version] + '.' +
174      [application_domain_name]`</br>   `| [version_dot_service]+ '.' +
175      [application_domain_name]`</br>   `| [instance] + '.' +
176      [application_domain_name]`</br>   `| [instance_dot_service] + '.' +
177      [application_domain_name]`</br>   `| [instance_dot_version] + '.' +
178      [application_domain_name]`</br>   `| [instance_dot_version_dot_service]
179      + '.' + [application_domain_name]`  * `application_domain_name` = The
180      domain name of the app, for   example <app-id>.appspot.com, which is
181      associated with the   job's project ID.  * `service =` service  *
182      `version =` version  * `version_dot_service =`   version `+ '.' +`
183      service  * `instance =` instance  * `instance_dot_service =`   instance
184      `+ '.' +`   service  * `instance_dot_version =`   instance `+ '.' +`
185      version  * `instance_dot_version_dot_service =`   instance `+ '.' +`
186      version `+ '.' +`   service   If service is empty, then the job will be
187      sent to the service which is the default service when the job is
188      attempted.  If version is empty, then the job will be sent to the
189      version which is the default version when the job is attempted.  If
190      instance is empty, then the job will be sent to an instance which is
191      available when the job is attempted.  If service, version, or instance
192      is invalid, then the job will be sent to the default version of the
193      default service when the job is attempted.
194    instance: App instance.  By default, the job is sent to an instance which
195      is available when the job is attempted.  Requests can only be sent to a
196      specific instance if [manual scaling is used in App Engine
197      Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-
198      app-engine?hl=en_US#scaling_types_and_instance_classes). App Engine Flex
199      does not support instances. For more information, see [App Engine
200      Standard request
201      routing](https://cloud.google.com/appengine/docs/standard/python/how-
202      requests-are-routed) and [App Engine Flex request
203      routing](https://cloud.google.com/appengine/docs/flexible/python/how-
204      requests-are-routed).
205    service: App service.  By default, the job is sent to the service which is
206      the default service when the job is attempted.
207    version: App version.  By default, the job is sent to the version which is
208      the default version when the job is attempted.
209  """
210
211  host = _messages.StringField(1)
212  instance = _messages.StringField(2)
213  service = _messages.StringField(3)
214  version = _messages.StringField(4)
215
216
217class CloudschedulerProjectsLocationsGetRequest(_messages.Message):
218  r"""A CloudschedulerProjectsLocationsGetRequest object.
219
220  Fields:
221    name: Resource name for the location.
222  """
223
224  name = _messages.StringField(1, required=True)
225
226
227class CloudschedulerProjectsLocationsJobsCreateRequest(_messages.Message):
228  r"""A CloudschedulerProjectsLocationsJobsCreateRequest object.
229
230  Fields:
231    job: A Job resource to be passed as the request body.
232    parent: Required.  The location name. For example:
233      `projects/PROJECT_ID/locations/LOCATION_ID`.
234  """
235
236  job = _messages.MessageField('Job', 1)
237  parent = _messages.StringField(2, required=True)
238
239
240class CloudschedulerProjectsLocationsJobsDeleteRequest(_messages.Message):
241  r"""A CloudschedulerProjectsLocationsJobsDeleteRequest object.
242
243  Fields:
244    name: Required.  The job name. For example:
245      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
246  """
247
248  name = _messages.StringField(1, required=True)
249
250
251class CloudschedulerProjectsLocationsJobsGetRequest(_messages.Message):
252  r"""A CloudschedulerProjectsLocationsJobsGetRequest object.
253
254  Fields:
255    name: Required.  The job name. For example:
256      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
257  """
258
259  name = _messages.StringField(1, required=True)
260
261
262class CloudschedulerProjectsLocationsJobsListRequest(_messages.Message):
263  r"""A CloudschedulerProjectsLocationsJobsListRequest object.
264
265  Fields:
266    pageSize: Requested page size.  The maximum page size is 500. If
267      unspecified, the page size will be the maximum. Fewer jobs than
268      requested might be returned, even if more jobs exist; use
269      next_page_token to determine if more jobs exist.
270    pageToken: A token identifying a page of results the server will return.
271      To request the first page results, page_token must be empty. To request
272      the next page of results, page_token must be the value of
273      next_page_token returned from the previous call to ListJobs. It is an
274      error to switch the value of filter or order_by while iterating through
275      pages.
276    parent: Required.  The location name. For example:
277      `projects/PROJECT_ID/locations/LOCATION_ID`.
278  """
279
280  pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32)
281  pageToken = _messages.StringField(2)
282  parent = _messages.StringField(3, required=True)
283
284
285class CloudschedulerProjectsLocationsJobsPatchRequest(_messages.Message):
286  r"""A CloudschedulerProjectsLocationsJobsPatchRequest object.
287
288  Fields:
289    job: A Job resource to be passed as the request body.
290    name: Optionally caller-specified in CreateJob, after which it becomes
291      output only.  The job name. For example:
292      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.  * `PROJECT_ID`
293      can contain letters ([A-Za-z]), numbers ([0-9]),    hyphens (-), colons
294      (:), or periods (.).    For more information, see    [Identifying
295      projects](https://cloud.google.com/resource-manager/docs/creating-
296      managing-projects#identifying_projects) * `LOCATION_ID` is the canonical
297      ID for the job's location.    The list of available locations can be
298      obtained by calling    ListLocations.    For more information, see
299      https://cloud.google.com/about/locations/. * `JOB_ID` can contain only
300      letters ([A-Za-z]), numbers ([0-9]),    hyphens (-), or underscores (_).
301      The maximum length is 500 characters.
302    updateMask: A  mask used to specify which fields of the job are being
303      updated.
304  """
305
306  job = _messages.MessageField('Job', 1)
307  name = _messages.StringField(2, required=True)
308  updateMask = _messages.StringField(3)
309
310
311class CloudschedulerProjectsLocationsJobsPauseRequest(_messages.Message):
312  r"""A CloudschedulerProjectsLocationsJobsPauseRequest object.
313
314  Fields:
315    name: Required.  The job name. For example:
316      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
317    pauseJobRequest: A PauseJobRequest resource to be passed as the request
318      body.
319  """
320
321  name = _messages.StringField(1, required=True)
322  pauseJobRequest = _messages.MessageField('PauseJobRequest', 2)
323
324
325class CloudschedulerProjectsLocationsJobsResumeRequest(_messages.Message):
326  r"""A CloudschedulerProjectsLocationsJobsResumeRequest object.
327
328  Fields:
329    name: Required.  The job name. For example:
330      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
331    resumeJobRequest: A ResumeJobRequest resource to be passed as the request
332      body.
333  """
334
335  name = _messages.StringField(1, required=True)
336  resumeJobRequest = _messages.MessageField('ResumeJobRequest', 2)
337
338
339class CloudschedulerProjectsLocationsJobsRunRequest(_messages.Message):
340  r"""A CloudschedulerProjectsLocationsJobsRunRequest object.
341
342  Fields:
343    name: Required.  The job name. For example:
344      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
345    runJobRequest: A RunJobRequest resource to be passed as the request body.
346  """
347
348  name = _messages.StringField(1, required=True)
349  runJobRequest = _messages.MessageField('RunJobRequest', 2)
350
351
352class CloudschedulerProjectsLocationsListRequest(_messages.Message):
353  r"""A CloudschedulerProjectsLocationsListRequest object.
354
355  Fields:
356    filter: The standard list filter.
357    name: The resource that owns the locations collection, if applicable.
358    pageSize: The standard list page size.
359    pageToken: The standard list page token.
360  """
361
362  filter = _messages.StringField(1)
363  name = _messages.StringField(2, required=True)
364  pageSize = _messages.IntegerField(3, variant=_messages.Variant.INT32)
365  pageToken = _messages.StringField(4)
366
367
368class Empty(_messages.Message):
369  r"""A generic empty message that you can re-use to avoid defining duplicated
370  empty messages in your APIs. A typical example is to use it as the request
371  or the response type of an API method. For instance:      service Foo {
372  rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);     }  The
373  JSON representation for `Empty` is empty JSON object `{}`.
374  """
375
376
377
378class HttpTarget(_messages.Message):
379  r"""Http target. The job will be pushed to the job handler by means of an
380  HTTP request via an http_method such as HTTP POST, HTTP GET, etc. The job is
381  acknowledged by means of an HTTP response code in the range [200 - 299]. A
382  failure to receive a response constitutes a failed execution. For a
383  redirected request, the response returned by the redirected request is
384  considered.
385
386  Enums:
387    HttpMethodValueValuesEnum: Which HTTP method to use for the request.
388
389  Messages:
390    HeadersValue: The user can specify HTTP request headers to send with the
391      job's HTTP request. This map contains the header field names and values.
392      Repeated headers are not supported, but a header value can contain
393      commas. These headers represent a subset of the headers that will
394      accompany the job's HTTP request. Some HTTP request headers will be
395      ignored or replaced. A partial list of headers that will be ignored or
396      replaced is below: - Host: This will be computed by Cloud Scheduler and
397      derived from uri. * `Content-Length`: This will be computed by Cloud
398      Scheduler. * `User-Agent`: This will be set to `"Google-Cloud-
399      Scheduler"`. * `X-Google-*`: Google internal use only. *
400      `X-AppEngine-*`: Google internal use only.  The total size of headers
401      must be less than 80KB.
402
403  Fields:
404    body: HTTP request body. A request body is allowed only if the HTTP method
405      is POST, PUT, or PATCH. It is an error to set body on a job with an
406      incompatible HttpMethod.
407    headers: The user can specify HTTP request headers to send with the job's
408      HTTP request. This map contains the header field names and values.
409      Repeated headers are not supported, but a header value can contain
410      commas. These headers represent a subset of the headers that will
411      accompany the job's HTTP request. Some HTTP request headers will be
412      ignored or replaced. A partial list of headers that will be ignored or
413      replaced is below: - Host: This will be computed by Cloud Scheduler and
414      derived from uri. * `Content-Length`: This will be computed by Cloud
415      Scheduler. * `User-Agent`: This will be set to `"Google-Cloud-
416      Scheduler"`. * `X-Google-*`: Google internal use only. *
417      `X-AppEngine-*`: Google internal use only.  The total size of headers
418      must be less than 80KB.
419    httpMethod: Which HTTP method to use for the request.
420    oauthToken: If specified, an [OAuth
421      token](https://developers.google.com/identity/protocols/OAuth2) will be
422      generated and attached as an `Authorization` header in the HTTP request.
423      This type of authorization should generally only be used when calling
424      Google APIs hosted on *.googleapis.com.
425    oidcToken: If specified, an
426      [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
427      token will be generated and attached as an `Authorization` header in the
428      HTTP request.  This type of authorization can be used for many
429      scenarios, including calling Cloud Run, or endpoints where you intend to
430      validate the token yourself.
431    uri: Required.  The full URI path that the request will be sent to. This
432      string must begin with either "http://" or "https://". Some examples of
433      valid values for uri are: `http://acme.com` and
434      `https://acme.com/sales:8080`. Cloud Scheduler will encode some
435      characters for safety and compatibility. The maximum allowed URL length
436      is 2083 characters after encoding.
437  """
438
439  class HttpMethodValueValuesEnum(_messages.Enum):
440    r"""Which HTTP method to use for the request.
441
442    Values:
443      HTTP_METHOD_UNSPECIFIED: HTTP method unspecified. Defaults to POST.
444      POST: HTTP POST
445      GET: HTTP GET
446      HEAD: HTTP HEAD
447      PUT: HTTP PUT
448      DELETE: HTTP DELETE
449      PATCH: HTTP PATCH
450      OPTIONS: HTTP OPTIONS
451    """
452    HTTP_METHOD_UNSPECIFIED = 0
453    POST = 1
454    GET = 2
455    HEAD = 3
456    PUT = 4
457    DELETE = 5
458    PATCH = 6
459    OPTIONS = 7
460
461  @encoding.MapUnrecognizedFields('additionalProperties')
462  class HeadersValue(_messages.Message):
463    r"""The user can specify HTTP request headers to send with the job's HTTP
464    request. This map contains the header field names and values. Repeated
465    headers are not supported, but a header value can contain commas. These
466    headers represent a subset of the headers that will accompany the job's
467    HTTP request. Some HTTP request headers will be ignored or replaced. A
468    partial list of headers that will be ignored or replaced is below: - Host:
469    This will be computed by Cloud Scheduler and derived from uri. * `Content-
470    Length`: This will be computed by Cloud Scheduler. * `User-Agent`: This
471    will be set to `"Google-Cloud-Scheduler"`. * `X-Google-*`: Google internal
472    use only. * `X-AppEngine-*`: Google internal use only.  The total size of
473    headers must be less than 80KB.
474
475    Messages:
476      AdditionalProperty: An additional property for a HeadersValue object.
477
478    Fields:
479      additionalProperties: Additional properties of type HeadersValue
480    """
481
482    class AdditionalProperty(_messages.Message):
483      r"""An additional property for a HeadersValue object.
484
485      Fields:
486        key: Name of the additional property.
487        value: A string attribute.
488      """
489
490      key = _messages.StringField(1)
491      value = _messages.StringField(2)
492
493    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
494
495  body = _messages.BytesField(1)
496  headers = _messages.MessageField('HeadersValue', 2)
497  httpMethod = _messages.EnumField('HttpMethodValueValuesEnum', 3)
498  oauthToken = _messages.MessageField('OAuthToken', 4)
499  oidcToken = _messages.MessageField('OidcToken', 5)
500  uri = _messages.StringField(6)
501
502
503class Job(_messages.Message):
504  r"""Configuration for a job. The maximum allowed size for a job is 100KB.
505
506  Enums:
507    StateValueValuesEnum: Output only. State of the job.
508
509  Fields:
510    appEngineHttpTarget: App Engine HTTP target.
511    attemptDeadline: The deadline for job attempts. If the request handler
512      does not respond by this deadline then the request is cancelled and the
513      attempt is marked as a `DEADLINE_EXCEEDED` failure. The failed attempt
514      can be viewed in execution logs. Cloud Scheduler will retry the job
515      according to the RetryConfig.  The allowed duration for this deadline
516      is: * For HTTP targets, between 15 seconds and 30 minutes. * For App
517      Engine HTTP targets, between 15   seconds and 24 hours.
518    description: Optionally caller-specified in CreateJob or UpdateJob.  A
519      human-readable description for the job. This string must not contain
520      more than 500 characters.
521    httpTarget: HTTP target.
522    lastAttemptTime: Output only. The time the last job attempt started.
523    name: Optionally caller-specified in CreateJob, after which it becomes
524      output only.  The job name. For example:
525      `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.  * `PROJECT_ID`
526      can contain letters ([A-Za-z]), numbers ([0-9]),    hyphens (-), colons
527      (:), or periods (.).    For more information, see    [Identifying
528      projects](https://cloud.google.com/resource-manager/docs/creating-
529      managing-projects#identifying_projects) * `LOCATION_ID` is the canonical
530      ID for the job's location.    The list of available locations can be
531      obtained by calling    ListLocations.    For more information, see
532      https://cloud.google.com/about/locations/. * `JOB_ID` can contain only
533      letters ([A-Za-z]), numbers ([0-9]),    hyphens (-), or underscores (_).
534      The maximum length is 500 characters.
535    pubsubTarget: Pub/Sub target.
536    retryConfig: Settings that determine the retry behavior.
537    schedule: Required, except when used with UpdateJob.  Describes the
538      schedule on which the job will be executed.  The schedule can be either
539      of the following types:  *
540      [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) * English-like
541      [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-
542      schedules)  As a general rule, execution `n + 1` of a job will not begin
543      until execution `n` has finished. Cloud Scheduler will never allow two
544      simultaneously outstanding executions. For example, this implies that if
545      the `n+1`th execution is scheduled to run at 16:00 but the `n`th
546      execution takes until 16:15, the `n+1`th execution will not start until
547      `16:15`. A scheduled start time will be delayed if the previous
548      execution has not ended when its scheduled time occurs.  If retry_count
549      > 0 and a job attempt fails, the job will be tried a total of
550      retry_count times, with exponential backoff, until the next scheduled
551      start time.
552    scheduleTime: Output only. The next time the job is scheduled. Note that
553      this may be a retry of a previously failed attempt or the next execution
554      time according to the schedule.
555    state: Output only. State of the job.
556    status: Output only. The response from the target for the last attempted
557      execution.
558    timeZone: Specifies the time zone to be used in interpreting schedule. The
559      value of this field must be a time zone name from the [tz
560      database](http://en.wikipedia.org/wiki/Tz_database).  Note that some
561      time zones include a provision for daylight savings time. The rules for
562      daylight saving time are determined by the chosen tz. For UTC use the
563      string "utc". If a time zone is not specified, the default will be in
564      UTC (also known as GMT).
565    userUpdateTime: Output only. The creation time of the job.
566  """
567
568  class StateValueValuesEnum(_messages.Enum):
569    r"""Output only. State of the job.
570
571    Values:
572      STATE_UNSPECIFIED: Unspecified state.
573      ENABLED: The job is executing normally.
574      PAUSED: The job is paused by the user. It will not execute. A user can
575        intentionally pause the job using PauseJobRequest.
576      DISABLED: The job is disabled by the system due to error. The user
577        cannot directly set a job to be disabled.
578      UPDATE_FAILED: The job state resulting from a failed
579        CloudScheduler.UpdateJob operation. To recover a job from this state,
580        retry CloudScheduler.UpdateJob until a successful response is
581        received.
582    """
583    STATE_UNSPECIFIED = 0
584    ENABLED = 1
585    PAUSED = 2
586    DISABLED = 3
587    UPDATE_FAILED = 4
588
589  appEngineHttpTarget = _messages.MessageField('AppEngineHttpTarget', 1)
590  attemptDeadline = _messages.StringField(2)
591  description = _messages.StringField(3)
592  httpTarget = _messages.MessageField('HttpTarget', 4)
593  lastAttemptTime = _messages.StringField(5)
594  name = _messages.StringField(6)
595  pubsubTarget = _messages.MessageField('PubsubTarget', 7)
596  retryConfig = _messages.MessageField('RetryConfig', 8)
597  schedule = _messages.StringField(9)
598  scheduleTime = _messages.StringField(10)
599  state = _messages.EnumField('StateValueValuesEnum', 11)
600  status = _messages.MessageField('Status', 12)
601  timeZone = _messages.StringField(13)
602  userUpdateTime = _messages.StringField(14)
603
604
605class ListJobsResponse(_messages.Message):
606  r"""Response message for listing jobs using ListJobs.
607
608  Fields:
609    jobs: The list of jobs.
610    nextPageToken: A token to retrieve next page of results. Pass this value
611      in the page_token field in the subsequent call to ListJobs to retrieve
612      the next page of results. If this is empty it indicates that there are
613      no more results through which to paginate.  The page token is valid for
614      only 2 hours.
615  """
616
617  jobs = _messages.MessageField('Job', 1, repeated=True)
618  nextPageToken = _messages.StringField(2)
619
620
621class ListLocationsResponse(_messages.Message):
622  r"""The response message for Locations.ListLocations.
623
624  Fields:
625    locations: A list of locations that matches the specified filter in the
626      request.
627    nextPageToken: The standard List next-page token.
628  """
629
630  locations = _messages.MessageField('Location', 1, repeated=True)
631  nextPageToken = _messages.StringField(2)
632
633
634class Location(_messages.Message):
635  r"""A resource that represents Google Cloud Platform location.
636
637  Messages:
638    LabelsValue: Cross-service attributes for the location. For example
639      {"cloud.googleapis.com/region": "us-east1"}
640    MetadataValue: Service-specific metadata. For example the available
641      capacity at the given location.
642
643  Fields:
644    displayName: The friendly name for this location, typically a nearby city
645      name. For example, "Tokyo".
646    labels: Cross-service attributes for the location. For example
647      {"cloud.googleapis.com/region": "us-east1"}
648    locationId: The canonical id for this location. For example: `"us-east1"`.
649    metadata: Service-specific metadata. For example the available capacity at
650      the given location.
651    name: Resource name for the location, which may vary between
652      implementations. For example: `"projects/example-project/locations/us-
653      east1"`
654  """
655
656  @encoding.MapUnrecognizedFields('additionalProperties')
657  class LabelsValue(_messages.Message):
658    r"""Cross-service attributes for the location. For example
659    {"cloud.googleapis.com/region": "us-east1"}
660
661    Messages:
662      AdditionalProperty: An additional property for a LabelsValue object.
663
664    Fields:
665      additionalProperties: Additional properties of type LabelsValue
666    """
667
668    class AdditionalProperty(_messages.Message):
669      r"""An additional property for a LabelsValue object.
670
671      Fields:
672        key: Name of the additional property.
673        value: A string attribute.
674      """
675
676      key = _messages.StringField(1)
677      value = _messages.StringField(2)
678
679    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
680
681  @encoding.MapUnrecognizedFields('additionalProperties')
682  class MetadataValue(_messages.Message):
683    r"""Service-specific metadata. For example the available capacity at the
684    given location.
685
686    Messages:
687      AdditionalProperty: An additional property for a MetadataValue object.
688
689    Fields:
690      additionalProperties: Properties of the object. Contains field @type
691        with type URL.
692    """
693
694    class AdditionalProperty(_messages.Message):
695      r"""An additional property for a MetadataValue object.
696
697      Fields:
698        key: Name of the additional property.
699        value: A extra_types.JsonValue attribute.
700      """
701
702      key = _messages.StringField(1)
703      value = _messages.MessageField('extra_types.JsonValue', 2)
704
705    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
706
707  displayName = _messages.StringField(1)
708  labels = _messages.MessageField('LabelsValue', 2)
709  locationId = _messages.StringField(3)
710  metadata = _messages.MessageField('MetadataValue', 4)
711  name = _messages.StringField(5)
712
713
714class OAuthToken(_messages.Message):
715  r"""Contains information needed for generating an [OAuth
716  token](https://developers.google.com/identity/protocols/OAuth2). This type
717  of authorization should generally only be used when calling Google APIs
718  hosted on *.googleapis.com.
719
720  Fields:
721    scope: OAuth scope to be used for generating OAuth access token. If not
722      specified, "https://www.googleapis.com/auth/cloud-platform" will be
723      used.
724    serviceAccountEmail: [Service account
725      email](https://cloud.google.com/iam/docs/service-accounts) to be used
726      for generating OAuth token. The service account must be within the same
727      project as the job. The caller must have iam.serviceAccounts.actAs
728      permission for the service account.
729  """
730
731  scope = _messages.StringField(1)
732  serviceAccountEmail = _messages.StringField(2)
733
734
735class OidcToken(_messages.Message):
736  r"""Contains information needed for generating an [OpenID Connect
737  token](https://developers.google.com/identity/protocols/OpenIDConnect). This
738  type of authorization can be used for many scenarios, including calling
739  Cloud Run, or endpoints where you intend to validate the token yourself.
740
741  Fields:
742    audience: Audience to be used when generating OIDC token. If not
743      specified, the URI specified in target will be used.
744    serviceAccountEmail: [Service account
745      email](https://cloud.google.com/iam/docs/service-accounts) to be used
746      for generating OIDC token. The service account must be within the same
747      project as the job. The caller must have iam.serviceAccounts.actAs
748      permission for the service account.
749  """
750
751  audience = _messages.StringField(1)
752  serviceAccountEmail = _messages.StringField(2)
753
754
755class PauseJobRequest(_messages.Message):
756  r"""Request message for PauseJob."""
757
758
759class PubsubMessage(_messages.Message):
760  r"""A message that is published by publishers and consumed by subscribers.
761  The message must contain either a non-empty data field or at least one
762  attribute. Note that client libraries represent this object differently
763  depending on the language. See the corresponding <a
764  href="https://cloud.google.com/pubsub/docs/reference/libraries">client
765  library documentation</a> for more information. See <a
766  href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a> for more
767  information about message limits.
768
769  Messages:
770    AttributesValue: Optional attributes for this message.
771
772  Fields:
773    attributes: Optional attributes for this message.
774    data: The message data field. If this field is empty, the message must
775      contain at least one attribute.
776    messageId: ID of this message, assigned by the server when the message is
777      published. Guaranteed to be unique within the topic. This value may be
778      read by a subscriber that receives a `PubsubMessage` via a `Pull` call
779      or a push delivery. It must not be populated by the publisher in a
780      `Publish` call.
781    publishTime: The time at which the message was published, populated by the
782      server when it receives the `Publish` call. It must not be populated by
783      the publisher in a `Publish` call.
784  """
785
786  @encoding.MapUnrecognizedFields('additionalProperties')
787  class AttributesValue(_messages.Message):
788    r"""Optional attributes for this message.
789
790    Messages:
791      AdditionalProperty: An additional property for a AttributesValue object.
792
793    Fields:
794      additionalProperties: Additional properties of type AttributesValue
795    """
796
797    class AdditionalProperty(_messages.Message):
798      r"""An additional property for a AttributesValue object.
799
800      Fields:
801        key: Name of the additional property.
802        value: A string attribute.
803      """
804
805      key = _messages.StringField(1)
806      value = _messages.StringField(2)
807
808    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
809
810  attributes = _messages.MessageField('AttributesValue', 1)
811  data = _messages.BytesField(2)
812  messageId = _messages.StringField(3)
813  publishTime = _messages.StringField(4)
814
815
816class PubsubTarget(_messages.Message):
817  r"""Pub/Sub target. The job will be delivered by publishing a message to the
818  given Pub/Sub topic.
819
820  Messages:
821    AttributesValue: Attributes for PubsubMessage.  Pubsub message must
822      contain either non-empty data, or at least one attribute.
823
824  Fields:
825    attributes: Attributes for PubsubMessage.  Pubsub message must contain
826      either non-empty data, or at least one attribute.
827    data: The message payload for PubsubMessage.  Pubsub message must contain
828      either non-empty data, or at least one attribute.
829    topicName: Required.  The name of the Cloud Pub/Sub topic to which
830      messages will be published when a job is delivered. The topic name must
831      be in the same format as required by PubSub's [PublishRequest.name](http
832      s://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishr
833      equest), for example `projects/PROJECT_ID/topics/TOPIC_ID`.  The topic
834      must be in the same project as the Cloud Scheduler job.
835  """
836
837  @encoding.MapUnrecognizedFields('additionalProperties')
838  class AttributesValue(_messages.Message):
839    r"""Attributes for PubsubMessage.  Pubsub message must contain either non-
840    empty data, or at least one attribute.
841
842    Messages:
843      AdditionalProperty: An additional property for a AttributesValue object.
844
845    Fields:
846      additionalProperties: Additional properties of type AttributesValue
847    """
848
849    class AdditionalProperty(_messages.Message):
850      r"""An additional property for a AttributesValue object.
851
852      Fields:
853        key: Name of the additional property.
854        value: A string attribute.
855      """
856
857      key = _messages.StringField(1)
858      value = _messages.StringField(2)
859
860    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
861
862  attributes = _messages.MessageField('AttributesValue', 1)
863  data = _messages.BytesField(2)
864  topicName = _messages.StringField(3)
865
866
867class ResumeJobRequest(_messages.Message):
868  r"""Request message for ResumeJob."""
869
870
871class RetryConfig(_messages.Message):
872  r"""Settings that determine the retry behavior.  By default, if a job does
873  not complete successfully (meaning that an acknowledgement is not received
874  from the handler, then it will be retried with exponential backoff according
875  to the settings in RetryConfig.
876
877  Fields:
878    maxBackoffDuration: The maximum amount of time to wait before retrying a
879      job after it fails.  The default value of this field is 1 hour.
880    maxDoublings: The time between retries will double `max_doublings` times.
881      A job's retry interval starts at min_backoff_duration, then doubles
882      `max_doublings` times, then increases linearly, and finally retries
883      retries at intervals of max_backoff_duration up to retry_count times.
884      For example, if min_backoff_duration is 10s, max_backoff_duration is
885      300s, and `max_doublings` is 3, then the a job will first be retried in
886      10s. The retry interval will double three times, and then increase
887      linearly by 2^3 * 10s.  Finally, the job will retry at intervals of
888      max_backoff_duration until the job has been attempted retry_count times.
889      Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s,
890      300s, ....  The default value of this field is 5.
891    maxRetryDuration: The time limit for retrying a failed job, measured from
892      time when an execution was first attempted. If specified with
893      retry_count, the job will be retried until both limits are reached.  The
894      default value for max_retry_duration is zero, which means retry duration
895      is unlimited.
896    minBackoffDuration: The minimum amount of time to wait before retrying a
897      job after it fails.  The default value of this field is 5 seconds.
898    retryCount: The number of attempts that the system will make to run a job
899      using the exponential backoff procedure described by max_doublings.  The
900      default value of retry_count is zero.  If retry_count is zero, a job
901      attempt will *not* be retried if it fails. Instead the Cloud Scheduler
902      system will wait for the next scheduled execution time.  If retry_count
903      is set to a non-zero number then Cloud Scheduler will retry failed
904      attempts, using exponential backoff, retry_count times, or until the
905      next scheduled execution time, whichever comes first.  Values greater
906      than 5 and negative values are not allowed.
907  """
908
909  maxBackoffDuration = _messages.StringField(1)
910  maxDoublings = _messages.IntegerField(2, variant=_messages.Variant.INT32)
911  maxRetryDuration = _messages.StringField(3)
912  minBackoffDuration = _messages.StringField(4)
913  retryCount = _messages.IntegerField(5, variant=_messages.Variant.INT32)
914
915
916class RunJobRequest(_messages.Message):
917  r"""Request message for forcing a job to run now using
918RunJob."""
919
920
921class StandardQueryParameters(_messages.Message):
922  r"""Query parameters accepted by all methods.
923
924  Enums:
925    FXgafvValueValuesEnum: V1 error format.
926    AltValueValuesEnum: Data format for response.
927
928  Fields:
929    f__xgafv: V1 error format.
930    access_token: OAuth access token.
931    alt: Data format for response.
932    callback: JSONP
933    fields: Selector specifying which fields to include in a partial response.
934    key: API key. Your API key identifies your project and provides you with
935      API access, quota, and reports. Required unless you provide an OAuth 2.0
936      token.
937    oauth_token: OAuth 2.0 token for the current user.
938    prettyPrint: Returns response with indentations and line breaks.
939    quotaUser: Available to use for quota purposes for server-side
940      applications. Can be any arbitrary string assigned to a user, but should
941      not exceed 40 characters.
942    trace: A tracing token of the form "token:<tokenid>" to include in api
943      requests.
944    uploadType: Legacy upload protocol for media (e.g. "media", "multipart").
945    upload_protocol: Upload protocol for media (e.g. "raw", "multipart").
946  """
947
948  class AltValueValuesEnum(_messages.Enum):
949    r"""Data format for response.
950
951    Values:
952      json: Responses with Content-Type of application/json
953      media: Media download with context-dependent Content-Type
954      proto: Responses with Content-Type of application/x-protobuf
955    """
956    json = 0
957    media = 1
958    proto = 2
959
960  class FXgafvValueValuesEnum(_messages.Enum):
961    r"""V1 error format.
962
963    Values:
964      _1: v1 error format
965      _2: v2 error format
966    """
967    _1 = 0
968    _2 = 1
969
970  f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1)
971  access_token = _messages.StringField(2)
972  alt = _messages.EnumField('AltValueValuesEnum', 3, default='json')
973  callback = _messages.StringField(4)
974  fields = _messages.StringField(5)
975  key = _messages.StringField(6)
976  oauth_token = _messages.StringField(7)
977  prettyPrint = _messages.BooleanField(8, default=True)
978  quotaUser = _messages.StringField(9)
979  trace = _messages.StringField(10)
980  uploadType = _messages.StringField(11)
981  upload_protocol = _messages.StringField(12)
982
983
984class Status(_messages.Message):
985  r"""The `Status` type defines a logical error model that is suitable for
986  different programming environments, including REST APIs and RPC APIs. It is
987  used by [gRPC](https://github.com/grpc). The error model is designed to be:
988  - Simple to use and understand for most users - Flexible enough to meet
989  unexpected needs  # Overview  The `Status` message contains three pieces of
990  data: error code, error message, and error details. The error code should be
991  an enum value of google.rpc.Code, but it may accept additional error codes
992  if needed.  The error message should be a developer-facing English message
993  that helps developers *understand* and *resolve* the error. If a localized
994  user-facing error message is needed, put the localized message in the error
995  details or localize it in the client. The optional error details may contain
996  arbitrary information about the error. There is a predefined set of error
997  detail types in the package `google.rpc` that can be used for common error
998  conditions.  # Language mapping  The `Status` message is the logical
999  representation of the error model, but it is not necessarily the actual wire
1000  format. When the `Status` message is exposed in different client libraries
1001  and different wire protocols, it can be mapped differently. For example, it
1002  will likely be mapped to some exceptions in Java, but more likely mapped to
1003  some error codes in C.  # Other uses  The error model and the `Status`
1004  message can be used in a variety of environments, either with or without
1005  APIs, to provide a consistent developer experience across different
1006  environments.  Example uses of this error model include:  - Partial errors.
1007  If a service needs to return partial errors to the client,     it may embed
1008  the `Status` in the normal response to indicate the partial     errors.  -
1009  Workflow errors. A typical workflow has multiple steps. Each step may
1010  have a `Status` message for error reporting.  - Batch operations. If a
1011  client uses batch request and batch response, the     `Status` message
1012  should be used directly inside batch response, one for     each error sub-
1013  response.  - Asynchronous operations. If an API call embeds asynchronous
1014  operation     results in its response, the status of those operations should
1015  be     represented directly using the `Status` message.  - Logging. If some
1016  API errors are stored in logs, the message `Status` could     be used
1017  directly after any stripping needed for security/privacy reasons.
1018
1019  Messages:
1020    DetailsValueListEntry: A DetailsValueListEntry object.
1021
1022  Fields:
1023    code: The status code, which should be an enum value of google.rpc.Code.
1024    details: A list of messages that carry the error details.  There is a
1025      common set of message types for APIs to use.
1026    message: A developer-facing error message, which should be in English. Any
1027      user-facing error message should be localized and sent in the
1028      google.rpc.Status.details field, or localized by the client.
1029  """
1030
1031  @encoding.MapUnrecognizedFields('additionalProperties')
1032  class DetailsValueListEntry(_messages.Message):
1033    r"""A DetailsValueListEntry object.
1034
1035    Messages:
1036      AdditionalProperty: An additional property for a DetailsValueListEntry
1037        object.
1038
1039    Fields:
1040      additionalProperties: Properties of the object. Contains field @type
1041        with type URL.
1042    """
1043
1044    class AdditionalProperty(_messages.Message):
1045      r"""An additional property for a DetailsValueListEntry object.
1046
1047      Fields:
1048        key: Name of the additional property.
1049        value: A extra_types.JsonValue attribute.
1050      """
1051
1052      key = _messages.StringField(1)
1053      value = _messages.MessageField('extra_types.JsonValue', 2)
1054
1055    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)
1056
1057  code = _messages.IntegerField(1, variant=_messages.Variant.INT32)
1058  details = _messages.MessageField('DetailsValueListEntry', 2, repeated=True)
1059  message = _messages.StringField(3)
1060
1061
1062encoding.AddCustomJsonFieldMapping(
1063    StandardQueryParameters, 'f__xgafv', '$.xgafv')
1064encoding.AddCustomJsonEnumMapping(
1065    StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1')
1066encoding.AddCustomJsonEnumMapping(
1067    StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2')
1068