schedule.proto 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.notebooks.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/notebooks/v1/execution.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ScheduleProto";
  23. option java_package = "com.google.cloud.notebooks.v1";
  24. // The definition of a schedule.
  25. message Schedule {
  26. option (google.api.resource) = {
  27. type: "notebooks.googleapis.com/Schedule"
  28. pattern: "projects/{project}/location/{location}/schedules/{schedule}"
  29. };
  30. // State of the job.
  31. enum State {
  32. // Unspecified state.
  33. STATE_UNSPECIFIED = 0;
  34. // The job is executing normally.
  35. ENABLED = 1;
  36. // The job is paused by the user. It will not execute. A user can
  37. // intentionally pause the job using
  38. // [PauseJobRequest][].
  39. PAUSED = 2;
  40. // The job is disabled by the system due to error. The user
  41. // cannot directly set a job to be disabled.
  42. DISABLED = 3;
  43. // The job state resulting from a failed [CloudScheduler.UpdateJob][]
  44. // operation. To recover a job from this state, retry
  45. // [CloudScheduler.UpdateJob][] until a successful response is received.
  46. UPDATE_FAILED = 4;
  47. // The schedule resource is being created.
  48. INITIALIZING = 5;
  49. // The schedule resource is being deleted.
  50. DELETING = 6;
  51. }
  52. // Output only. The name of this schedule. Format:
  53. // `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
  54. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  55. // Output only. Display name used for UI purposes.
  56. // Name can only contain alphanumeric characters, hyphens '-',
  57. // and underscores '_'.
  58. string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  59. // A brief description of this environment.
  60. string description = 3;
  61. State state = 4;
  62. // Cron-tab formatted schedule by which the job will execute.
  63. // Format: minute, hour, day of month, month, day of week,
  64. // e.g. 0 0 * * WED = every Wednesday
  65. // More examples: https://crontab.guru/examples.html
  66. string cron_schedule = 5;
  67. // Timezone on which the cron_schedule.
  68. // The value of this field must be a time zone name from the tz database.
  69. // TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  70. //
  71. // Note that some time zones include a provision for daylight savings time.
  72. // The rules for daylight saving time are determined by the chosen tz.
  73. // For UTC use the string "utc". If a time zone is not specified,
  74. // the default will be in UTC (also known as GMT).
  75. string time_zone = 6;
  76. // Output only. Time the schedule was created.
  77. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  78. // Output only. Time the schedule was last updated.
  79. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  80. // Notebook Execution Template corresponding to this schedule.
  81. ExecutionTemplate execution_template = 9;
  82. // Output only. The most recent execution names triggered from this schedule and their
  83. // corresponding states.
  84. repeated Execution recent_executions = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  85. }