xref: /aosp_15_r20/external/googleapis/google/cloud/deploy/v1/cloud_deploy.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.cloud.deploy.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/longrunning/operations.proto";
24import "google/protobuf/duration.proto";
25import "google/protobuf/empty.proto";
26import "google/protobuf/field_mask.proto";
27import "google/protobuf/timestamp.proto";
28import "google/type/date.proto";
29
30option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb";
31option java_multiple_files = true;
32option java_outer_classname = "CloudDeployProto";
33option java_package = "com.google.cloud.deploy.v1";
34option (google.api.resource_definition) = {
35  type: "cloudbuild.googleapis.com/Build"
36  pattern: "projects/{project}/locations/{location}/builds/{build}"
37};
38option (google.api.resource_definition) = {
39  type: "cloudbuild.googleapis.com/Repository"
40  pattern: "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}"
41};
42option (google.api.resource_definition) = {
43  type: "container.googleapis.com/Cluster"
44  pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
45};
46option (google.api.resource_definition) = {
47  type: "clouddeploy.googleapis.com/Operation"
48  pattern: "projects/{project}/locations/{location}/operations/{operation}"
49};
50option (google.api.resource_definition) = {
51  type: "cloudbuild.googleapis.com/WorkerPool"
52  pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}"
53};
54option (google.api.resource_definition) = {
55  type: "gkehub.googleapis.com/Membership"
56  pattern: "projects/{project}/locations/{location}/memberships/{membership}"
57};
58option (google.api.resource_definition) = {
59  type: "run.googleapis.com/Service"
60  pattern: "projects/{project}/locations/{location}/services/{service}"
61};
62option (google.api.resource_definition) = {
63  type: "run.googleapis.com/Job"
64  pattern: "projects/{project}/locations/{location}/jobs/{job}"
65};
66
67// CloudDeploy service creates and manages Continuous Delivery operations
68// on Google Cloud Platform via Skaffold (https://skaffold.dev).
69service CloudDeploy {
70  option (google.api.default_host) = "clouddeploy.googleapis.com";
71  option (google.api.oauth_scopes) =
72      "https://www.googleapis.com/auth/cloud-platform";
73
74  // Lists DeliveryPipelines in a given project and location.
75  rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest)
76      returns (ListDeliveryPipelinesResponse) {
77    option (google.api.http) = {
78      get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
79    };
80    option (google.api.method_signature) = "parent";
81  }
82
83  // Gets details of a single DeliveryPipeline.
84  rpc GetDeliveryPipeline(GetDeliveryPipelineRequest)
85      returns (DeliveryPipeline) {
86    option (google.api.http) = {
87      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
88    };
89    option (google.api.method_signature) = "name";
90  }
91
92  // Creates a new DeliveryPipeline in a given project and location.
93  rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest)
94      returns (google.longrunning.Operation) {
95    option (google.api.http) = {
96      post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
97      body: "delivery_pipeline"
98    };
99    option (google.api.method_signature) =
100        "parent,delivery_pipeline,delivery_pipeline_id";
101    option (google.longrunning.operation_info) = {
102      response_type: "DeliveryPipeline"
103      metadata_type: "OperationMetadata"
104    };
105  }
106
107  // Updates the parameters of a single DeliveryPipeline.
108  rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest)
109      returns (google.longrunning.Operation) {
110    option (google.api.http) = {
111      patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}"
112      body: "delivery_pipeline"
113    };
114    option (google.api.method_signature) = "delivery_pipeline,update_mask";
115    option (google.longrunning.operation_info) = {
116      response_type: "DeliveryPipeline"
117      metadata_type: "OperationMetadata"
118    };
119  }
120
121  // Deletes a single DeliveryPipeline.
122  rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest)
123      returns (google.longrunning.Operation) {
124    option (google.api.http) = {
125      delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
126    };
127    option (google.api.method_signature) = "name";
128    option (google.longrunning.operation_info) = {
129      response_type: "google.protobuf.Empty"
130      metadata_type: "OperationMetadata"
131    };
132  }
133
134  // Lists Targets in a given project and location.
135  rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) {
136    option (google.api.http) = {
137      get: "/v1/{parent=projects/*/locations/*}/targets"
138    };
139    option (google.api.method_signature) = "parent";
140  }
141
142  // Creates a `Rollout` to roll back the specified target.
143  rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) {
144    option (google.api.http) = {
145      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget"
146      body: "*"
147    };
148    option (google.api.method_signature) = "name,target_id,rollout_id";
149  }
150
151  // Gets details of a single Target.
152  rpc GetTarget(GetTargetRequest) returns (Target) {
153    option (google.api.http) = {
154      get: "/v1/{name=projects/*/locations/*/targets/*}"
155    };
156    option (google.api.method_signature) = "name";
157  }
158
159  // Creates a new Target in a given project and location.
160  rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) {
161    option (google.api.http) = {
162      post: "/v1/{parent=projects/*/locations/*}/targets"
163      body: "target"
164    };
165    option (google.api.method_signature) = "parent,target,target_id";
166    option (google.longrunning.operation_info) = {
167      response_type: "Target"
168      metadata_type: "OperationMetadata"
169    };
170  }
171
172  // Updates the parameters of a single Target.
173  rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) {
174    option (google.api.http) = {
175      patch: "/v1/{target.name=projects/*/locations/*/targets/*}"
176      body: "target"
177    };
178    option (google.api.method_signature) = "target,update_mask";
179    option (google.longrunning.operation_info) = {
180      response_type: "Target"
181      metadata_type: "OperationMetadata"
182    };
183  }
184
185  // Deletes a single Target.
186  rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) {
187    option (google.api.http) = {
188      delete: "/v1/{name=projects/*/locations/*/targets/*}"
189    };
190    option (google.api.method_signature) = "name";
191    option (google.longrunning.operation_info) = {
192      response_type: "google.protobuf.Empty"
193      metadata_type: "OperationMetadata"
194    };
195  }
196
197  // Lists CustomTargetTypes in a given project and location.
198  rpc ListCustomTargetTypes(ListCustomTargetTypesRequest)
199      returns (ListCustomTargetTypesResponse) {
200    option (google.api.http) = {
201      get: "/v1/{parent=projects/*/locations/*}/customTargetTypes"
202    };
203    option (google.api.method_signature) = "parent";
204  }
205
206  // Gets details of a single CustomTargetType.
207  rpc GetCustomTargetType(GetCustomTargetTypeRequest)
208      returns (CustomTargetType) {
209    option (google.api.http) = {
210      get: "/v1/{name=projects/*/locations/*/customTargetTypes/*}"
211    };
212    option (google.api.method_signature) = "name";
213  }
214
215  // Creates a new CustomTargetType in a given project and location.
216  rpc CreateCustomTargetType(CreateCustomTargetTypeRequest)
217      returns (google.longrunning.Operation) {
218    option (google.api.http) = {
219      post: "/v1/{parent=projects/*/locations/*}/customTargetTypes"
220      body: "custom_target_type"
221    };
222    option (google.api.method_signature) =
223        "parent,custom_target_type,custom_target_type_id";
224    option (google.longrunning.operation_info) = {
225      response_type: "CustomTargetType"
226      metadata_type: "OperationMetadata"
227    };
228  }
229
230  // Updates a single CustomTargetType.
231  rpc UpdateCustomTargetType(UpdateCustomTargetTypeRequest)
232      returns (google.longrunning.Operation) {
233    option (google.api.http) = {
234      patch: "/v1/{custom_target_type.name=projects/*/locations/*/customTargetTypes/*}"
235      body: "custom_target_type"
236    };
237    option (google.api.method_signature) = "custom_target_type,update_mask";
238    option (google.longrunning.operation_info) = {
239      response_type: "CustomTargetType"
240      metadata_type: "OperationMetadata"
241    };
242  }
243
244  // Deletes a single CustomTargetType.
245  rpc DeleteCustomTargetType(DeleteCustomTargetTypeRequest)
246      returns (google.longrunning.Operation) {
247    option (google.api.http) = {
248      delete: "/v1/{name=projects/*/locations/*/customTargetTypes/*}"
249    };
250    option (google.api.method_signature) = "name";
251    option (google.longrunning.operation_info) = {
252      response_type: "google.protobuf.Empty"
253      metadata_type: "OperationMetadata"
254    };
255  }
256
257  // Lists Releases in a given project and location.
258  rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) {
259    option (google.api.http) = {
260      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
261    };
262    option (google.api.method_signature) = "parent";
263  }
264
265  // Gets details of a single Release.
266  rpc GetRelease(GetReleaseRequest) returns (Release) {
267    option (google.api.http) = {
268      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}"
269    };
270    option (google.api.method_signature) = "name";
271  }
272
273  // Creates a new Release in a given project and location.
274  rpc CreateRelease(CreateReleaseRequest)
275      returns (google.longrunning.Operation) {
276    option (google.api.http) = {
277      post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
278      body: "release"
279    };
280    option (google.api.method_signature) = "parent,release,release_id";
281    option (google.longrunning.operation_info) = {
282      response_type: "Release"
283      metadata_type: "OperationMetadata"
284    };
285  }
286
287  // Abandons a Release in the Delivery Pipeline.
288  rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) {
289    option (google.api.http) = {
290      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon"
291      body: "*"
292    };
293    option (google.api.method_signature) = "name";
294  }
295
296  // Approves a Rollout.
297  rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) {
298    option (google.api.http) = {
299      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve"
300      body: "*"
301    };
302    option (google.api.method_signature) = "name";
303  }
304
305  // Advances a Rollout in a given project and location.
306  rpc AdvanceRollout(AdvanceRolloutRequest) returns (AdvanceRolloutResponse) {
307    option (google.api.http) = {
308      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:advance"
309      body: "*"
310    };
311    option (google.api.method_signature) = "name,phase_id";
312  }
313
314  // Cancels a Rollout in a given project and location.
315  rpc CancelRollout(CancelRolloutRequest) returns (CancelRolloutResponse) {
316    option (google.api.http) = {
317      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:cancel"
318      body: "*"
319    };
320    option (google.api.method_signature) = "name";
321  }
322
323  // Lists Rollouts in a given project and location.
324  rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) {
325    option (google.api.http) = {
326      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
327    };
328    option (google.api.method_signature) = "parent";
329  }
330
331  // Gets details of a single Rollout.
332  rpc GetRollout(GetRolloutRequest) returns (Rollout) {
333    option (google.api.http) = {
334      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}"
335    };
336    option (google.api.method_signature) = "name";
337  }
338
339  // Creates a new Rollout in a given project and location.
340  rpc CreateRollout(CreateRolloutRequest)
341      returns (google.longrunning.Operation) {
342    option (google.api.http) = {
343      post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
344      body: "rollout"
345    };
346    option (google.api.method_signature) = "parent,rollout,rollout_id";
347    option (google.longrunning.operation_info) = {
348      response_type: "Rollout"
349      metadata_type: "OperationMetadata"
350    };
351  }
352
353  // Ignores the specified Job in a Rollout.
354  rpc IgnoreJob(IgnoreJobRequest) returns (IgnoreJobResponse) {
355    option (google.api.http) = {
356      post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:ignoreJob"
357      body: "*"
358    };
359    option (google.api.method_signature) = "rollout,phase_id,job_id";
360  }
361
362  // Retries the specified Job in a Rollout.
363  rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) {
364    option (google.api.http) = {
365      post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob"
366      body: "*"
367    };
368    option (google.api.method_signature) = "rollout,phase_id,job_id";
369  }
370
371  // Lists JobRuns in a given project and location.
372  rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) {
373    option (google.api.http) = {
374      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns"
375    };
376    option (google.api.method_signature) = "parent";
377  }
378
379  // Gets details of a single JobRun.
380  rpc GetJobRun(GetJobRunRequest) returns (JobRun) {
381    option (google.api.http) = {
382      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}"
383    };
384    option (google.api.method_signature) = "name";
385  }
386
387  // Terminates a Job Run in a given project and location.
388  rpc TerminateJobRun(TerminateJobRunRequest)
389      returns (TerminateJobRunResponse) {
390    option (google.api.http) = {
391      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}:terminate"
392      body: "*"
393    };
394    option (google.api.method_signature) = "name";
395  }
396
397  // Gets the configuration for a location.
398  rpc GetConfig(GetConfigRequest) returns (Config) {
399    option (google.api.http) = {
400      get: "/v1/{name=projects/*/locations/*/config}"
401    };
402    option (google.api.method_signature) = "name";
403  }
404
405  // Creates a new Automation in a given project and location.
406  rpc CreateAutomation(CreateAutomationRequest)
407      returns (google.longrunning.Operation) {
408    option (google.api.http) = {
409      post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations"
410      body: "automation"
411    };
412    option (google.api.method_signature) = "parent,automation,automation_id";
413    option (google.longrunning.operation_info) = {
414      response_type: "Automation"
415      metadata_type: "OperationMetadata"
416    };
417  }
418
419  // Updates the parameters of a single Automation resource.
420  rpc UpdateAutomation(UpdateAutomationRequest)
421      returns (google.longrunning.Operation) {
422    option (google.api.http) = {
423      patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}"
424      body: "automation"
425    };
426    option (google.api.method_signature) = "automation,update_mask";
427    option (google.longrunning.operation_info) = {
428      response_type: "Automation"
429      metadata_type: "OperationMetadata"
430    };
431  }
432
433  // Deletes a single Automation resource.
434  rpc DeleteAutomation(DeleteAutomationRequest)
435      returns (google.longrunning.Operation) {
436    option (google.api.http) = {
437      delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}"
438    };
439    option (google.api.method_signature) = "name";
440    option (google.longrunning.operation_info) = {
441      response_type: "google.protobuf.Empty"
442      metadata_type: "OperationMetadata"
443    };
444  }
445
446  // Gets details of a single Automation.
447  rpc GetAutomation(GetAutomationRequest) returns (Automation) {
448    option (google.api.http) = {
449      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}"
450    };
451    option (google.api.method_signature) = "name";
452  }
453
454  // Lists Automations in a given project and location.
455  rpc ListAutomations(ListAutomationsRequest)
456      returns (ListAutomationsResponse) {
457    option (google.api.http) = {
458      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations"
459    };
460    option (google.api.method_signature) = "parent";
461  }
462
463  // Gets details of a single AutomationRun.
464  rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) {
465    option (google.api.http) = {
466      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}"
467    };
468    option (google.api.method_signature) = "name";
469  }
470
471  // Lists AutomationRuns in a given project and location.
472  rpc ListAutomationRuns(ListAutomationRunsRequest)
473      returns (ListAutomationRunsResponse) {
474    option (google.api.http) = {
475      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns"
476    };
477    option (google.api.method_signature) = "parent";
478  }
479
480  // Cancels an AutomationRun. The `state` of the `AutomationRun` after
481  // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
482  // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
483  // in a different state returns an `FAILED_PRECONDITION` error.
484  rpc CancelAutomationRun(CancelAutomationRunRequest)
485      returns (CancelAutomationRunResponse) {
486    option (google.api.http) = {
487      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel"
488      body: "*"
489    };
490    option (google.api.method_signature) = "name";
491  }
492}
493
494// A `DeliveryPipeline` resource in the Cloud Deploy API.
495//
496// A `DeliveryPipeline` defines a pipeline through which a Skaffold
497// configuration can progress.
498message DeliveryPipeline {
499  option (google.api.resource) = {
500    type: "clouddeploy.googleapis.com/DeliveryPipeline"
501    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}"
502  };
503
504  // Optional. Name of the `DeliveryPipeline`. Format is
505  // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
506  string name = 1 [(google.api.field_behavior) = OPTIONAL];
507
508  // Output only. Unique identifier of the `DeliveryPipeline`.
509  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
510
511  // Description of the `DeliveryPipeline`. Max length is 255 characters.
512  string description = 3;
513
514  // User annotations. These attributes can only be set and used by the
515  // user, and not by Cloud Deploy.
516  map<string, string> annotations = 4;
517
518  // Labels are attributes that can be set and used by both the
519  // user and by Cloud Deploy. Labels must meet the following constraints:
520  //
521  // * Keys and values can contain only lowercase letters, numeric characters,
522  // underscores, and dashes.
523  // * All characters must use UTF-8 encoding, and international characters are
524  // allowed.
525  // * Keys must start with a lowercase letter or international character.
526  // * Each resource is limited to a maximum of 64 labels.
527  //
528  // Both keys and values are additionally constrained to be <= 128 bytes.
529  map<string, string> labels = 5;
530
531  // Output only. Time at which the pipeline was created.
532  google.protobuf.Timestamp create_time = 6
533      [(google.api.field_behavior) = OUTPUT_ONLY];
534
535  // Output only. Most recent time at which the pipeline was updated.
536  google.protobuf.Timestamp update_time = 7
537      [(google.api.field_behavior) = OUTPUT_ONLY];
538
539  // The ordering configuration of the `DeliveryPipeline`.
540  oneof pipeline {
541    // SerialPipeline defines a sequential set of stages for a
542    // `DeliveryPipeline`.
543    SerialPipeline serial_pipeline = 8;
544  }
545
546  // Output only. Information around the state of the Delivery Pipeline.
547  PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
548
549  // This checksum is computed by the server based on the value of other
550  // fields, and may be sent on update and delete requests to ensure the
551  // client has an up-to-date value before proceeding.
552  string etag = 10;
553
554  // When suspended, no new releases or rollouts can be created,
555  // but in-progress ones will complete.
556  bool suspended = 12;
557}
558
559// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
560message SerialPipeline {
561  // Each stage specifies configuration for a `Target`. The ordering
562  // of this list defines the promotion flow.
563  repeated Stage stages = 1;
564}
565
566// Stage specifies a location to which to deploy.
567message Stage {
568  // The target_id to which this stage points. This field refers exclusively to
569  // the last segment of a target name. For example, this field would just be
570  // `my-target` (rather than
571  // `projects/project/locations/location/targets/my-target`). The location of
572  // the `Target` is inferred to be the same as the location of the
573  // `DeliveryPipeline` that contains this `Stage`.
574  string target_id = 1;
575
576  // Skaffold profiles to use when rendering the manifest for this stage's
577  // `Target`.
578  repeated string profiles = 2;
579
580  // Optional. The strategy to use for a `Rollout` to this stage.
581  Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL];
582
583  // Optional. The deploy parameters to use for the target in this stage.
584  repeated DeployParameters deploy_parameters = 6
585      [(google.api.field_behavior) = OPTIONAL];
586}
587
588// DeployParameters contains deploy parameters information.
589message DeployParameters {
590  // Required. Values are deploy parameters in key-value pairs.
591  map<string, string> values = 1 [(google.api.field_behavior) = REQUIRED];
592
593  // Optional. Deploy parameters are applied to targets with match labels.
594  // If unspecified, deploy parameters are applied to all targets (including
595  // child targets of a multi-target).
596  map<string, string> match_target_labels = 2
597      [(google.api.field_behavior) = OPTIONAL];
598}
599
600// Strategy contains deployment strategy information.
601message Strategy {
602  // Deployment strategy details.
603  oneof deployment_strategy {
604    // Standard deployment strategy executes a single deploy and allows
605    // verifying the deployment.
606    Standard standard = 1;
607
608    // Canary deployment strategy provides progressive percentage based
609    // deployments to a Target.
610    Canary canary = 2;
611  }
612}
613
614// Predeploy contains the predeploy job configuration information.
615message Predeploy {
616  // Optional. A sequence of Skaffold custom actions to invoke during execution
617  // of the predeploy job.
618  repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL];
619}
620
621// Postdeploy contains the postdeploy job configuration information.
622message Postdeploy {
623  // Optional. A sequence of Skaffold custom actions to invoke during execution
624  // of the postdeploy job.
625  repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL];
626}
627
628// Standard represents the standard deployment strategy.
629message Standard {
630  // Whether to verify a deployment.
631  bool verify = 1;
632
633  // Optional. Configuration for the predeploy job. If this is not configured,
634  // predeploy job will not be present.
635  Predeploy predeploy = 2 [(google.api.field_behavior) = OPTIONAL];
636
637  // Optional. Configuration for the postdeploy job. If this is not configured,
638  // postdeploy job will not be present.
639  Postdeploy postdeploy = 3 [(google.api.field_behavior) = OPTIONAL];
640}
641
642// Canary represents the canary deployment strategy.
643message Canary {
644  // Optional. Runtime specific configurations for the deployment strategy. The
645  // runtime configuration is used to determine how Cloud Deploy will split
646  // traffic to enable a progressive deployment.
647  RuntimeConfig runtime_config = 1 [(google.api.field_behavior) = OPTIONAL];
648
649  // The mode to use for the canary deployment strategy.
650  oneof mode {
651    // Configures the progressive based deployment for a Target.
652    CanaryDeployment canary_deployment = 2;
653
654    // Configures the progressive based deployment for a Target, but allows
655    // customizing at the phase level where a phase represents each of the
656    // percentage deployments.
657    CustomCanaryDeployment custom_canary_deployment = 3;
658  }
659}
660
661// CanaryDeployment represents the canary deployment configuration
662message CanaryDeployment {
663  // Required. The percentage based deployments that will occur as a part of a
664  // `Rollout`. List is expected in ascending order and each integer n is
665  // 0 <= n < 100.
666  repeated int32 percentages = 1 [(google.api.field_behavior) = REQUIRED];
667
668  // Whether to run verify tests after each percentage deployment.
669  bool verify = 2;
670
671  // Optional. Configuration for the predeploy job of the first phase. If this
672  // is not configured, there will be no predeploy job for this phase.
673  Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL];
674
675  // Optional. Configuration for the postdeploy job of the last phase. If this
676  // is not configured, there will be no postdeploy job for this phase.
677  Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL];
678}
679
680// CustomCanaryDeployment represents the custom canary deployment
681// configuration.
682message CustomCanaryDeployment {
683  // PhaseConfig represents the configuration for a phase in the custom
684  // canary deployment.
685  message PhaseConfig {
686    // Required. The ID to assign to the `Rollout` phase.
687    // This value must consist of lower-case letters, numbers, and hyphens,
688    // start with a letter and end with a letter or a number, and have a max
689    // length of 63 characters. In other words, it must match the following
690    // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
691    string phase_id = 1 [(google.api.field_behavior) = REQUIRED];
692
693    // Required. Percentage deployment for the phase.
694    int32 percentage = 2 [(google.api.field_behavior) = REQUIRED];
695
696    // Skaffold profiles to use when rendering the manifest for this phase.
697    // These are in addition to the profiles list specified in the
698    // `DeliveryPipeline` stage.
699    repeated string profiles = 3;
700
701    // Whether to run verify tests after the deployment.
702    bool verify = 4;
703
704    // Optional. Configuration for the predeploy job of this phase. If this is
705    // not configured, there will be no predeploy job for this phase.
706    Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL];
707
708    // Optional. Configuration for the postdeploy job of this phase. If this is
709    // not configured, there will be no postdeploy job for this phase.
710    Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL];
711  }
712
713  // Required. Configuration for each phase in the canary deployment in the
714  // order executed.
715  repeated PhaseConfig phase_configs = 1
716      [(google.api.field_behavior) = REQUIRED];
717}
718
719// KubernetesConfig contains the Kubernetes runtime configuration.
720message KubernetesConfig {
721  // Information about the Kubernetes Gateway API service mesh configuration.
722  message GatewayServiceMesh {
723    // Required. Name of the Gateway API HTTPRoute.
724    string http_route = 1 [(google.api.field_behavior) = REQUIRED];
725
726    // Required. Name of the Kubernetes Service.
727    string service = 2 [(google.api.field_behavior) = REQUIRED];
728
729    // Required. Name of the Kubernetes Deployment whose traffic is managed by
730    // the specified HTTPRoute and Service.
731    string deployment = 3 [(google.api.field_behavior) = REQUIRED];
732
733    // Optional. The time to wait for route updates to propagate. The maximum
734    // configurable time is 3 hours, in seconds format. If unspecified, there is
735    // no wait time.
736    google.protobuf.Duration route_update_wait_time = 4
737        [(google.api.field_behavior) = OPTIONAL];
738
739    // Optional. The amount of time to migrate traffic back from the canary
740    // Service to the original Service during the stable phase deployment. If
741    // specified, must be between 15s and 3600s. If unspecified, there is no
742    // cutback time.
743    google.protobuf.Duration stable_cutback_duration = 5
744        [(google.api.field_behavior) = OPTIONAL];
745  }
746
747  // Information about the Kubernetes Service networking configuration.
748  message ServiceNetworking {
749    // Required. Name of the Kubernetes Service.
750    string service = 1 [(google.api.field_behavior) = REQUIRED];
751
752    // Required. Name of the Kubernetes Deployment whose traffic is managed by
753    // the specified Service.
754    string deployment = 2 [(google.api.field_behavior) = REQUIRED];
755
756    // Optional. Whether to disable Pod overprovisioning. If Pod
757    // overprovisioning is disabled then Cloud Deploy will limit the number of
758    // total Pods used for the deployment strategy to the number of Pods the
759    // Deployment has on the cluster.
760    bool disable_pod_overprovisioning = 3
761        [(google.api.field_behavior) = OPTIONAL];
762  }
763
764  // The service definition configuration.
765  oneof service_definition {
766    // Kubernetes Gateway API service mesh configuration.
767    GatewayServiceMesh gateway_service_mesh = 1;
768
769    // Kubernetes Service networking configuration.
770    ServiceNetworking service_networking = 2;
771  }
772}
773
774// CloudRunConfig contains the Cloud Run runtime configuration.
775message CloudRunConfig {
776  // Whether Cloud Deploy should update the traffic stanza in a Cloud Run
777  // Service on the user's behalf to facilitate traffic splitting. This is
778  // required to be true for CanaryDeployments, but optional for
779  // CustomCanaryDeployments.
780  bool automatic_traffic_control = 1;
781
782  // Optional. A list of tags that are added to the canary revision while the
783  // canary phase is in progress.
784  repeated string canary_revision_tags = 2
785      [(google.api.field_behavior) = OPTIONAL];
786
787  // Optional. A list of tags that are added to the prior revision while the
788  // canary phase is in progress.
789  repeated string prior_revision_tags = 3
790      [(google.api.field_behavior) = OPTIONAL];
791
792  // Optional. A list of tags that are added to the final stable revision when
793  // the stable phase is applied.
794  repeated string stable_revision_tags = 4
795      [(google.api.field_behavior) = OPTIONAL];
796}
797
798// RuntimeConfig contains the runtime specific configurations for a deployment
799// strategy.
800message RuntimeConfig {
801  // The runtime configuration details.
802  oneof runtime_config {
803    // Kubernetes runtime configuration.
804    KubernetesConfig kubernetes = 1;
805
806    // Cloud Run runtime configuration.
807    CloudRunConfig cloud_run = 2;
808  }
809}
810
811// PipelineReadyCondition contains information around the status of the
812// Pipeline.
813message PipelineReadyCondition {
814  // True if the Pipeline is in a valid state. Otherwise at least one condition
815  // in `PipelineCondition` is in an invalid state. Iterate over those
816  // conditions and see which condition(s) has status = false to find out what
817  // is wrong with the Pipeline.
818  bool status = 3;
819
820  // Last time the condition was updated.
821  google.protobuf.Timestamp update_time = 4;
822}
823
824// `TargetsPresentCondition` contains information on any Targets referenced in
825// the Delivery Pipeline that do not actually exist.
826message TargetsPresentCondition {
827  // True if there aren't any missing Targets.
828  bool status = 1;
829
830  // The list of Target names that do not exist. For example,
831  // `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
832  repeated string missing_targets = 2 [(google.api.resource_reference) = {
833    type: "clouddeploy.googleapis.com/Target"
834  }];
835
836  // Last time the condition was updated.
837  google.protobuf.Timestamp update_time = 4;
838}
839
840// TargetsTypeCondition contains information on whether the Targets defined in
841// the Delivery Pipeline are of the same type.
842message TargetsTypeCondition {
843  // True if the targets are all a comparable type. For example this is true if
844  // all targets are GKE clusters. This is false if some targets are Cloud Run
845  // targets and others are GKE clusters.
846  bool status = 1;
847
848  // Human readable error message.
849  string error_details = 2;
850}
851
852// PipelineCondition contains all conditions relevant to a Delivery Pipeline.
853message PipelineCondition {
854  // Details around the Pipeline's overall status.
855  PipelineReadyCondition pipeline_ready_condition = 1;
856
857  // Details around targets enumerated in the pipeline.
858  TargetsPresentCondition targets_present_condition = 3;
859
860  // Details on the whether the targets enumerated in the pipeline are of the
861  // same type.
862  TargetsTypeCondition targets_type_condition = 4;
863}
864
865// The request object for `ListDeliveryPipelines`.
866message ListDeliveryPipelinesRequest {
867  // Required. The parent, which owns this collection of pipelines. Format must
868  // be `projects/{project_id}/locations/{location_name}`.
869  string parent = 1 [
870    (google.api.field_behavior) = REQUIRED,
871    (google.api.resource_reference) = {
872      child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
873    }
874  ];
875
876  // The maximum number of pipelines to return. The service may return
877  // fewer than this value. If unspecified, at most 50 pipelines will
878  // be returned. The maximum value is 1000; values above 1000 will be set
879  // to 1000.
880  int32 page_size = 2;
881
882  // A page token, received from a previous `ListDeliveryPipelines` call.
883  // Provide this to retrieve the subsequent page.
884  //
885  // When paginating, all other provided parameters match
886  // the call that provided the page token.
887  string page_token = 3;
888
889  // Filter pipelines to be returned. See https://google.aip.dev/160 for more
890  // details.
891  string filter = 4;
892
893  // Field to sort by. See https://google.aip.dev/132#ordering for more details.
894  string order_by = 5;
895}
896
897// The response object from `ListDeliveryPipelines`.
898message ListDeliveryPipelinesResponse {
899  // The `DeliveryPipeline` objects.
900  repeated DeliveryPipeline delivery_pipelines = 1;
901
902  // A token, which can be sent as `page_token` to retrieve the next page.
903  // If this field is omitted, there are no subsequent pages.
904  string next_page_token = 2;
905
906  // Locations that could not be reached.
907  repeated string unreachable = 3;
908}
909
910// The request object for `GetDeliveryPipeline`
911message GetDeliveryPipelineRequest {
912  // Required. Name of the `DeliveryPipeline`. Format must be
913  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
914  string name = 1 [
915    (google.api.field_behavior) = REQUIRED,
916    (google.api.resource_reference) = {
917      type: "clouddeploy.googleapis.com/DeliveryPipeline"
918    }
919  ];
920}
921
922// The request object for `CreateDeliveryPipeline`.
923message CreateDeliveryPipelineRequest {
924  // Required. The parent collection in which the `DeliveryPipeline` should be
925  // created. Format should be
926  // `projects/{project_id}/locations/{location_name}`.
927  string parent = 1 [
928    (google.api.field_behavior) = REQUIRED,
929    (google.api.resource_reference) = {
930      child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
931    }
932  ];
933
934  // Required. ID of the `DeliveryPipeline`.
935  string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED];
936
937  // Required. The `DeliveryPipeline` to create.
938  DeliveryPipeline delivery_pipeline = 3
939      [(google.api.field_behavior) = REQUIRED];
940
941  // Optional. A request ID to identify requests. Specify a unique request ID
942  // so that if you must retry your request, the server knows to ignore the
943  // request if it has already been completed. The server guarantees that for
944  // at least 60 minutes after the first request.
945  //
946  // For example, consider a situation where you make an initial request and the
947  // request times out. If you make the request again with the same request ID,
948  // the server can check if original operation with the same request ID was
949  // received, and if so, will ignore the second request. This prevents clients
950  // from accidentally creating duplicate commitments.
951  //
952  // The request ID must be a valid UUID with the exception that zero UUID is
953  // not supported (00000000-0000-0000-0000-000000000000).
954  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
955
956  // Optional. If set to true, the request is validated and the user is provided
957  // with an expected result, but no actual change is made.
958  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
959}
960
961// The request object for `UpdateDeliveryPipeline`.
962message UpdateDeliveryPipelineRequest {
963  // Required. Field mask is used to specify the fields to be overwritten in the
964  // `DeliveryPipeline` resource by the update.
965  // The fields specified in the update_mask are relative to the resource, not
966  // the full request. A field will be overwritten if it's in the mask. If the
967  // user doesn't provide a mask then all fields are overwritten.
968  google.protobuf.FieldMask update_mask = 1
969      [(google.api.field_behavior) = REQUIRED];
970
971  // Required. The `DeliveryPipeline` to update.
972  DeliveryPipeline delivery_pipeline = 2
973      [(google.api.field_behavior) = REQUIRED];
974
975  // Optional. A request ID to identify requests. Specify a unique request ID
976  // so that if you must retry your request, the server knows to ignore the
977  // request if it has already been completed. The server guarantees that for
978  // at least 60 minutes after the first request.
979  //
980  // For example, consider a situation where you make an initial request and the
981  // request times out. If you make the request again with the same request ID,
982  // the server can check if original operation with the same request ID was
983  // received, and if so, will ignore the second request. This prevents clients
984  // from accidentally creating duplicate commitments.
985  //
986  // The request ID must be a valid UUID with the exception that zero UUID is
987  // not supported (00000000-0000-0000-0000-000000000000).
988  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
989
990  // Optional. If set to true, updating a `DeliveryPipeline` that does not exist
991  // will result in the creation of a new `DeliveryPipeline`.
992  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
993
994  // Optional. If set to true, the request is validated and the user is provided
995  // with an expected result, but no actual change is made.
996  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
997}
998
999// The request object for `DeleteDeliveryPipeline`.
1000message DeleteDeliveryPipelineRequest {
1001  // Required. The name of the `DeliveryPipeline` to delete. Format should be
1002  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
1003  string name = 1 [
1004    (google.api.field_behavior) = REQUIRED,
1005    (google.api.resource_reference) = {
1006      type: "clouddeploy.googleapis.com/DeliveryPipeline"
1007    }
1008  ];
1009
1010  // Optional. A request ID to identify requests. Specify a unique request ID
1011  // so that if you must retry your request, the server knows to ignore the
1012  // request if it has already been completed. The server guarantees that for
1013  // at least 60 minutes after the first request.
1014  //
1015  // For example, consider a situation where you make an initial request and the
1016  // request times out. If you make the request again with the same request ID,
1017  // the server can check if original operation with the same request ID was
1018  // received, and if so, will ignore the second request. This prevents clients
1019  // from accidentally creating duplicate commitments.
1020  //
1021  // The request ID must be a valid UUID with the exception that zero UUID is
1022  // not supported (00000000-0000-0000-0000-000000000000).
1023  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1024
1025  // Optional. If set to true, then deleting an already deleted or non-existing
1026  // `DeliveryPipeline` will succeed.
1027  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
1028
1029  // Optional. If set, validate the request and preview the review, but do not
1030  // actually post it.
1031  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1032
1033  // Optional. If set to true, all child resources under this pipeline will also
1034  // be deleted. Otherwise, the request will only work if the pipeline has no
1035  // child resources.
1036  bool force = 6 [(google.api.field_behavior) = OPTIONAL];
1037
1038  // Optional. This checksum is computed by the server based on the value of
1039  // other fields, and may be sent on update and delete requests to ensure the
1040  // client has an up-to-date value before proceeding.
1041  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
1042}
1043
1044// Configs for the Rollback rollout.
1045message RollbackTargetConfig {
1046  // Optional. The rollback `Rollout` to create.
1047  Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL];
1048
1049  // Optional. The starting phase ID for the `Rollout`. If unspecified, the
1050  // `Rollout` will start in the stable phase.
1051  string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL];
1052}
1053
1054// The request object for `RollbackTarget`.
1055message RollbackTargetRequest {
1056  // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
1057  // created. Format should be
1058  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
1059  string name = 1 [
1060    (google.api.field_behavior) = REQUIRED,
1061    (google.api.resource_reference) = {
1062      type: "clouddeploy.googleapis.com/DeliveryPipeline"
1063    }
1064  ];
1065
1066  // Required. ID of the `Target` that is being rolled back.
1067  string target_id = 2 [(google.api.field_behavior) = REQUIRED];
1068
1069  // Required. ID of the rollback `Rollout` to create.
1070  string rollout_id = 3 [(google.api.field_behavior) = REQUIRED];
1071
1072  // Optional. ID of the `Release` to roll back to. If this isn't specified, the
1073  // previous successful `Rollout` to the specified target will be used to
1074  // determine the `Release`.
1075  string release_id = 4 [(google.api.field_behavior) = OPTIONAL];
1076
1077  // Optional. If provided, this must be the latest `Rollout` that is on the
1078  // `Target`.
1079  string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL];
1080
1081  // Optional. Configs for the rollback `Rollout`.
1082  RollbackTargetConfig rollback_config = 6
1083      [(google.api.field_behavior) = OPTIONAL];
1084
1085  // Optional. If set to true, the request is validated and the user is provided
1086  // with a `RollbackTargetResponse`.
1087  bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL];
1088}
1089
1090// The response object from `RollbackTarget`.
1091message RollbackTargetResponse {
1092  // The config of the rollback `Rollout` created or will be created.
1093  RollbackTargetConfig rollback_config = 1;
1094}
1095
1096// A `Target` resource in the Cloud Deploy API.
1097//
1098// A `Target` defines a location to which a Skaffold configuration
1099// can be deployed.
1100message Target {
1101  option (google.api.resource) = {
1102    type: "clouddeploy.googleapis.com/Target"
1103    pattern: "projects/{project}/locations/{location}/targets/{target}"
1104  };
1105
1106  // Optional. Name of the `Target`. Format is
1107  // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
1108  string name = 1 [(google.api.field_behavior) = OPTIONAL];
1109
1110  // Output only. Resource id of the `Target`.
1111  string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
1112
1113  // Output only. Unique identifier of the `Target`.
1114  string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
1115
1116  // Optional. Description of the `Target`. Max length is 255 characters.
1117  string description = 4 [(google.api.field_behavior) = OPTIONAL];
1118
1119  // Optional. User annotations. These attributes can only be set and used by
1120  // the user, and not by Cloud Deploy. See
1121  // https://google.aip.dev/128#annotations for more details such as format and
1122  // size limitations.
1123  map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL];
1124
1125  // Optional. Labels are attributes that can be set and used by both the
1126  // user and by Cloud Deploy. Labels must meet the following constraints:
1127  //
1128  // * Keys and values can contain only lowercase letters, numeric characters,
1129  // underscores, and dashes.
1130  // * All characters must use UTF-8 encoding, and international characters are
1131  // allowed.
1132  // * Keys must start with a lowercase letter or international character.
1133  // * Each resource is limited to a maximum of 64 labels.
1134  //
1135  // Both keys and values are additionally constrained to be <= 128 bytes.
1136  map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
1137
1138  // Optional. Whether or not the `Target` requires approval.
1139  bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL];
1140
1141  // Output only. Time at which the `Target` was created.
1142  google.protobuf.Timestamp create_time = 8
1143      [(google.api.field_behavior) = OUTPUT_ONLY];
1144
1145  // Output only. Most recent time at which the `Target` was updated.
1146  google.protobuf.Timestamp update_time = 9
1147      [(google.api.field_behavior) = OUTPUT_ONLY];
1148
1149  // Destination to which the Skaffold configuration is applied during a
1150  // rollout.
1151  oneof deployment_target {
1152    // Optional. Information specifying a GKE Cluster.
1153    GkeCluster gke = 15 [(google.api.field_behavior) = OPTIONAL];
1154
1155    // Optional. Information specifying an Anthos Cluster.
1156    AnthosCluster anthos_cluster = 17 [(google.api.field_behavior) = OPTIONAL];
1157
1158    // Optional. Information specifying a Cloud Run deployment target.
1159    CloudRunLocation run = 18 [(google.api.field_behavior) = OPTIONAL];
1160
1161    // Optional. Information specifying a multiTarget.
1162    MultiTarget multi_target = 19 [(google.api.field_behavior) = OPTIONAL];
1163
1164    // Optional. Information specifying a Custom Target.
1165    CustomTarget custom_target = 21 [(google.api.field_behavior) = OPTIONAL];
1166  }
1167
1168  // Optional. This checksum is computed by the server based on the value of
1169  // other fields, and may be sent on update and delete requests to ensure the
1170  // client has an up-to-date value before proceeding.
1171  string etag = 12 [(google.api.field_behavior) = OPTIONAL];
1172
1173  // Configurations for all execution that relates to this `Target`.
1174  // Each `ExecutionEnvironmentUsage` value may only be used in a single
1175  // configuration; using the same value multiple times is an error.
1176  // When one or more configurations are specified, they must include the
1177  // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
1178  // When no configurations are specified, execution will use the default
1179  // specified in `DefaultPool`.
1180  repeated ExecutionConfig execution_configs = 16;
1181
1182  // Optional. The deploy parameters to use for this target.
1183  map<string, string> deploy_parameters = 20
1184      [(google.api.field_behavior) = OPTIONAL];
1185}
1186
1187// Configuration of the environment to use when calling Skaffold.
1188message ExecutionConfig {
1189  // Possible usages of this configuration.
1190  enum ExecutionEnvironmentUsage {
1191    // Default value. This value is unused.
1192    EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0;
1193
1194    // Use for rendering.
1195    RENDER = 1;
1196
1197    // Use for deploying and deployment hooks.
1198    DEPLOY = 2;
1199
1200    // Use for deployment verification.
1201    VERIFY = 3;
1202
1203    // Use for predeploy job execution.
1204    PREDEPLOY = 4;
1205
1206    // Use for postdeploy job execution.
1207    POSTDEPLOY = 5;
1208  }
1209
1210  // Required. Usages when this configuration should be applied.
1211  repeated ExecutionEnvironmentUsage usages = 1
1212      [(google.api.field_behavior) = REQUIRED];
1213
1214  // Details of the environment.
1215  oneof execution_environment {
1216    // Optional. Use default Cloud Build pool.
1217    DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL];
1218
1219    // Optional. Use private Cloud Build pool.
1220    PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL];
1221  }
1222
1223  // Optional. The resource name of the `WorkerPool`, with the format
1224  // `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
1225  // If this optional field is unspecified, the default Cloud Build pool will be
1226  // used.
1227  string worker_pool = 4 [
1228    (google.api.field_behavior) = OPTIONAL,
1229    (google.api.resource_reference) = {
1230      type: "cloudbuild.googleapis.com/WorkerPool"
1231    }
1232  ];
1233
1234  // Optional. Google service account to use for execution. If unspecified,
1235  // the project execution service account
1236  // (<PROJECT_NUMBER>[email protected]) is used.
1237  string service_account = 5 [(google.api.field_behavior) = OPTIONAL];
1238
1239  // Optional. Cloud Storage location in which to store execution outputs. This
1240  // can either be a bucket ("gs://my-bucket") or a path within a bucket
1241  // ("gs://my-bucket/my-dir").
1242  // If unspecified, a default bucket located in the same region will be used.
1243  string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL];
1244
1245  // Optional. Execution timeout for a Cloud Build Execution. This must be
1246  // between 10m and 24h in seconds format. If unspecified, a default timeout of
1247  // 1h is used.
1248  google.protobuf.Duration execution_timeout = 7
1249      [(google.api.field_behavior) = OPTIONAL];
1250}
1251
1252// Execution using the default Cloud Build pool.
1253message DefaultPool {
1254  // Optional. Google service account to use for execution. If unspecified,
1255  // the project execution service account
1256  // (<PROJECT_NUMBER>[email protected]) will be used.
1257  string service_account = 1 [(google.api.field_behavior) = OPTIONAL];
1258
1259  // Optional. Cloud Storage location where execution outputs should be stored.
1260  // This can either be a bucket ("gs://my-bucket") or a path within a bucket
1261  // ("gs://my-bucket/my-dir").
1262  // If unspecified, a default bucket located in the same region will be used.
1263  string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL];
1264}
1265
1266// Execution using a private Cloud Build pool.
1267message PrivatePool {
1268  // Required. Resource name of the Cloud Build worker pool to use. The format
1269  // is `projects/{project}/locations/{location}/workerPools/{pool}`.
1270  string worker_pool = 1 [
1271    (google.api.field_behavior) = REQUIRED,
1272    (google.api.resource_reference) = {
1273      type: "cloudbuild.googleapis.com/WorkerPool"
1274    }
1275  ];
1276
1277  // Optional. Google service account to use for execution. If unspecified,
1278  // the project execution service account
1279  // (<PROJECT_NUMBER>[email protected]) will be used.
1280  string service_account = 2 [(google.api.field_behavior) = OPTIONAL];
1281
1282  // Optional. Cloud Storage location where execution outputs should be stored.
1283  // This can either be a bucket ("gs://my-bucket") or a path within a bucket
1284  // ("gs://my-bucket/my-dir").
1285  // If unspecified, a default bucket located in the same region will be used.
1286  string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL];
1287}
1288
1289// Information specifying a GKE Cluster.
1290message GkeCluster {
1291  // Information specifying a GKE Cluster. Format is
1292  // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
1293  string cluster = 1 [(google.api.resource_reference) = {
1294    type: "container.googleapis.com/Cluster"
1295  }];
1296
1297  // Optional. If true, `cluster` is accessed using the private IP address of
1298  // the control plane endpoint. Otherwise, the default IP address of the
1299  // control plane endpoint is used. The default IP address is the private IP
1300  // address for clusters with private control-plane endpoints and the public IP
1301  // address otherwise.
1302  //
1303  // Only specify this option when `cluster` is a [private GKE
1304  // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).
1305  bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL];
1306}
1307
1308// Information specifying an Anthos Cluster.
1309message AnthosCluster {
1310  // Membership of the GKE Hub-registered cluster to which to apply the Skaffold
1311  // configuration. Format is
1312  // `projects/{project}/locations/{location}/memberships/{membership_name}`.
1313  string membership = 1 [(google.api.resource_reference) = {
1314    type: "gkehub.googleapis.com/Membership"
1315  }];
1316}
1317
1318// Information specifying where to deploy a Cloud Run Service.
1319message CloudRunLocation {
1320  // Required. The location for the Cloud Run Service. Format must be
1321  // `projects/{project}/locations/{location}`.
1322  string location = 1 [
1323    (google.api.field_behavior) = REQUIRED,
1324    (google.api.resource_reference) = {
1325      type: "locations.googleapis.com/Location"
1326    }
1327  ];
1328}
1329
1330// Information specifying a multiTarget.
1331message MultiTarget {
1332  // Required. The target_ids of this multiTarget.
1333  repeated string target_ids = 1 [(google.api.field_behavior) = REQUIRED];
1334}
1335
1336// Information specifying a Custom Target.
1337message CustomTarget {
1338  // Required. The name of the CustomTargetType. Format must be
1339  // `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`.
1340  string custom_target_type = 1 [
1341    (google.api.field_behavior) = REQUIRED,
1342    (google.api.resource_reference) = {
1343      type: "clouddeploy.googleapis.com/CustomTargetType"
1344    }
1345  ];
1346}
1347
1348// The request object for `ListTargets`.
1349message ListTargetsRequest {
1350  // Required. The parent, which owns this collection of targets. Format must be
1351  // `projects/{project_id}/locations/{location_name}`.
1352  string parent = 1 [
1353    (google.api.field_behavior) = REQUIRED,
1354    (google.api.resource_reference) = {
1355      child_type: "clouddeploy.googleapis.com/Target"
1356    }
1357  ];
1358
1359  // Optional. The maximum number of `Target` objects to return. The service may
1360  // return fewer than this value. If unspecified, at most 50 `Target` objects
1361  // will be returned. The maximum value is 1000; values above 1000 will be set
1362  // to 1000.
1363  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1364
1365  // Optional. A page token, received from a previous `ListTargets` call.
1366  // Provide this to retrieve the subsequent page.
1367  //
1368  // When paginating, all other provided parameters match
1369  // the call that provided the page token.
1370  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1371
1372  // Optional. Filter targets to be returned. See https://google.aip.dev/160 for
1373  // more details.
1374  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1375
1376  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for
1377  // more details.
1378  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1379}
1380
1381// The response object from `ListTargets`.
1382message ListTargetsResponse {
1383  // The `Target` objects.
1384  repeated Target targets = 1;
1385
1386  // A token, which can be sent as `page_token` to retrieve the next page.
1387  // If this field is omitted, there are no subsequent pages.
1388  string next_page_token = 2;
1389
1390  // Locations that could not be reached.
1391  repeated string unreachable = 3;
1392}
1393
1394// The request object for `GetTarget`.
1395message GetTargetRequest {
1396  // Required. Name of the `Target`. Format must be
1397  // `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
1398  string name = 1 [
1399    (google.api.field_behavior) = REQUIRED,
1400    (google.api.resource_reference) = {
1401      type: "clouddeploy.googleapis.com/Target"
1402    }
1403  ];
1404}
1405
1406// The request object for `CreateTarget`.
1407message CreateTargetRequest {
1408  // Required. The parent collection in which the `Target` should be created.
1409  // Format should be
1410  // `projects/{project_id}/locations/{location_name}`.
1411  string parent = 1 [
1412    (google.api.field_behavior) = REQUIRED,
1413    (google.api.resource_reference) = {
1414      child_type: "clouddeploy.googleapis.com/Target"
1415    }
1416  ];
1417
1418  // Required. ID of the `Target`.
1419  string target_id = 2 [(google.api.field_behavior) = REQUIRED];
1420
1421  // Required. The `Target` to create.
1422  Target target = 3 [(google.api.field_behavior) = REQUIRED];
1423
1424  // Optional. A request ID to identify requests. Specify a unique request ID
1425  // so that if you must retry your request, the server knows to ignore the
1426  // request if it has already been completed. The server guarantees that for
1427  // at least 60 minutes after the first request.
1428  //
1429  // For example, consider a situation where you make an initial request and the
1430  // request times out. If you make the request again with the same request ID,
1431  // the server can check if original operation with the same request ID was
1432  // received, and if so, will ignore the second request. This prevents clients
1433  // from accidentally creating duplicate commitments.
1434  //
1435  // The request ID must be a valid UUID with the exception that zero UUID is
1436  // not supported (00000000-0000-0000-0000-000000000000).
1437  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1438
1439  // Optional. If set to true, the request is validated and the user is provided
1440  // with an expected result, but no actual change is made.
1441  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1442}
1443
1444// The request object for `UpdateTarget`.
1445message UpdateTargetRequest {
1446  // Required. Field mask is used to specify the fields to be overwritten in the
1447  // Target resource by the update.
1448  // The fields specified in the update_mask are relative to the resource, not
1449  // the full request. A field will be overwritten if it's in the mask. If the
1450  // user doesn't provide a mask then all fields are overwritten.
1451  google.protobuf.FieldMask update_mask = 1
1452      [(google.api.field_behavior) = REQUIRED];
1453
1454  // Required. The `Target` to update.
1455  Target target = 2 [(google.api.field_behavior) = REQUIRED];
1456
1457  // Optional. A request ID to identify requests. Specify a unique request ID
1458  // so that if you must retry your request, the server knows to ignore the
1459  // request if it has already been completed. The server guarantees that for
1460  // at least 60 minutes after the first request.
1461  //
1462  // For example, consider a situation where you make an initial request and the
1463  // request times out. If you make the request again with the same request ID,
1464  // the server can check if original operation with the same request ID was
1465  // received, and if so, will ignore the second request. This prevents clients
1466  // from accidentally creating duplicate commitments.
1467  //
1468  // The request ID must be a valid UUID with the exception that zero UUID is
1469  // not supported (00000000-0000-0000-0000-000000000000).
1470  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1471
1472  // Optional. If set to true, updating a `Target` that does not exist will
1473  // result in the creation of a new `Target`.
1474  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
1475
1476  // Optional. If set to true, the request is validated and the user is provided
1477  // with an expected result, but no actual change is made.
1478  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1479}
1480
1481// The request object for `DeleteTarget`.
1482message DeleteTargetRequest {
1483  // Required. The name of the `Target` to delete. Format should be
1484  // `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
1485  string name = 1 [
1486    (google.api.field_behavior) = REQUIRED,
1487    (google.api.resource_reference) = {
1488      type: "clouddeploy.googleapis.com/Target"
1489    }
1490  ];
1491
1492  // Optional. A request ID to identify requests. Specify a unique request ID
1493  // so that if you must retry your request, the server knows to ignore the
1494  // request if it has already been completed. The server guarantees that for
1495  // at least 60 minutes after the first request.
1496  //
1497  // For example, consider a situation where you make an initial request and the
1498  // request times out. If you make the request again with the same request ID,
1499  // the server can check if original operation with the same request ID was
1500  // received, and if so, will ignore the second request. This prevents clients
1501  // from accidentally creating duplicate commitments.
1502  //
1503  // The request ID must be a valid UUID with the exception that zero UUID is
1504  // not supported (00000000-0000-0000-0000-000000000000).
1505  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1506
1507  // Optional. If set to true, then deleting an already deleted or non-existing
1508  // `Target` will succeed.
1509  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
1510
1511  // Optional. If set, validate the request and preview the review, but do not
1512  // actually post it.
1513  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1514
1515  // Optional. This checksum is computed by the server based on the value of
1516  // other fields, and may be sent on update and delete requests to ensure the
1517  // client has an up-to-date value before proceeding.
1518  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
1519}
1520
1521// A `CustomTargetType` resource in the Cloud Deploy API.
1522//
1523// A `CustomTargetType` defines a type of custom target that can be referenced
1524// in a `Target` in order to facilitate deploying to other systems besides the
1525// supported runtimes.
1526message CustomTargetType {
1527  option (google.api.resource) = {
1528    type: "clouddeploy.googleapis.com/CustomTargetType"
1529    pattern: "projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}"
1530  };
1531
1532  // Optional. Name of the `CustomTargetType`. Format is
1533  // `projects/{project}/locations/{location}/customTargetTypes/[a-z][a-z0-9\-]{0,62}`.
1534  string name = 1 [(google.api.field_behavior) = OPTIONAL];
1535
1536  // Output only. Resource id of the `CustomTargetType`.
1537  string custom_target_type_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
1538
1539  // Output only. Unique identifier of the `CustomTargetType`.
1540  string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
1541
1542  // Optional. Description of the `CustomTargetType`. Max length is 255
1543  // characters.
1544  string description = 4 [(google.api.field_behavior) = OPTIONAL];
1545
1546  // Optional. User annotations. These attributes can only be set and used by
1547  // the user, and not by Cloud Deploy. See
1548  // https://google.aip.dev/128#annotations for more details such as format and
1549  // size limitations.
1550  map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL];
1551
1552  // Optional. Labels are attributes that can be set and used by both the
1553  // user and by Cloud Deploy. Labels must meet the following constraints:
1554  //
1555  // * Keys and values can contain only lowercase letters, numeric characters,
1556  // underscores, and dashes.
1557  // * All characters must use UTF-8 encoding, and international characters are
1558  // allowed.
1559  // * Keys must start with a lowercase letter or international character.
1560  // * Each resource is limited to a maximum of 64 labels.
1561  //
1562  // Both keys and values are additionally constrained to be <= 128 bytes.
1563  map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
1564
1565  // Output only. Time at which the `CustomTargetType` was created.
1566  google.protobuf.Timestamp create_time = 7
1567      [(google.api.field_behavior) = OUTPUT_ONLY];
1568
1569  // Output only. Most recent time at which the `CustomTargetType` was updated.
1570  google.protobuf.Timestamp update_time = 8
1571      [(google.api.field_behavior) = OUTPUT_ONLY];
1572
1573  // Optional. This checksum is computed by the server based on the value of
1574  // other fields, and may be sent on update and delete requests to ensure the
1575  // client has an up-to-date value before proceeding.
1576  string etag = 9 [(google.api.field_behavior) = OPTIONAL];
1577
1578  // Defines the `CustomTargetType` renderer and deployer.
1579  oneof definition {
1580    // Configures render and deploy for the `CustomTargetType` using Skaffold
1581    // custom actions.
1582    CustomTargetSkaffoldActions custom_actions = 10;
1583  }
1584}
1585
1586// CustomTargetSkaffoldActions represents the `CustomTargetType` configuration
1587// using Skaffold custom actions.
1588message CustomTargetSkaffoldActions {
1589  // Optional. The Skaffold custom action responsible for render operations. If
1590  // not provided then Cloud Deploy will perform the render operations via
1591  // `skaffold render`.
1592  string render_action = 1 [(google.api.field_behavior) = OPTIONAL];
1593
1594  // Required. The Skaffold custom action responsible for deploy operations.
1595  string deploy_action = 2 [(google.api.field_behavior) = REQUIRED];
1596
1597  // Optional. List of Skaffold modules Cloud Deploy will include in the
1598  // Skaffold Config as required before performing diagnose.
1599  repeated SkaffoldModules include_skaffold_modules = 3
1600      [(google.api.field_behavior) = OPTIONAL];
1601}
1602
1603// Skaffold Config modules and their remote source.
1604message SkaffoldModules {
1605  // Git repository containing Skaffold Config modules.
1606  message SkaffoldGitSource {
1607    // Required. Git repository the package should be cloned from.
1608    string repo = 1 [(google.api.field_behavior) = REQUIRED];
1609
1610    // Optional. Relative path from the repository root to the Skaffold file.
1611    string path = 2 [(google.api.field_behavior) = OPTIONAL];
1612
1613    // Optional. Git branch or tag to use when cloning the repository.
1614    string ref = 3 [(google.api.field_behavior) = OPTIONAL];
1615  }
1616
1617  // Cloud Storage bucket containing Skaffold Config modules.
1618  message SkaffoldGCSSource {
1619    // Required. Cloud Storage source paths to copy recursively. For example,
1620    // providing "gs://my-bucket/dir/configs/*" will result in Skaffold copying
1621    // all files within the "dir/configs" directory in the bucket "my-bucket".
1622    string source = 1 [(google.api.field_behavior) = REQUIRED];
1623
1624    // Optional. Relative path from the source to the Skaffold file.
1625    string path = 2 [(google.api.field_behavior) = OPTIONAL];
1626  }
1627
1628  // Cloud Build V2 Repository containing Skaffold Configs.
1629  message SkaffoldGCBRepoSource {
1630    // Required. Name of the Cloud Build V2 Repository.
1631    // Format is
1632    // projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}.
1633    string repository = 1 [
1634      (google.api.field_behavior) = REQUIRED,
1635      (google.api.resource_reference) = {
1636        type: "cloudbuild.googleapis.com/Repository"
1637      }
1638    ];
1639
1640    // Optional. Relative path from the repository root to the Skaffold Config
1641    // file.
1642    string path = 2 [(google.api.field_behavior) = OPTIONAL];
1643
1644    // Optional. Branch or tag to use when cloning the repository.
1645    string ref = 3 [(google.api.field_behavior) = OPTIONAL];
1646  }
1647
1648  // Optional. The Skaffold Config modules to use from the specified source.
1649  repeated string configs = 1 [(google.api.field_behavior) = OPTIONAL];
1650
1651  // The source that contains the Skaffold Config modules.
1652  oneof source {
1653    // Remote git repository containing the Skaffold Config modules.
1654    SkaffoldGitSource git = 2;
1655
1656    // Cloud Storage bucket containing the Skaffold Config modules.
1657    SkaffoldGCSSource google_cloud_storage = 3;
1658
1659    // Cloud Build V2 repository containing the Skaffold Config modules.
1660    SkaffoldGCBRepoSource google_cloud_build_repo = 4;
1661  }
1662}
1663
1664// The request object for `ListCustomTargetTypes`.
1665message ListCustomTargetTypesRequest {
1666  // Required. The parent that owns this collection of custom target types.
1667  // Format must be `projects/{project_id}/locations/{location_name}`.
1668  string parent = 1 [
1669    (google.api.field_behavior) = REQUIRED,
1670    (google.api.resource_reference) = {
1671      child_type: "clouddeploy.googleapis.com/CustomTargetType"
1672    }
1673  ];
1674
1675  // Optional. The maximum number of `CustomTargetType` objects to return. The
1676  // service may return fewer than this value. If unspecified, at most 50
1677  // `CustomTargetType` objects will be returned. The maximum value is 1000;
1678  // values above 1000 will be set to 1000.
1679  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1680
1681  // Optional. A page token, received from a previous `ListCustomTargetTypes`
1682  // call. Provide this to retrieve the subsequent page.
1683  //
1684  // When paginating, all other provided parameters match
1685  // the call that provided the page token.
1686  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1687
1688  // Optional. Filter custom target types to be returned. See
1689  // https://google.aip.dev/160 for more details.
1690  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1691
1692  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for
1693  // more details.
1694  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1695}
1696
1697// The response object from `ListCustomTargetTypes.`
1698message ListCustomTargetTypesResponse {
1699  // The `CustomTargetType` objects.
1700  repeated CustomTargetType custom_target_types = 1;
1701
1702  // A token, which can be sent as `page_token` to retrieve the next page.
1703  // If this field is omitted, there are no subsequent pages.
1704  string next_page_token = 2;
1705
1706  // Locations that could not be reached.
1707  repeated string unreachable = 3;
1708}
1709
1710// The request object for `GetCustomTargetType`.
1711message GetCustomTargetTypeRequest {
1712  // Required. Name of the `CustomTargetType`. Format must be
1713  // `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
1714  string name = 1 [
1715    (google.api.field_behavior) = REQUIRED,
1716    (google.api.resource_reference) = {
1717      type: "clouddeploy.googleapis.com/CustomTargetType"
1718    }
1719  ];
1720}
1721
1722// The request object for `CreateCustomTargetType`.
1723message CreateCustomTargetTypeRequest {
1724  // Required. The parent collection in which the `CustomTargetType` should be
1725  // created. Format should be
1726  // `projects/{project_id}/locations/{location_name}`.
1727  string parent = 1 [
1728    (google.api.field_behavior) = REQUIRED,
1729    (google.api.resource_reference) = {
1730      child_type: "clouddeploy.googleapis.com/CustomTargetType"
1731    }
1732  ];
1733
1734  // Required. ID of the `CustomTargetType`.
1735  string custom_target_type_id = 2 [(google.api.field_behavior) = REQUIRED];
1736
1737  // Required. The `CustomTargetType` to create.
1738  CustomTargetType custom_target_type = 3
1739      [(google.api.field_behavior) = REQUIRED];
1740
1741  // Optional. A request ID to identify requests. Specify a unique request ID
1742  // so that if you must retry your request, the server knows to ignore the
1743  // request if it has already been completed. The server guarantees that for
1744  // at least 60 minutes after the first request.
1745  //
1746  // For example, consider a situation where you make an initial request and the
1747  // request times out. If you make the request again with the same request ID,
1748  // the server can check if original operation with the same request ID was
1749  // received, and if so, will ignore the second request. This prevents clients
1750  // from accidentally creating duplicate commitments.
1751  //
1752  // The request ID must be a valid UUID with the exception that zero UUID is
1753  // not supported (00000000-0000-0000-0000-000000000000).
1754  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
1755
1756  // Optional. If set to true, the request is validated and the user is provided
1757  // with an expected result, but no actual change is made.
1758  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1759}
1760
1761// The request object for `UpdateCustomTargetType`.
1762message UpdateCustomTargetTypeRequest {
1763  // Required. Field mask is used to specify the fields to be overwritten in the
1764  // `CustomTargetType` resource by the update.
1765  // The fields specified in the update_mask are relative to the resource, not
1766  // the full request. A field will be overwritten if it's in the mask. If the
1767  // user doesn't provide a mask then all fields are overwritten.
1768  google.protobuf.FieldMask update_mask = 1
1769      [(google.api.field_behavior) = REQUIRED];
1770
1771  // Required. The `CustomTargetType` to update.
1772  CustomTargetType custom_target_type = 2
1773      [(google.api.field_behavior) = REQUIRED];
1774
1775  // Optional. A request ID to identify requests. Specify a unique request ID
1776  // so that if you must retry your request, the server knows to ignore the
1777  // request if it has already been completed. The server guarantees that for
1778  // at least 60 minutes after the first request.
1779  //
1780  // For example, consider a situation where you make an initial request and the
1781  // request times out. If you make the request again with the same request ID,
1782  // the server can check if original operation with the same request ID was
1783  // received, and if so, will ignore the second request. This prevents clients
1784  // from accidentally creating duplicate commitments.
1785  //
1786  // The request ID must be a valid UUID with the exception that zero UUID is
1787  // not supported (00000000-0000-0000-0000-000000000000).
1788  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
1789
1790  // Optional. If set to true, updating a `CustomTargetType` that does not exist
1791  // will result in the creation of a new `CustomTargetType`.
1792  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
1793
1794  // Optional. If set to true, the request is validated and the user is provided
1795  // with an expected result, but no actual change is made.
1796  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
1797}
1798
1799// The request object for `DeleteCustomTargetType`.
1800message DeleteCustomTargetTypeRequest {
1801  // Required. The name of the `CustomTargetType` to delete. Format must be
1802  // `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
1803  string name = 1 [
1804    (google.api.field_behavior) = REQUIRED,
1805    (google.api.resource_reference) = {
1806      type: "clouddeploy.googleapis.com/CustomTargetType"
1807    }
1808  ];
1809
1810  // Optional. A request ID to identify requests. Specify a unique request ID
1811  // so that if you must retry your request, the server knows to ignore the
1812  // request if it has already been completed. The server guarantees that for
1813  // at least 60 minutes after the first request.
1814  //
1815  // For example, consider a situation where you make an initial request and the
1816  // request times out. If you make the request again with the same request ID,
1817  // the server can check if original operation with the same request ID was
1818  // received, and if so, will ignore the second request. This prevents clients
1819  // from accidentally creating duplicate commitments.
1820  //
1821  // The request ID must be a valid UUID with the exception that zero UUID is
1822  // not supported (00000000-0000-0000-0000-000000000000).
1823  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
1824
1825  // Optional. If set to true, then deleting an already deleted or non-existing
1826  // `CustomTargetType` will succeed.
1827  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
1828
1829  // Optional. If set to true, the request is validated but no actual change is
1830  // made.
1831  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
1832
1833  // Optional. This checksum is computed by the server based on the value of
1834  // other fields, and may be sent on update and delete requests to ensure the
1835  // client has an up-to-date value before proceeding.
1836  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
1837}
1838
1839// Contains criteria for selecting Targets.
1840message TargetAttribute {
1841  // ID of the `Target`. The value of this field could be one of the
1842  // following:
1843  // * The last segment of a target name. It only needs the ID to determine
1844  // which target is being referred to
1845  // * "*", all targets in a location.
1846  string id = 1;
1847
1848  // Target labels.
1849  map<string, string> labels = 2;
1850}
1851
1852// A `Release` resource in the Cloud Deploy API.
1853//
1854// A `Release` defines a specific Skaffold configuration instance
1855// that can be deployed.
1856message Release {
1857  option (google.api.resource) = {
1858    type: "clouddeploy.googleapis.com/Release"
1859    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}"
1860  };
1861
1862  // Valid states of the render operation.
1863  enum RenderState {
1864    // The render state is unspecified.
1865    RENDER_STATE_UNSPECIFIED = 0;
1866
1867    // All rendering operations have completed successfully.
1868    SUCCEEDED = 1;
1869
1870    // All rendering operations have completed, and one or more have failed.
1871    FAILED = 2;
1872
1873    // Rendering has started and is not complete.
1874    IN_PROGRESS = 3;
1875  }
1876
1877  // Details of rendering for a single target.
1878  message TargetRender {
1879    // Valid states of the render operation.
1880    enum TargetRenderState {
1881      // The render operation state is unspecified.
1882      TARGET_RENDER_STATE_UNSPECIFIED = 0;
1883
1884      // The render operation has completed successfully.
1885      SUCCEEDED = 1;
1886
1887      // The render operation has failed.
1888      FAILED = 2;
1889
1890      // The render operation is in progress.
1891      IN_PROGRESS = 3;
1892    }
1893
1894    // Well-known rendering failures.
1895    enum FailureCause {
1896      // No reason for failure is specified.
1897      FAILURE_CAUSE_UNSPECIFIED = 0;
1898
1899      // Cloud Build is not available, either because it is not enabled or
1900      // because Cloud Deploy has insufficient permissions. See [required
1901      // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
1902      CLOUD_BUILD_UNAVAILABLE = 1;
1903
1904      // The render operation did not complete successfully; check Cloud Build
1905      // logs.
1906      EXECUTION_FAILED = 2;
1907
1908      // Cloud Build failed to fulfill Cloud Deploy's request. See
1909      // failure_message for additional details.
1910      CLOUD_BUILD_REQUEST_FAILED = 3;
1911
1912      // The render operation did not complete successfully because the
1913      // verification stanza required for verify was not found on the Skaffold
1914      // configuration.
1915      VERIFICATION_CONFIG_NOT_FOUND = 4;
1916
1917      // The render operation did not complete successfully because the custom
1918      // action required for predeploy or postdeploy was not found in the
1919      // Skaffold configuration. See failure_message for additional details.
1920      CUSTOM_ACTION_NOT_FOUND = 5;
1921
1922      // Release failed during rendering because the release configuration is
1923      // not supported with the specified deployment strategy.
1924      DEPLOYMENT_STRATEGY_NOT_SUPPORTED = 6;
1925
1926      // The render operation had a feature configured that is not supported.
1927      RENDER_FEATURE_NOT_SUPPORTED = 7;
1928    }
1929
1930    // Output only. The resource name of the Cloud Build `Build` object that is
1931    // used to render the manifest for this target. Format is
1932    // `projects/{project}/locations/{location}/builds/{build}`.
1933    string rendering_build = 1 [
1934      (google.api.field_behavior) = OUTPUT_ONLY,
1935      (google.api.resource_reference) = {
1936        type: "cloudbuild.googleapis.com/Build"
1937      }
1938    ];
1939
1940    // Output only. Current state of the render operation for this Target.
1941    TargetRenderState rendering_state = 2
1942        [(google.api.field_behavior) = OUTPUT_ONLY];
1943
1944    // Output only. Metadata related to the `Release` render for this Target.
1945    RenderMetadata metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1946
1947    // Output only. Reason this render failed. This will always be unspecified
1948    // while the render in progress.
1949    FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1950
1951    // Output only. Additional information about the render failure, if
1952    // available.
1953    string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
1954  }
1955
1956  // ReleaseReadyCondition contains information around the status of the
1957  // Release. If a release is not ready, you cannot create a rollout with the
1958  // release.
1959  message ReleaseReadyCondition {
1960    // True if the Release is in a valid state. Otherwise at least one condition
1961    // in `ReleaseCondition` is in an invalid state. Iterate over those
1962    // conditions and see which condition(s) has status = false to find out what
1963    // is wrong with the Release.
1964    bool status = 1;
1965  }
1966
1967  // SkaffoldSupportedCondition contains information about when support for the
1968  // release's version of Skaffold ends.
1969  message SkaffoldSupportedCondition {
1970    // True if the version of Skaffold used by this release is supported.
1971    bool status = 1;
1972
1973    // The Skaffold support state for this release's version of Skaffold.
1974    SkaffoldSupportState skaffold_support_state = 2;
1975
1976    // The time at which this release's version of Skaffold will enter
1977    // maintenance mode.
1978    google.protobuf.Timestamp maintenance_mode_time = 3;
1979
1980    // The time at which this release's version of Skaffold will no longer be
1981    // supported.
1982    google.protobuf.Timestamp support_expiration_time = 4;
1983  }
1984
1985  // ReleaseCondition contains all conditions relevant to a Release.
1986  message ReleaseCondition {
1987    // Details around the Releases's overall status.
1988    ReleaseReadyCondition release_ready_condition = 1;
1989
1990    // Details around the support state of the release's Skaffold
1991    // version.
1992    SkaffoldSupportedCondition skaffold_supported_condition = 2;
1993  }
1994
1995  // Optional. Name of the `Release`. Format is
1996  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
1997  string name = 1 [(google.api.field_behavior) = OPTIONAL];
1998
1999  // Output only. Unique identifier of the `Release`.
2000  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2001
2002  // Description of the `Release`. Max length is 255 characters.
2003  string description = 3;
2004
2005  // User annotations. These attributes can only be set and used by the
2006  // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations
2007  // for more details such as format and size limitations.
2008  map<string, string> annotations = 4;
2009
2010  // Labels are attributes that can be set and used by both the
2011  // user and by Cloud Deploy. Labels must meet the following constraints:
2012  //
2013  // * Keys and values can contain only lowercase letters, numeric characters,
2014  // underscores, and dashes.
2015  // * All characters must use UTF-8 encoding, and international characters are
2016  // allowed.
2017  // * Keys must start with a lowercase letter or international character.
2018  // * Each resource is limited to a maximum of 64 labels.
2019  //
2020  // Both keys and values are additionally constrained to be <= 128 bytes.
2021  map<string, string> labels = 5;
2022
2023  // Output only. Indicates whether this is an abandoned release.
2024  bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
2025
2026  // Output only. Time at which the `Release` was created.
2027  google.protobuf.Timestamp create_time = 6
2028      [(google.api.field_behavior) = OUTPUT_ONLY];
2029
2030  // Output only. Time at which the render began.
2031  google.protobuf.Timestamp render_start_time = 7
2032      [(google.api.field_behavior) = OUTPUT_ONLY];
2033
2034  // Output only. Time at which the render completed.
2035  google.protobuf.Timestamp render_end_time = 8
2036      [(google.api.field_behavior) = OUTPUT_ONLY];
2037
2038  // Cloud Storage URI of tar.gz archive containing Skaffold configuration.
2039  string skaffold_config_uri = 17;
2040
2041  // Filepath of the Skaffold config inside of the config URI.
2042  string skaffold_config_path = 9;
2043
2044  // List of artifacts to pass through to Skaffold command.
2045  repeated BuildArtifact build_artifacts = 10;
2046
2047  // Output only. Snapshot of the parent pipeline taken at release creation
2048  // time.
2049  DeliveryPipeline delivery_pipeline_snapshot = 11
2050      [(google.api.field_behavior) = OUTPUT_ONLY];
2051
2052  // Output only. Snapshot of the targets taken at release creation time.
2053  repeated Target target_snapshots = 12
2054      [(google.api.field_behavior) = OUTPUT_ONLY];
2055
2056  // Output only. Snapshot of the custom target types referenced by the targets
2057  // taken at release creation time.
2058  repeated CustomTargetType custom_target_type_snapshots = 27
2059      [(google.api.field_behavior) = OUTPUT_ONLY];
2060
2061  // Output only. Current state of the render operation.
2062  RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
2063
2064  // This checksum is computed by the server based on the value of other
2065  // fields, and may be sent on update and delete requests to ensure the
2066  // client has an up-to-date value before proceeding.
2067  string etag = 16;
2068
2069  // The Skaffold version to use when operating on this release, such as
2070  // "1.20.0". Not all versions are valid; Cloud Deploy supports a specific set
2071  // of versions.
2072  //
2073  // If unset, the most recent supported Skaffold version will be used.
2074  string skaffold_version = 19;
2075
2076  // Output only. Map from target ID to the target artifacts created
2077  // during the render operation.
2078  map<string, TargetArtifact> target_artifacts = 20
2079      [(google.api.field_behavior) = OUTPUT_ONLY];
2080
2081  // Output only. Map from target ID to details of the render operation for that
2082  // target.
2083  map<string, TargetRender> target_renders = 22
2084      [(google.api.field_behavior) = OUTPUT_ONLY];
2085
2086  // Output only. Information around the state of the Release.
2087  ReleaseCondition condition = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
2088
2089  // Optional. The deploy parameters to use for all targets in this release.
2090  map<string, string> deploy_parameters = 25
2091      [(google.api.field_behavior) = OPTIONAL];
2092}
2093
2094// Description of an a image to use during Skaffold rendering.
2095message BuildArtifact {
2096  // Image name in Skaffold configuration.
2097  string image = 3;
2098
2099  // Image tag to use. This will generally be the full path to an image, such
2100  // as "gcr.io/my-project/busybox:1.2.3" or
2101  // "gcr.io/my-project/busybox@sha256:abc123".
2102  string tag = 2;
2103}
2104
2105// The artifacts produced by a target render operation.
2106message TargetArtifact {
2107  // Contains the paths to the artifacts, relative to the URI, for a phase.
2108  message PhaseArtifact {
2109    // Output only. File path of the resolved Skaffold configuration relative to
2110    // the URI.
2111    string skaffold_config_path = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2112
2113    // Output only. File path of the rendered manifest relative to the URI.
2114    string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2115
2116    // Output only. File path of the directory of rendered job manifests
2117    // relative to the URI. This is only set if it is applicable.
2118    string job_manifests_path = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
2119  }
2120
2121  oneof uri {
2122    // Output only. URI of a directory containing the artifacts. This contains
2123    // deployment configuration used by Skaffold during a rollout, and all
2124    // paths are relative to this location.
2125    string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
2126  }
2127
2128  // Output only. File path of the resolved Skaffold configuration relative to
2129  // the URI.
2130  string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2131
2132  // Output only. File path of the rendered manifest relative to the URI.
2133  string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2134
2135  // Output only. Map from the phase ID to the phase artifacts for the `Target`.
2136  map<string, PhaseArtifact> phase_artifacts = 5
2137      [(google.api.field_behavior) = OUTPUT_ONLY];
2138}
2139
2140// The artifacts produced by a deploy operation.
2141message DeployArtifact {
2142  // Output only. URI of a directory containing the artifacts. All paths are
2143  // relative to this location.
2144  string artifact_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2145
2146  // Output only. File paths of the manifests applied during the deploy
2147  // operation relative to the URI.
2148  repeated string manifest_paths = 2
2149      [(google.api.field_behavior) = OUTPUT_ONLY];
2150}
2151
2152// CloudRunRenderMetadata contains Cloud Run information associated with a
2153// `Release` render.
2154message CloudRunRenderMetadata {
2155  // Output only. The name of the Cloud Run Service in the rendered manifest.
2156  // Format is `projects/{project}/locations/{location}/services/{service}`.
2157  string service = 1 [
2158    (google.api.field_behavior) = OUTPUT_ONLY,
2159    (google.api.resource_reference) = { type: "run.googleapis.com/Service" }
2160  ];
2161}
2162
2163// RenderMetadata includes information associated with a `Release` render.
2164message RenderMetadata {
2165  // Output only. Metadata associated with rendering for Cloud Run.
2166  CloudRunRenderMetadata cloud_run = 1
2167      [(google.api.field_behavior) = OUTPUT_ONLY];
2168
2169  // Output only. Custom metadata provided by user-defined render operation.
2170  CustomMetadata custom = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2171}
2172
2173// The request object for `ListReleases`.
2174message ListReleasesRequest {
2175  // Required. The `DeliveryPipeline` which owns this collection of `Release`
2176  // objects.
2177  string parent = 1 [
2178    (google.api.field_behavior) = REQUIRED,
2179    (google.api.resource_reference) = {
2180      type: "clouddeploy.googleapis.com/DeliveryPipeline"
2181    }
2182  ];
2183
2184  // Optional. The maximum number of `Release` objects to return. The service
2185  // may return fewer than this value. If unspecified, at most 50 `Release`
2186  // objects will be returned. The maximum value is 1000; values above 1000 will
2187  // be set to 1000.
2188  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
2189
2190  // Optional. A page token, received from a previous `ListReleases` call.
2191  // Provide this to retrieve the subsequent page.
2192  //
2193  // When paginating, all other provided parameters match
2194  // the call that provided the page token.
2195  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
2196
2197  // Optional. Filter releases to be returned. See https://google.aip.dev/160
2198  // for more details.
2199  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
2200
2201  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for
2202  // more details.
2203  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
2204}
2205
2206// The response object from `ListReleases`.
2207message ListReleasesResponse {
2208  // The `Release` objects.
2209  repeated Release releases = 1;
2210
2211  // A token, which can be sent as `page_token` to retrieve the next page.
2212  // If this field is omitted, there are no subsequent pages.
2213  string next_page_token = 2;
2214
2215  // Locations that could not be reached.
2216  repeated string unreachable = 3;
2217}
2218
2219// The request object for `GetRelease`.
2220message GetReleaseRequest {
2221  // Required. Name of the `Release`. Format must be
2222  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
2223  string name = 1 [
2224    (google.api.field_behavior) = REQUIRED,
2225    (google.api.resource_reference) = {
2226      type: "clouddeploy.googleapis.com/Release"
2227    }
2228  ];
2229}
2230
2231// The request object for `CreateRelease`,
2232message CreateReleaseRequest {
2233  // Required. The parent collection in which the `Release` should be created.
2234  // Format should be
2235  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
2236  string parent = 1 [
2237    (google.api.field_behavior) = REQUIRED,
2238    (google.api.resource_reference) = {
2239      type: "clouddeploy.googleapis.com/DeliveryPipeline"
2240    }
2241  ];
2242
2243  // Required. ID of the `Release`.
2244  string release_id = 2 [(google.api.field_behavior) = REQUIRED];
2245
2246  // Required. The `Release` to create.
2247  Release release = 3 [(google.api.field_behavior) = REQUIRED];
2248
2249  // Optional. A request ID to identify requests. Specify a unique request ID
2250  // so that if you must retry your request, the server knows to ignore the
2251  // request if it has already been completed. The server guarantees that for
2252  // at least 60 minutes after the first request.
2253  //
2254  // For example, consider a situation where you make an initial request and the
2255  // request times out. If you make the request again with the same request ID,
2256  // the server can check if original operation with the same request ID was
2257  // received, and if so, will ignore the second request. This prevents clients
2258  // from accidentally creating duplicate commitments.
2259  //
2260  // The request ID must be a valid UUID with the exception that zero UUID is
2261  // not supported (00000000-0000-0000-0000-000000000000).
2262  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
2263
2264  // Optional. If set to true, the request is validated and the user is provided
2265  // with an expected result, but no actual change is made.
2266  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
2267}
2268
2269// A `Rollout` resource in the Cloud Deploy API.
2270//
2271// A `Rollout` contains information around a specific deployment to a `Target`.
2272message Rollout {
2273  option (google.api.resource) = {
2274    type: "clouddeploy.googleapis.com/Rollout"
2275    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}"
2276  };
2277
2278  // Valid approval states of a `Rollout`.
2279  enum ApprovalState {
2280    // The `Rollout` has an unspecified approval state.
2281    APPROVAL_STATE_UNSPECIFIED = 0;
2282
2283    // The `Rollout` requires approval.
2284    NEEDS_APPROVAL = 1;
2285
2286    // The `Rollout` does not require approval.
2287    DOES_NOT_NEED_APPROVAL = 2;
2288
2289    // The `Rollout` has been approved.
2290    APPROVED = 3;
2291
2292    // The `Rollout` has been rejected.
2293    REJECTED = 4;
2294  }
2295
2296  // Valid states of a `Rollout`.
2297  enum State {
2298    // The `Rollout` has an unspecified state.
2299    STATE_UNSPECIFIED = 0;
2300
2301    // The `Rollout` has completed successfully.
2302    SUCCEEDED = 1;
2303
2304    // The `Rollout` has failed.
2305    FAILED = 2;
2306
2307    // The `Rollout` is being deployed.
2308    IN_PROGRESS = 3;
2309
2310    // The `Rollout` needs approval.
2311    PENDING_APPROVAL = 4;
2312
2313    // An approver rejected the `Rollout`.
2314    APPROVAL_REJECTED = 5;
2315
2316    // The `Rollout` is waiting for an earlier Rollout(s) to complete on this
2317    // `Target`.
2318    PENDING = 6;
2319
2320    // The `Rollout` is waiting for the `Release` to be fully rendered.
2321    PENDING_RELEASE = 7;
2322
2323    // The `Rollout` is in the process of being cancelled.
2324    CANCELLING = 8;
2325
2326    // The `Rollout` has been cancelled.
2327    CANCELLED = 9;
2328
2329    // The `Rollout` is halted.
2330    HALTED = 10;
2331  }
2332
2333  // Well-known rollout failures.
2334  enum FailureCause {
2335    // No reason for failure is specified.
2336    FAILURE_CAUSE_UNSPECIFIED = 0;
2337
2338    // Cloud Build is not available, either because it is not enabled or because
2339    // Cloud Deploy has insufficient permissions. See [required
2340    // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
2341    CLOUD_BUILD_UNAVAILABLE = 1;
2342
2343    // The deploy operation did not complete successfully; check Cloud Build
2344    // logs.
2345    EXECUTION_FAILED = 2;
2346
2347    // Deployment did not complete within the alloted time.
2348    DEADLINE_EXCEEDED = 3;
2349
2350    // Release is in a failed state.
2351    RELEASE_FAILED = 4;
2352
2353    // Release is abandoned.
2354    RELEASE_ABANDONED = 5;
2355
2356    // No Skaffold verify configuration was found.
2357    VERIFICATION_CONFIG_NOT_FOUND = 6;
2358
2359    // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message
2360    // for additional details.
2361    CLOUD_BUILD_REQUEST_FAILED = 7;
2362
2363    // A Rollout operation had a feature configured that is not supported.
2364    OPERATION_FEATURE_NOT_SUPPORTED = 8;
2365  }
2366
2367  // Optional. Name of the `Rollout`. Format is
2368  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
2369  string name = 1 [(google.api.field_behavior) = OPTIONAL];
2370
2371  // Output only. Unique identifier of the `Rollout`.
2372  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2373
2374  // Description of the `Rollout` for user purposes. Max length is 255
2375  // characters.
2376  string description = 3;
2377
2378  // User annotations. These attributes can only be set and used by the
2379  // user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations
2380  // for more details such as format and size limitations.
2381  map<string, string> annotations = 4;
2382
2383  // Labels are attributes that can be set and used by both the
2384  // user and by Cloud Deploy. Labels must meet the following constraints:
2385  //
2386  // * Keys and values can contain only lowercase letters, numeric characters,
2387  // underscores, and dashes.
2388  // * All characters must use UTF-8 encoding, and international characters are
2389  // allowed.
2390  // * Keys must start with a lowercase letter or international character.
2391  // * Each resource is limited to a maximum of 64 labels.
2392  //
2393  // Both keys and values are additionally constrained to be <= 128 bytes.
2394  map<string, string> labels = 5;
2395
2396  // Output only. Time at which the `Rollout` was created.
2397  google.protobuf.Timestamp create_time = 6
2398      [(google.api.field_behavior) = OUTPUT_ONLY];
2399
2400  // Output only. Time at which the `Rollout` was approved.
2401  google.protobuf.Timestamp approve_time = 7
2402      [(google.api.field_behavior) = OUTPUT_ONLY];
2403
2404  // Output only. Time at which the `Rollout` was enqueued.
2405  google.protobuf.Timestamp enqueue_time = 8
2406      [(google.api.field_behavior) = OUTPUT_ONLY];
2407
2408  // Output only. Time at which the `Rollout` started deploying.
2409  google.protobuf.Timestamp deploy_start_time = 9
2410      [(google.api.field_behavior) = OUTPUT_ONLY];
2411
2412  // Output only. Time at which the `Rollout` finished deploying.
2413  google.protobuf.Timestamp deploy_end_time = 10
2414      [(google.api.field_behavior) = OUTPUT_ONLY];
2415
2416  // Required. The ID of Target to which this `Rollout` is deploying.
2417  string target_id = 18 [(google.api.field_behavior) = REQUIRED];
2418
2419  // Output only. Approval state of the `Rollout`.
2420  ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
2421
2422  // Output only. Current state of the `Rollout`.
2423  State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
2424
2425  // Output only. Additional information about the rollout failure, if
2426  // available.
2427  string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
2428
2429  // Output only. The resource name of the Cloud Build `Build` object that is
2430  // used to deploy the Rollout. Format is
2431  // `projects/{project}/locations/{location}/builds/{build}`.
2432  string deploying_build = 17 [
2433    (google.api.field_behavior) = OUTPUT_ONLY,
2434    (google.api.resource_reference) = {
2435      type: "cloudbuild.googleapis.com/Build"
2436    }
2437  ];
2438
2439  // This checksum is computed by the server based on the value of other
2440  // fields, and may be sent on update and delete requests to ensure the
2441  // client has an up-to-date value before proceeding.
2442  string etag = 16;
2443
2444  // Output only. The reason this rollout failed. This will always be
2445  // unspecified while the rollout is in progress.
2446  FailureCause deploy_failure_cause = 19
2447      [(google.api.field_behavior) = OUTPUT_ONLY];
2448
2449  // Output only. The phases that represent the workflows of this `Rollout`.
2450  repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
2451
2452  // Output only. Metadata contains information about the rollout.
2453  Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
2454
2455  // Output only. Name of the `ControllerRollout`. Format is
2456  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
2457  string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
2458
2459  // Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
2460  // Empty if this `Rollout` wasn't created as a rollback.
2461  string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
2462
2463  // Output only. Names of `Rollouts` that rolled back this `Rollout`.
2464  repeated string rolled_back_by_rollouts = 27
2465      [(google.api.field_behavior) = OUTPUT_ONLY];
2466}
2467
2468// Metadata includes information associated with a `Rollout`.
2469message Metadata {
2470  // Output only. The name of the Cloud Run Service that is associated with a
2471  // `Rollout`.
2472  CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2473
2474  // Output only. AutomationRolloutMetadata contains the information about the
2475  // interactions between Automation service and this rollout.
2476  AutomationRolloutMetadata automation = 2
2477      [(google.api.field_behavior) = OUTPUT_ONLY];
2478
2479  // Output only. Custom metadata provided by user-defined `Rollout` operations.
2480  CustomMetadata custom = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2481}
2482
2483// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to
2484// the user.
2485message DeployJobRunMetadata {
2486  // Output only. The name of the Cloud Run Service that is associated with a
2487  // `DeployJobRun`.
2488  CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2489
2490  // Output only. Custom Target metadata associated with a `DeployJobRun`.
2491  CustomTargetDeployMetadata custom_target = 2
2492      [(google.api.field_behavior) = OUTPUT_ONLY];
2493
2494  // Output only. Custom metadata provided by user-defined deploy operation.
2495  CustomMetadata custom = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2496}
2497
2498// CloudRunMetadata contains information from a Cloud Run deployment.
2499message CloudRunMetadata {
2500  // Output only. The name of the Cloud Run Service that is associated with a
2501  // `Rollout`. Format is
2502  // `projects/{project}/locations/{location}/services/{service}`.
2503  string service = 1 [
2504    (google.api.field_behavior) = OUTPUT_ONLY,
2505    (google.api.resource_reference) = { type: "run.googleapis.com/Service" }
2506  ];
2507
2508  // Output only. The Cloud Run Service urls that are associated with a
2509  // `Rollout`.
2510  repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2511
2512  // Output only. The Cloud Run Revision id associated with a `Rollout`.
2513  string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2514
2515  // Output only. The name of the Cloud Run job that is associated with a
2516  // `Rollout`. Format is
2517  // `projects/{project}/locations/{location}/jobs/{job_name}`.
2518  string job = 4 [
2519    (google.api.field_behavior) = OUTPUT_ONLY,
2520    (google.api.resource_reference) = { type: "run.googleapis.com/Job" }
2521  ];
2522}
2523
2524// CustomTargetDeployMetadata contains information from a Custom Target
2525// deploy operation.
2526message CustomTargetDeployMetadata {
2527  // Output only. Skip message provided in the results of a custom deploy
2528  // operation.
2529  string skip_message = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2530}
2531
2532// AutomationRolloutMetadata contains Automation-related actions that
2533// were performed on a rollout.
2534message AutomationRolloutMetadata {
2535  // Output only. The ID of the AutomationRun initiated by a promote release
2536  // rule.
2537  string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2538
2539  // Output only. The IDs of the AutomationRuns initiated by an advance rollout
2540  // rule.
2541  repeated string advance_automation_runs = 2
2542      [(google.api.field_behavior) = OUTPUT_ONLY];
2543
2544  // Output only. The IDs of the AutomationRuns initiated by a repair rollout
2545  // rule.
2546  repeated string repair_automation_runs = 3
2547      [(google.api.field_behavior) = OUTPUT_ONLY];
2548}
2549
2550// CustomMetadata contains information from a user-defined operation.
2551message CustomMetadata {
2552  // Output only. Key-value pairs provided by the user-defined operation.
2553  map<string, string> values = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2554}
2555
2556// Phase represents a collection of jobs that are logically grouped together
2557// for a `Rollout`.
2558message Phase {
2559  // Valid states of a Phase.
2560  enum State {
2561    // The Phase has an unspecified state.
2562    STATE_UNSPECIFIED = 0;
2563
2564    // The Phase is waiting for an earlier Phase(s) to complete.
2565    PENDING = 1;
2566
2567    // The Phase is in progress.
2568    IN_PROGRESS = 2;
2569
2570    // The Phase has succeeded.
2571    SUCCEEDED = 3;
2572
2573    // The Phase has failed.
2574    FAILED = 4;
2575
2576    // The Phase was aborted.
2577    ABORTED = 5;
2578
2579    // The Phase was skipped.
2580    SKIPPED = 6;
2581  }
2582
2583  // Output only. The ID of the Phase.
2584  string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2585
2586  // Output only. Current state of the Phase.
2587  State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2588
2589  // Output only. Additional information on why the Phase was skipped, if
2590  // available.
2591  string skip_message = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
2592
2593  // The job composition of this Phase.
2594  oneof jobs {
2595    // Output only. Deployment job composition.
2596    DeploymentJobs deployment_jobs = 4
2597        [(google.api.field_behavior) = OUTPUT_ONLY];
2598
2599    // Output only. ChildRollout job composition.
2600    ChildRolloutJobs child_rollout_jobs = 5
2601        [(google.api.field_behavior) = OUTPUT_ONLY];
2602  }
2603}
2604
2605// Deployment job composition.
2606message DeploymentJobs {
2607  // Output only. The deploy Job. This is the deploy job in the phase.
2608  Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2609
2610  // Output only. The verify Job. Runs after a deploy if the deploy succeeds.
2611  Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2612
2613  // Output only. The predeploy Job, which is the first job on the phase.
2614  Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2615
2616  // Output only. The postdeploy Job, which is the last job on the phase.
2617  Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
2618}
2619
2620// ChildRollouts job composition
2621message ChildRolloutJobs {
2622  // Output only. List of CreateChildRolloutJobs
2623  repeated Job create_rollout_jobs = 1
2624      [(google.api.field_behavior) = OUTPUT_ONLY];
2625
2626  // Output only. List of AdvanceChildRolloutJobs
2627  repeated Job advance_rollout_jobs = 2
2628      [(google.api.field_behavior) = OUTPUT_ONLY];
2629}
2630
2631// Job represents an operation for a `Rollout`.
2632message Job {
2633  // Valid states of a Job.
2634  enum State {
2635    // The Job has an unspecified state.
2636    STATE_UNSPECIFIED = 0;
2637
2638    // The Job is waiting for an earlier Phase(s) or Job(s) to complete.
2639    PENDING = 1;
2640
2641    // The Job is disabled.
2642    DISABLED = 2;
2643
2644    // The Job is in progress.
2645    IN_PROGRESS = 3;
2646
2647    // The Job succeeded.
2648    SUCCEEDED = 4;
2649
2650    // The Job failed.
2651    FAILED = 5;
2652
2653    // The Job was aborted.
2654    ABORTED = 6;
2655
2656    // The Job was skipped.
2657    SKIPPED = 7;
2658
2659    // The Job was ignored.
2660    IGNORED = 8;
2661  }
2662
2663  // Output only. The ID of the Job.
2664  string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2665
2666  // Output only. The current state of the Job.
2667  State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
2668
2669  // Output only. Additional information on why the Job was skipped, if
2670  // available.
2671  string skip_message = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
2672
2673  // Output only. The name of the `JobRun` responsible for the most recent
2674  // invocation of this Job.
2675  string job_run = 3 [
2676    (google.api.field_behavior) = OUTPUT_ONLY,
2677    (google.api.resource_reference) = {
2678      type: "clouddeploy.googleapis.com/JobRun"
2679    }
2680  ];
2681
2682  // The type of Job.
2683  oneof job_type {
2684    // Output only. A deploy Job.
2685    DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
2686
2687    // Output only. A verify Job.
2688    VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
2689
2690    // Output only. A predeploy Job.
2691    PredeployJob predeploy_job = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
2692
2693    // Output only. A postdeploy Job.
2694    PostdeployJob postdeploy_job = 10
2695        [(google.api.field_behavior) = OUTPUT_ONLY];
2696
2697    // Output only. A createChildRollout Job.
2698    CreateChildRolloutJob create_child_rollout_job = 6
2699        [(google.api.field_behavior) = OUTPUT_ONLY];
2700
2701    // Output only. An advanceChildRollout Job.
2702    AdvanceChildRolloutJob advance_child_rollout_job = 7
2703        [(google.api.field_behavior) = OUTPUT_ONLY];
2704  }
2705}
2706
2707// A deploy Job.
2708message DeployJob {}
2709
2710// A verify Job.
2711message VerifyJob {}
2712
2713// A predeploy Job.
2714message PredeployJob {
2715  // Output only. The custom actions that the predeploy Job executes.
2716  repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2717}
2718
2719// A postdeploy Job.
2720message PostdeployJob {
2721  // Output only. The custom actions that the postdeploy Job executes.
2722  repeated string actions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
2723}
2724
2725// A createChildRollout Job.
2726message CreateChildRolloutJob {}
2727
2728// An advanceChildRollout Job.
2729message AdvanceChildRolloutJob {}
2730
2731// ListRolloutsRequest is the request object used by `ListRollouts`.
2732message ListRolloutsRequest {
2733  // Required. The `Release` which owns this collection of `Rollout` objects.
2734  string parent = 1 [
2735    (google.api.field_behavior) = REQUIRED,
2736    (google.api.resource_reference) = {
2737      type: "clouddeploy.googleapis.com/Release"
2738    }
2739  ];
2740
2741  // Optional. The maximum number of `Rollout` objects to return. The service
2742  // may return fewer than this value. If unspecified, at most 50 `Rollout`
2743  // objects will be returned. The maximum value is 1000; values above 1000 will
2744  // be set to 1000.
2745  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
2746
2747  // Optional. A page token, received from a previous `ListRollouts` call.
2748  // Provide this to retrieve the subsequent page.
2749  //
2750  // When paginating, all other provided parameters match
2751  // the call that provided the page token.
2752  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
2753
2754  // Optional. Filter rollouts to be returned. See https://google.aip.dev/160
2755  // for more details.
2756  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
2757
2758  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for
2759  // more details.
2760  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
2761}
2762
2763// ListRolloutsResponse is the response object reutrned by `ListRollouts`.
2764message ListRolloutsResponse {
2765  // The `Rollout` objects.
2766  repeated Rollout rollouts = 1;
2767
2768  // A token, which can be sent as `page_token` to retrieve the next page.
2769  // If this field is omitted, there are no subsequent pages.
2770  string next_page_token = 2;
2771
2772  // Locations that could not be reached.
2773  repeated string unreachable = 3;
2774}
2775
2776// GetRolloutRequest is the request object used by `GetRollout`.
2777message GetRolloutRequest {
2778  // Required. Name of the `Rollout`. Format must be
2779  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
2780  string name = 1 [
2781    (google.api.field_behavior) = REQUIRED,
2782    (google.api.resource_reference) = {
2783      type: "clouddeploy.googleapis.com/Rollout"
2784    }
2785  ];
2786}
2787
2788// CreateRolloutRequest is the request object used by `CreateRollout`.
2789message CreateRolloutRequest {
2790  // Required. The parent collection in which the `Rollout` should be created.
2791  // Format should be
2792  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
2793  string parent = 1 [
2794    (google.api.field_behavior) = REQUIRED,
2795    (google.api.resource_reference) = {
2796      type: "clouddeploy.googleapis.com/Release"
2797    }
2798  ];
2799
2800  // Required. ID of the `Rollout`.
2801  string rollout_id = 2 [(google.api.field_behavior) = REQUIRED];
2802
2803  // Required. The `Rollout` to create.
2804  Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED];
2805
2806  // Optional. A request ID to identify requests. Specify a unique request ID
2807  // so that if you must retry your request, the server knows to ignore the
2808  // request if it has already been completed. The server guarantees that for
2809  // at least 60 minutes after the first request.
2810  //
2811  // For example, consider a situation where you make an initial request and the
2812  // request times out. If you make the request again with the same request ID,
2813  // the server can check if original operation with the same request ID was
2814  // received, and if so, will ignore the second request. This prevents clients
2815  // from accidentally creating duplicate commitments.
2816  //
2817  // The request ID must be a valid UUID with the exception that zero UUID is
2818  // not supported (00000000-0000-0000-0000-000000000000).
2819  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
2820
2821  // Optional. If set to true, the request is validated and the user is provided
2822  // with an expected result, but no actual change is made.
2823  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
2824
2825  // Optional. The starting phase ID for the `Rollout`. If empty the `Rollout`
2826  // will start at the first phase.
2827  string starting_phase_id = 7 [(google.api.field_behavior) = OPTIONAL];
2828}
2829
2830// Represents the metadata of the long-running operation.
2831message OperationMetadata {
2832  // Output only. The time the operation was created.
2833  google.protobuf.Timestamp create_time = 1
2834      [(google.api.field_behavior) = OUTPUT_ONLY];
2835
2836  // Output only. The time the operation finished running.
2837  google.protobuf.Timestamp end_time = 2
2838      [(google.api.field_behavior) = OUTPUT_ONLY];
2839
2840  // Output only. Server-defined resource path for the target of the operation.
2841  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
2842
2843  // Output only. Name of the verb executed by the operation.
2844  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
2845
2846  // Output only. Human-readable status of the operation, if any.
2847  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
2848
2849  // Output only. Identifies whether the user has requested cancellation
2850  // of the operation. Operations that have successfully been cancelled
2851  // have [Operation.error][] value with a
2852  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2853  // `Code.CANCELLED`.
2854  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
2855
2856  // Output only. API version used to start the operation.
2857  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
2858}
2859
2860// The request object used by `ApproveRollout`.
2861message ApproveRolloutRequest {
2862  // Required. Name of the Rollout. Format is
2863  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2864  string name = 1 [
2865    (google.api.field_behavior) = REQUIRED,
2866    (google.api.resource_reference) = {
2867      type: "clouddeploy.googleapis.com/Rollout"
2868    }
2869  ];
2870
2871  // Required. True = approve; false = reject
2872  bool approved = 2 [(google.api.field_behavior) = REQUIRED];
2873}
2874
2875// The response object from `ApproveRollout`.
2876message ApproveRolloutResponse {}
2877
2878// The request object used by `AdvanceRollout`.
2879message AdvanceRolloutRequest {
2880  // Required. Name of the Rollout. Format is
2881  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2882  string name = 1 [
2883    (google.api.field_behavior) = REQUIRED,
2884    (google.api.resource_reference) = {
2885      type: "clouddeploy.googleapis.com/Rollout"
2886    }
2887  ];
2888
2889  // Required. The phase ID to advance the `Rollout` to.
2890  string phase_id = 2 [(google.api.field_behavior) = REQUIRED];
2891}
2892
2893// The response object from `AdvanceRollout`.
2894message AdvanceRolloutResponse {}
2895
2896// The request object used by `CancelRollout`.
2897message CancelRolloutRequest {
2898  // Required. Name of the Rollout. Format is
2899  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2900  string name = 1 [
2901    (google.api.field_behavior) = REQUIRED,
2902    (google.api.resource_reference) = {
2903      type: "clouddeploy.googleapis.com/Rollout"
2904    }
2905  ];
2906}
2907
2908// The response object from `CancelRollout`.
2909message CancelRolloutResponse {}
2910
2911// The request object used by `IgnoreJob`.
2912message IgnoreJobRequest {
2913  // Required. Name of the Rollout. Format is
2914  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2915  string rollout = 1 [
2916    (google.api.field_behavior) = REQUIRED,
2917    (google.api.resource_reference) = {
2918      type: "clouddeploy.googleapis.com/Rollout"
2919    }
2920  ];
2921
2922  // Required. The phase ID the Job to ignore belongs to.
2923  string phase_id = 2 [(google.api.field_behavior) = REQUIRED];
2924
2925  // Required. The job ID for the Job to ignore.
2926  string job_id = 3 [(google.api.field_behavior) = REQUIRED];
2927}
2928
2929// The response object from `IgnoreJob`.
2930message IgnoreJobResponse {}
2931
2932// RetryJobRequest is the request object used by `RetryJob`.
2933message RetryJobRequest {
2934  // Required. Name of the Rollout. Format is
2935  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
2936  string rollout = 1 [
2937    (google.api.field_behavior) = REQUIRED,
2938    (google.api.resource_reference) = {
2939      type: "clouddeploy.googleapis.com/Rollout"
2940    }
2941  ];
2942
2943  // Required. The phase ID the Job to retry belongs to.
2944  string phase_id = 2 [(google.api.field_behavior) = REQUIRED];
2945
2946  // Required. The job ID for the Job to retry.
2947  string job_id = 3 [(google.api.field_behavior) = REQUIRED];
2948}
2949
2950// The response object from 'RetryJob'.
2951message RetryJobResponse {}
2952
2953// The request object used by `AbandonRelease`.
2954message AbandonReleaseRequest {
2955  // Required. Name of the Release. Format is
2956  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
2957  string name = 1 [
2958    (google.api.field_behavior) = REQUIRED,
2959    (google.api.resource_reference) = {
2960      type: "clouddeploy.googleapis.com/Release"
2961    }
2962  ];
2963}
2964
2965// The response object for `AbandonRelease`.
2966message AbandonReleaseResponse {}
2967
2968// A `JobRun` resource in the Cloud Deploy API.
2969//
2970// A `JobRun` contains information of a single `Rollout` job evaluation.
2971message JobRun {
2972  option (google.api.resource) = {
2973    type: "clouddeploy.googleapis.com/JobRun"
2974    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}"
2975  };
2976
2977  // Valid states of a `JobRun`.
2978  enum State {
2979    // The `JobRun` has an unspecified state.
2980    STATE_UNSPECIFIED = 0;
2981
2982    // The `JobRun` is in progress.
2983    IN_PROGRESS = 1;
2984
2985    // The `JobRun` has succeeded.
2986    SUCCEEDED = 2;
2987
2988    // The `JobRun` has failed.
2989    FAILED = 3;
2990
2991    // The `JobRun` is terminating.
2992    TERMINATING = 4;
2993
2994    // The `JobRun` was terminated.
2995    TERMINATED = 5;
2996  }
2997
2998  // Optional. Name of the `JobRun`. Format is
2999  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
3000  string name = 1 [(google.api.field_behavior) = OPTIONAL];
3001
3002  // Output only. Unique identifier of the `JobRun`.
3003  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3004
3005  // Output only. ID of the `Rollout` phase this `JobRun` belongs in.
3006  string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3007
3008  // Output only. ID of the `Rollout` job this `JobRun` corresponds to.
3009  string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3010
3011  // Output only. Time at which the `JobRun` was created.
3012  google.protobuf.Timestamp create_time = 5
3013      [(google.api.field_behavior) = OUTPUT_ONLY];
3014
3015  // Output only. Time at which the `JobRun` was started.
3016  google.protobuf.Timestamp start_time = 6
3017      [(google.api.field_behavior) = OUTPUT_ONLY];
3018
3019  // Output only. Time at which the `JobRun` ended.
3020  google.protobuf.Timestamp end_time = 7
3021      [(google.api.field_behavior) = OUTPUT_ONLY];
3022
3023  // Output only. The current state of the `JobRun`.
3024  State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
3025
3026  // The `JobRun` type and the information for that type.
3027  oneof job_run {
3028    // Output only. Information specific to a deploy `JobRun`.
3029    DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
3030
3031    // Output only. Information specific to a verify `JobRun`.
3032    VerifyJobRun verify_job_run = 10
3033        [(google.api.field_behavior) = OUTPUT_ONLY];
3034
3035    // Output only. Information specific to a predeploy `JobRun`.
3036    PredeployJobRun predeploy_job_run = 14
3037        [(google.api.field_behavior) = OUTPUT_ONLY];
3038
3039    // Output only. Information specific to a postdeploy `JobRun`.
3040    PostdeployJobRun postdeploy_job_run = 15
3041        [(google.api.field_behavior) = OUTPUT_ONLY];
3042
3043    // Output only. Information specific to a createChildRollout `JobRun`.
3044    CreateChildRolloutJobRun create_child_rollout_job_run = 12
3045        [(google.api.field_behavior) = OUTPUT_ONLY];
3046
3047    // Output only. Information specific to an advanceChildRollout `JobRun`
3048    AdvanceChildRolloutJobRun advance_child_rollout_job_run = 13
3049        [(google.api.field_behavior) = OUTPUT_ONLY];
3050  }
3051
3052  // Output only. This checksum is computed by the server based on the value of
3053  // other fields, and may be sent on update and delete requests to ensure the
3054  // client has an up-to-date value before proceeding.
3055  string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
3056}
3057
3058// DeployJobRun contains information specific to a deploy `JobRun`.
3059message DeployJobRun {
3060  // Well-known deploy failures.
3061  enum FailureCause {
3062    // No reason for failure is specified.
3063    FAILURE_CAUSE_UNSPECIFIED = 0;
3064
3065    // Cloud Build is not available, either because it is not enabled or because
3066    // Cloud Deploy has insufficient permissions. See [Required
3067    // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
3068    CLOUD_BUILD_UNAVAILABLE = 1;
3069
3070    // The deploy operation did not complete successfully; check Cloud Build
3071    // logs.
3072    EXECUTION_FAILED = 2;
3073
3074    // The deploy job run did not complete within the alloted time.
3075    DEADLINE_EXCEEDED = 3;
3076
3077    // There were missing resources in the runtime environment required for a
3078    // canary deployment. Check the Cloud Build logs for more information.
3079    MISSING_RESOURCES_FOR_CANARY = 4;
3080
3081    // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message
3082    // for additional details.
3083    CLOUD_BUILD_REQUEST_FAILED = 5;
3084
3085    // The deploy operation had a feature configured that is not supported.
3086    DEPLOY_FEATURE_NOT_SUPPORTED = 6;
3087  }
3088
3089  // Output only. The resource name of the Cloud Build `Build` object that is
3090  // used to deploy. Format is
3091  // `projects/{project}/locations/{location}/builds/{build}`.
3092  string build = 1 [
3093    (google.api.field_behavior) = OUTPUT_ONLY,
3094    (google.api.resource_reference) = {
3095      type: "cloudbuild.googleapis.com/Build"
3096    }
3097  ];
3098
3099  // Output only. The reason the deploy failed. This will always be unspecified
3100  // while the deploy is in progress or if it succeeded.
3101  FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3102
3103  // Output only. Additional information about the deploy failure, if available.
3104  string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3105
3106  // Output only. Metadata containing information about the deploy job run.
3107  DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3108
3109  // Output only. The artifact of a deploy job run, if available.
3110  DeployArtifact artifact = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
3111}
3112
3113// VerifyJobRun contains information specific to a verify `JobRun`.
3114message VerifyJobRun {
3115  // Well-known verify failures.
3116  enum FailureCause {
3117    // No reason for failure is specified.
3118    FAILURE_CAUSE_UNSPECIFIED = 0;
3119
3120    // Cloud Build is not available, either because it is not enabled or because
3121    // Cloud Deploy has insufficient permissions. See [required
3122    // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
3123    CLOUD_BUILD_UNAVAILABLE = 1;
3124
3125    // The verify operation did not complete successfully; check Cloud Build
3126    // logs.
3127    EXECUTION_FAILED = 2;
3128
3129    // The verify job run did not complete within the alloted time.
3130    DEADLINE_EXCEEDED = 3;
3131
3132    // No Skaffold verify configuration was found.
3133    VERIFICATION_CONFIG_NOT_FOUND = 4;
3134
3135    // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message
3136    // for additional details.
3137    CLOUD_BUILD_REQUEST_FAILED = 5;
3138  }
3139
3140  // Output only. The resource name of the Cloud Build `Build` object that is
3141  // used to verify. Format is
3142  // `projects/{project}/locations/{location}/builds/{build}`.
3143  string build = 1 [
3144    (google.api.field_behavior) = OUTPUT_ONLY,
3145    (google.api.resource_reference) = {
3146      type: "cloudbuild.googleapis.com/Build"
3147    }
3148  ];
3149
3150  // Output only. URI of a directory containing the verify artifacts. This
3151  // contains the Skaffold event log.
3152  string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3153
3154  // Output only. File path of the Skaffold event log relative to the artifact
3155  // URI.
3156  string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3157
3158  // Output only. The reason the verify failed. This will always be unspecified
3159  // while the verify is in progress or if it succeeded.
3160  FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3161
3162  // Output only. Additional information about the verify failure, if available.
3163  string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
3164}
3165
3166// PredeployJobRun contains information specific to a predeploy `JobRun`.
3167message PredeployJobRun {
3168  // Well-known predeploy failures.
3169  enum FailureCause {
3170    // No reason for failure is specified.
3171    FAILURE_CAUSE_UNSPECIFIED = 0;
3172
3173    // Cloud Build is not available, either because it is not enabled or because
3174    // Cloud Deploy has insufficient permissions. See [required
3175    // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
3176    CLOUD_BUILD_UNAVAILABLE = 1;
3177
3178    // The predeploy operation did not complete successfully; check Cloud Build
3179    // logs.
3180    EXECUTION_FAILED = 2;
3181
3182    // The predeploy job run did not complete within the alloted time.
3183    DEADLINE_EXCEEDED = 3;
3184
3185    // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message
3186    // for additional details.
3187    CLOUD_BUILD_REQUEST_FAILED = 4;
3188  }
3189
3190  // Output only. The resource name of the Cloud Build `Build` object that is
3191  // used to execute the custom actions associated with the predeploy Job.
3192  // Format is `projects/{project}/locations/{location}/builds/{build}`.
3193  string build = 1 [
3194    (google.api.field_behavior) = OUTPUT_ONLY,
3195    (google.api.resource_reference) = {
3196      type: "cloudbuild.googleapis.com/Build"
3197    }
3198  ];
3199
3200  // Output only. The reason the predeploy failed. This will always be
3201  // unspecified while the predeploy is in progress or if it succeeded.
3202  FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3203
3204  // Output only. Additional information about the predeploy failure, if
3205  // available.
3206  string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3207}
3208
3209// PostdeployJobRun contains information specific to a postdeploy `JobRun`.
3210message PostdeployJobRun {
3211  // Well-known postdeploy failures.
3212  enum FailureCause {
3213    // No reason for failure is specified.
3214    FAILURE_CAUSE_UNSPECIFIED = 0;
3215
3216    // Cloud Build is not available, either because it is not enabled or because
3217    // Cloud Deploy has insufficient permissions. See [required
3218    // permission](https://cloud.google.com/deploy/docs/cloud-deploy-service-account#required_permissions).
3219    CLOUD_BUILD_UNAVAILABLE = 1;
3220
3221    // The postdeploy operation did not complete successfully; check Cloud Build
3222    // logs.
3223    EXECUTION_FAILED = 2;
3224
3225    // The postdeploy job run did not complete within the alloted time.
3226    DEADLINE_EXCEEDED = 3;
3227
3228    // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message
3229    // for additional details.
3230    CLOUD_BUILD_REQUEST_FAILED = 4;
3231  }
3232
3233  // Output only. The resource name of the Cloud Build `Build` object that is
3234  // used to execute the custom actions associated with the postdeploy Job.
3235  // Format is `projects/{project}/locations/{location}/builds/{build}`.
3236  string build = 1 [
3237    (google.api.field_behavior) = OUTPUT_ONLY,
3238    (google.api.resource_reference) = {
3239      type: "cloudbuild.googleapis.com/Build"
3240    }
3241  ];
3242
3243  // Output only. The reason the postdeploy failed. This will always be
3244  // unspecified while the postdeploy is in progress or if it succeeded.
3245  FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3246
3247  // Output only. Additional information about the postdeploy failure, if
3248  // available.
3249  string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3250}
3251
3252// CreateChildRolloutJobRun contains information specific to a
3253// createChildRollout `JobRun`.
3254message CreateChildRolloutJobRun {
3255  // Output only. Name of the `ChildRollout`. Format is
3256  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
3257  string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3258
3259  // Output only. The ID of the childRollout Phase initiated by this JobRun.
3260  string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3261}
3262
3263// AdvanceChildRolloutJobRun contains information specific to a
3264// advanceChildRollout `JobRun`.
3265message AdvanceChildRolloutJobRun {
3266  // Output only. Name of the `ChildRollout`. Format is
3267  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
3268  string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3269
3270  // Output only. the ID of the ChildRollout's Phase.
3271  string rollout_phase_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3272}
3273
3274// ListJobRunsRequest is the request object used by `ListJobRuns`.
3275message ListJobRunsRequest {
3276  // Required. The `Rollout` which owns this collection of `JobRun` objects.
3277  string parent = 1 [
3278    (google.api.field_behavior) = REQUIRED,
3279    (google.api.resource_reference) = {
3280      type: "clouddeploy.googleapis.com/Rollout"
3281    }
3282  ];
3283
3284  // Optional. The maximum number of `JobRun` objects to return. The service may
3285  // return fewer than this value. If unspecified, at most 50 `JobRun` objects
3286  // will be returned. The maximum value is 1000; values above 1000 will be set
3287  // to 1000.
3288  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
3289
3290  // Optional. A page token, received from a previous `ListJobRuns` call.
3291  // Provide this to retrieve the subsequent page.
3292  //
3293  // When paginating, all other provided parameters match the call that provided
3294  // the page token.
3295  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
3296
3297  // Optional. Filter results to be returned. See https://google.aip.dev/160 for
3298  // more details.
3299  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
3300
3301  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for
3302  // more details.
3303  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
3304}
3305
3306// ListJobRunsResponse is the response object returned by `ListJobRuns`.
3307message ListJobRunsResponse {
3308  // The `JobRun` objects.
3309  repeated JobRun job_runs = 1;
3310
3311  // A token, which can be sent as `page_token` to retrieve the next page. If
3312  // this field is omitted, there are no subsequent pages.
3313  string next_page_token = 2;
3314
3315  // Locations that could not be reached
3316  repeated string unreachable = 3;
3317}
3318
3319// GetJobRunRequest is the request object used by `GetJobRun`.
3320message GetJobRunRequest {
3321  // Required. Name of the `JobRun`. Format must be
3322  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
3323  string name = 1 [
3324    (google.api.field_behavior) = REQUIRED,
3325    (google.api.resource_reference) = {
3326      type: "clouddeploy.googleapis.com/JobRun"
3327    }
3328  ];
3329}
3330
3331// The request object used by `TerminateJobRun`.
3332message TerminateJobRunRequest {
3333  // Required. Name of the `JobRun`. Format must be
3334  // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
3335  string name = 1 [
3336    (google.api.field_behavior) = REQUIRED,
3337    (google.api.resource_reference) = {
3338      type: "clouddeploy.googleapis.com/JobRun"
3339    }
3340  ];
3341}
3342
3343// The response object from `TerminateJobRun`.
3344message TerminateJobRunResponse {}
3345
3346// Service-wide configuration.
3347message Config {
3348  option (google.api.resource) = {
3349    type: "clouddeploy.googleapis.com/Config"
3350    pattern: "projects/{project}/locations/{location}/config"
3351  };
3352
3353  // Name of the configuration.
3354  string name = 1;
3355
3356  // All supported versions of Skaffold.
3357  repeated SkaffoldVersion supported_versions = 2;
3358
3359  // Default Skaffold version that is assigned when a Release is created without
3360  // specifying a Skaffold version.
3361  string default_skaffold_version = 3;
3362}
3363
3364// Details of a supported Skaffold version.
3365message SkaffoldVersion {
3366  // Release version number. For example, "1.20.3".
3367  string version = 1;
3368
3369  // The time at which this version of Skaffold will enter maintenance mode.
3370  google.protobuf.Timestamp maintenance_mode_time = 3;
3371
3372  // The time at which this version of Skaffold will no longer be supported.
3373  google.protobuf.Timestamp support_expiration_time = 4;
3374
3375  // Date when this version is expected to no longer be supported.
3376  google.type.Date support_end_date = 2;
3377}
3378
3379// Request to get a configuration.
3380message GetConfigRequest {
3381  // Required. Name of requested configuration.
3382  string name = 1 [
3383    (google.api.field_behavior) = REQUIRED,
3384    (google.api.resource_reference) = {
3385      type: "clouddeploy.googleapis.com/Config"
3386    }
3387  ];
3388}
3389
3390// An `Automation` resource in the Cloud Deploy API.
3391//
3392// An `Automation` enables the automation of manually driven actions for
3393// a Delivery Pipeline, which includes Release promotion among Targets,
3394// Rollout repair and Rollout deployment strategy advancement. The intention
3395// of Automation is to reduce manual intervention in the continuous delivery
3396// process.
3397message Automation {
3398  option (google.api.resource) = {
3399    type: "clouddeploy.googleapis.com/Automation"
3400    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}"
3401    style: DECLARATIVE_FRIENDLY
3402  };
3403
3404  // Output only. Name of the `Automation`. Format is
3405  // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
3406  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3407
3408  // Output only. Unique identifier of the `Automation`.
3409  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3410
3411  // Optional. Description of the `Automation`. Max length is 255 characters.
3412  string description = 3 [(google.api.field_behavior) = OPTIONAL];
3413
3414  // Output only. Time at which the automation was created.
3415  google.protobuf.Timestamp create_time = 4
3416      [(google.api.field_behavior) = OUTPUT_ONLY];
3417
3418  // Output only. Time at which the automation was updated.
3419  google.protobuf.Timestamp update_time = 5
3420      [(google.api.field_behavior) = OUTPUT_ONLY];
3421
3422  // Optional. User annotations. These attributes can only be set and used by
3423  // the user, and not by Cloud Deploy. Annotations must meet the following
3424  // constraints:
3425  //
3426  // * Annotations are key/value pairs.
3427  // * Valid annotation keys have two segments: an optional prefix and name,
3428  // separated by a slash (`/`).
3429  // * The name segment is required and must be 63 characters or less,
3430  // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
3431  // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
3432  // * The prefix is optional. If specified, the prefix must be a DNS subdomain:
3433  // a series of DNS labels separated by dots(`.`), not longer than 253
3434  // characters in total, followed by a slash (`/`).
3435  //
3436  // See
3437  // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
3438  // for more details.
3439  map<string, string> annotations = 6 [(google.api.field_behavior) = OPTIONAL];
3440
3441  // Optional. Labels are attributes that can be set and used by both the
3442  // user and by Cloud Deploy. Labels must meet the following constraints:
3443  //
3444  // * Keys and values can contain only lowercase letters, numeric characters,
3445  // underscores, and dashes.
3446  // * All characters must use UTF-8 encoding, and international characters are
3447  // allowed.
3448  // * Keys must start with a lowercase letter or international character.
3449  // * Each resource is limited to a maximum of 64 labels.
3450  //
3451  // Both keys and values are additionally constrained to be <= 63 characters.
3452  map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];
3453
3454  // Optional. The weak etag of the `Automation` resource.
3455  // This checksum is computed by the server based on the value of other
3456  // fields, and may be sent on update and delete requests to ensure the
3457  // client has an up-to-date value before proceeding.
3458  string etag = 8 [(google.api.field_behavior) = OPTIONAL];
3459
3460  // Optional. When Suspended, automation is deactivated from execution.
3461  bool suspended = 9 [(google.api.field_behavior) = OPTIONAL];
3462
3463  // Required. Email address of the user-managed IAM service account that
3464  // creates Cloud Deploy release and rollout resources.
3465  string service_account = 10 [(google.api.field_behavior) = REQUIRED];
3466
3467  // Required. Selected resources to which the automation will be applied.
3468  AutomationResourceSelector selector = 11
3469      [(google.api.field_behavior) = REQUIRED];
3470
3471  // Required. List of Automation rules associated with the Automation resource.
3472  // Must have at least one rule and limited to 250 rules per Delivery Pipeline.
3473  // Note: the order of the rules here is not the same as the order of
3474  // execution.
3475  repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED];
3476}
3477
3478// AutomationResourceSelector contains the information to select the resources
3479// to which an Automation is going to be applied.
3480message AutomationResourceSelector {
3481  // Contains attributes about a target.
3482  repeated TargetAttribute targets = 1;
3483}
3484
3485// `AutomationRule` defines the automation activities.
3486message AutomationRule {
3487  // The configuration of the Automation rule.
3488  oneof rule {
3489    // Optional. `PromoteReleaseRule` will automatically promote a release from
3490    // the current target to a specified target.
3491    PromoteReleaseRule promote_release_rule = 1
3492        [(google.api.field_behavior) = OPTIONAL];
3493
3494    // Optional. The `AdvanceRolloutRule` will automatically advance a
3495    // successful Rollout.
3496    AdvanceRolloutRule advance_rollout_rule = 2
3497        [(google.api.field_behavior) = OPTIONAL];
3498
3499    // Optional. The `RepairRolloutRule` will automatically repair a failed
3500    // rollout.
3501    RepairRolloutRule repair_rollout_rule = 3
3502        [(google.api.field_behavior) = OPTIONAL];
3503  }
3504}
3505
3506// `PromoteRelease` rule will automatically promote a release from the current
3507// target to a specified target.
3508message PromoteReleaseRule {
3509  // Required. ID of the rule. This id must be unique in the `Automation`
3510  // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
3511  string id = 1 [(google.api.field_behavior) = REQUIRED];
3512
3513  // Optional. How long the release need to be paused until being promoted to
3514  // the next target.
3515  google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL];
3516
3517  // Optional. The ID of the stage in the pipeline to which this `Release` is
3518  // deploying. If unspecified, default it to the next stage in the promotion
3519  // flow. The value of this field could be one of the following:
3520  //
3521  // * The last segment of a target name. It only needs the ID to determine
3522  // if the target is one of the stages in the promotion sequence defined
3523  // in the pipeline.
3524  // * "@next", the next target in the promotion sequence.
3525  string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL];
3526
3527  // Output only. Information around the state of the Automation rule.
3528  AutomationRuleCondition condition = 5
3529      [(google.api.field_behavior) = OUTPUT_ONLY];
3530
3531  // Optional. The starting phase of the rollout created by this operation.
3532  // Default to the first phase.
3533  string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL];
3534}
3535
3536// The `AdvanceRollout` automation rule will automatically advance a successful
3537// Rollout to the next phase.
3538message AdvanceRolloutRule {
3539  // Required. ID of the rule. This id must be unique in the `Automation`
3540  // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
3541  string id = 1 [(google.api.field_behavior) = REQUIRED];
3542
3543  // Optional. Proceeds only after phase name matched any one in the list.
3544  // This value must consist of lower-case letters, numbers, and hyphens,
3545  // start with a letter and end with a letter or a number, and have a max
3546  // length of 63 characters. In other words, it must match the following
3547  // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
3548  repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL];
3549
3550  // Optional. How long to wait after a rollout is finished.
3551  google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL];
3552
3553  // Output only. Information around the state of the Automation rule.
3554  AutomationRuleCondition condition = 5
3555      [(google.api.field_behavior) = OUTPUT_ONLY];
3556}
3557
3558// The `RepairRolloutRule` automation rule will automatically repair a failed
3559// `Rollout`.
3560message RepairRolloutRule {
3561  // Required. ID of the rule. This id must be unique in the `Automation`
3562  // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
3563  string id = 1 [(google.api.field_behavior) = REQUIRED];
3564
3565  // Optional. Phases within which jobs are subject to automatic repair actions
3566  // on failure. Proceeds only after phase name matched any one in the list, or
3567  // for all phases if unspecified. This value must consist of lower-case
3568  // letters, numbers, and hyphens, start with a letter and end with a letter or
3569  // a number, and have a max length of 63 characters. In other words, it must
3570  // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
3571  repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL];
3572
3573  // Optional. Jobs to repair. Proceeds only after job name matched any one in
3574  // the list, or for all jobs if unspecified or empty. The phase that includes
3575  // the job must match the phase ID specified in `source_phase`. This value
3576  // must consist of lower-case letters, numbers, and hyphens, start with a
3577  // letter and end with a letter or a number, and have a max length of 63
3578  // characters. In other words, it must match the following regex:
3579  // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
3580  repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL];
3581
3582  // Required. Defines the types of automatic repair actions for failed jobs.
3583  repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED];
3584
3585  // Output only. Information around the state of the 'Automation' rule.
3586  AutomationRuleCondition condition = 6
3587      [(google.api.field_behavior) = OUTPUT_ONLY];
3588}
3589
3590// Configuration of the repair action.
3591message RepairMode {
3592  // The repair action to perform.
3593  oneof mode {
3594    // Optional. Retries a failed job.
3595    Retry retry = 1 [(google.api.field_behavior) = OPTIONAL];
3596
3597    // Optional. Rolls back a `Rollout`.
3598    Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL];
3599  }
3600}
3601
3602// Retries the failed job.
3603message Retry {
3604  // Required. Total number of retries. Retry is skipped if set to 0; The
3605  // minimum value is 1, and the maximum value is 10.
3606  int64 attempts = 1 [(google.api.field_behavior) = REQUIRED];
3607
3608  // Optional. How long to wait for the first retry. Default is 0, and the
3609  // maximum value is 14d.
3610  google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL];
3611
3612  // Optional. The pattern of how wait time will be increased. Default is
3613  // linear. Backoff mode will be ignored if `wait` is 0.
3614  BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL];
3615}
3616
3617// Rolls back a `Rollout`.
3618message Rollback {
3619  // Optional. The starting phase ID for the `Rollout`. If unspecified, the
3620  // `Rollout` will start in the stable phase.
3621  string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL];
3622}
3623
3624// `AutomationRuleCondition` contains conditions relevant to an
3625// `Automation` rule.
3626message AutomationRuleCondition {
3627  // Optional. Details around targets enumerated in the rule.
3628  TargetsPresentCondition targets_present_condition = 1
3629      [(google.api.field_behavior) = OPTIONAL];
3630}
3631
3632// The request object for `CreateAutomation`.
3633message CreateAutomationRequest {
3634  // Required. The parent collection in which the `Automation` should be
3635  // created. Format should be
3636  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
3637  string parent = 1 [
3638    (google.api.field_behavior) = REQUIRED,
3639    (google.api.resource_reference) = {
3640      child_type: "clouddeploy.googleapis.com/Automation"
3641    }
3642  ];
3643
3644  // Required. ID of the `Automation`.
3645  string automation_id = 2 [(google.api.field_behavior) = REQUIRED];
3646
3647  // Required. The `Automation` to create.
3648  Automation automation = 3 [(google.api.field_behavior) = REQUIRED];
3649
3650  // Optional. A request ID to identify requests. Specify a unique request ID
3651  // so that if you must retry your request, the server knows to ignore the
3652  // request if it has already been completed. The server guarantees that for
3653  // at least 60 minutes after the first request.
3654  //
3655  // For example, consider a situation where you make an initial request and the
3656  // request times out. If you make the request again with the same request ID,
3657  // the server can check if original operation with the same request ID was
3658  // received, and if so, will ignore the second request. This prevents clients
3659  // from accidentally creating duplicate commitments.
3660  //
3661  // The request ID must be a valid UUID with the exception that zero UUID is
3662  // not supported (00000000-0000-0000-0000-000000000000).
3663  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
3664
3665  // Optional. If set to true, the request is validated and the user is provided
3666  // with an expected result, but no actual change is made.
3667  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
3668}
3669
3670// The request object for `UpdateAutomation`.
3671message UpdateAutomationRequest {
3672  // Required. Field mask is used to specify the fields to be overwritten in the
3673  // `Automation` resource by the update.
3674  // The fields specified in the update_mask are relative to the resource, not
3675  // the full request. A field will be overwritten if it's in the mask. If the
3676  // user doesn't provide a mask then all fields are overwritten.
3677  google.protobuf.FieldMask update_mask = 1
3678      [(google.api.field_behavior) = REQUIRED];
3679
3680  // Required. The `Automation` to update.
3681  Automation automation = 2 [(google.api.field_behavior) = REQUIRED];
3682
3683  // Optional. A request ID to identify requests. Specify a unique request ID
3684  // so that if you must retry your request, the server knows to ignore the
3685  // request if it has already been completed. The server guarantees that for
3686  // at least 60 minutes after the first request.
3687  //
3688  // For example, consider a situation where you make an initial request and the
3689  // request times out. If you make the request again with the same request ID,
3690  // the server can check if original operation with the same request ID was
3691  // received, and if so, will ignore the second request. This prevents clients
3692  // from accidentally creating duplicate commitments.
3693  //
3694  // The request ID must be a valid UUID with the exception that zero UUID is
3695  // not supported (00000000-0000-0000-0000-000000000000).
3696  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
3697
3698  // Optional. If set to true, updating a `Automation` that does not exist will
3699  // result in the creation of a new `Automation`.
3700  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
3701
3702  // Optional. If set to true, the request is validated and the user is provided
3703  // with an expected result, but no actual change is made.
3704  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
3705}
3706
3707// The request object for `DeleteAutomation`.
3708message DeleteAutomationRequest {
3709  // Required. The name of the `Automation` to delete. Format should be
3710  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
3711  string name = 1 [
3712    (google.api.field_behavior) = REQUIRED,
3713    (google.api.resource_reference) = {
3714      type: "clouddeploy.googleapis.com/Automation"
3715    }
3716  ];
3717
3718  // Optional. A request ID to identify requests. Specify a unique request ID
3719  // so that if you must retry your request, the server knows to ignore the
3720  // request if it has already been completed. The server guarantees that for
3721  // at least 60 minutes after the first request.
3722  //
3723  // For example, consider a situation where you make an initial request and the
3724  // request times out. If you make the request again with the same request ID,
3725  // the server can check if original operation with the same request ID was
3726  // received, and if so, will ignore the second request. This prevents clients
3727  // from accidentally creating duplicate commitments.
3728  //
3729  // The request ID must be a valid UUID with the exception that zero UUID is
3730  // not supported (00000000-0000-0000-0000-000000000000).
3731  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
3732
3733  // Optional. If set to true, then deleting an already deleted or non-existing
3734  // `Automation` will succeed.
3735  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
3736
3737  // Optional. If set, validate the request and verify whether the resource
3738  // exists, but do not actually post it.
3739  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
3740
3741  // Optional. The weak etag of the request.
3742  // This checksum is computed by the server based on the value of other
3743  // fields, and may be sent on update and delete requests to ensure the
3744  // client has an up-to-date value before proceeding.
3745  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
3746}
3747
3748// The request object for `ListAutomations`.
3749message ListAutomationsRequest {
3750  // Required. The parent `Delivery Pipeline`, which owns this collection of
3751  // automations. Format must be
3752  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
3753  string parent = 1 [
3754    (google.api.field_behavior) = REQUIRED,
3755    (google.api.resource_reference) = {
3756      child_type: "clouddeploy.googleapis.com/Automation"
3757    }
3758  ];
3759
3760  // The maximum number of automations to return. The service may return
3761  // fewer than this value. If unspecified, at most 50 automations will
3762  // be returned. The maximum value is 1000; values above 1000 will be set
3763  // to 1000.
3764  int32 page_size = 2;
3765
3766  // A page token, received from a previous `ListAutomations` call.
3767  // Provide this to retrieve the subsequent page.
3768  //
3769  // When paginating, all other provided parameters match
3770  // the call that provided the page token.
3771  string page_token = 3;
3772
3773  // Filter automations to be returned. All fields can be used in the
3774  // filter.
3775  string filter = 4;
3776
3777  // Field to sort by.
3778  string order_by = 5;
3779}
3780
3781// The response object from `ListAutomations`.
3782message ListAutomationsResponse {
3783  // The `Automation` objects.
3784  repeated Automation automations = 1;
3785
3786  // A token, which can be sent as `page_token` to retrieve the next page.
3787  // If this field is omitted, there are no subsequent pages.
3788  string next_page_token = 2;
3789
3790  // Locations that could not be reached.
3791  repeated string unreachable = 3;
3792}
3793
3794// The request object for `GetAutomation`
3795message GetAutomationRequest {
3796  // Required. Name of the `Automation`. Format must be
3797  // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
3798  string name = 1 [
3799    (google.api.field_behavior) = REQUIRED,
3800    (google.api.resource_reference) = {
3801      type: "clouddeploy.googleapis.com/Automation"
3802    }
3803  ];
3804}
3805
3806// An `AutomationRun` resource in the Cloud Deploy API.
3807//
3808// An `AutomationRun` represents an execution instance of an
3809// automation rule.
3810message AutomationRun {
3811  option (google.api.resource) = {
3812    type: "clouddeploy.googleapis.com/AutomationRun"
3813    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}"
3814  };
3815
3816  // Valid state of an `AutomationRun`.
3817  enum State {
3818    // The `AutomationRun` has an unspecified state.
3819    STATE_UNSPECIFIED = 0;
3820
3821    // The `AutomationRun` has succeeded.
3822    SUCCEEDED = 1;
3823
3824    // The `AutomationRun` was cancelled.
3825    CANCELLED = 2;
3826
3827    // The `AutomationRun` has failed.
3828    FAILED = 3;
3829
3830    // The `AutomationRun` is in progress.
3831    IN_PROGRESS = 4;
3832
3833    // The `AutomationRun` is pending.
3834    PENDING = 5;
3835  }
3836
3837  // Output only. Name of the `AutomationRun`. Format is
3838  // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
3839  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3840
3841  // Output only. Time at which the `AutomationRun` was created.
3842  google.protobuf.Timestamp create_time = 2
3843      [(google.api.field_behavior) = OUTPUT_ONLY];
3844
3845  // Output only. Time at which the automationRun was updated.
3846  google.protobuf.Timestamp update_time = 3
3847      [(google.api.field_behavior) = OUTPUT_ONLY];
3848
3849  // Output only. The weak etag of the `AutomationRun` resource.
3850  // This checksum is computed by the server based on the value of other
3851  // fields, and may be sent on update and delete requests to ensure the
3852  // client has an up-to-date value before proceeding.
3853  string etag = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3854
3855  // Output only. Email address of the user-managed IAM service account that
3856  // performs the operations against Cloud Deploy resources.
3857  string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
3858
3859  // Output only. Snapshot of the Automation taken at AutomationRun creation
3860  // time.
3861  Automation automation_snapshot = 6
3862      [(google.api.field_behavior) = OUTPUT_ONLY];
3863
3864  // Output only. The ID of the target that represents the promotion stage that
3865  // initiates the `AutomationRun`. The value of this field is the last segment
3866  // of a target name.
3867  string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
3868
3869  // Output only. Current state of the `AutomationRun`.
3870  State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
3871
3872  // Output only. Explains the current state of the `AutomationRun`. Present
3873  // only when an explanation is needed.
3874  string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
3875
3876  // Output only. Time the `AutomationRun` expires. An `AutomationRun` expires
3877  // after 14 days from its creation date.
3878  google.protobuf.Timestamp expire_time = 11
3879      [(google.api.field_behavior) = OUTPUT_ONLY];
3880
3881  // Output only. The ID of the automation rule that initiated the operation.
3882  string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
3883
3884  // Output only. The ID of the automation that initiated the operation.
3885  string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
3886
3887  // The operation that the `AutomationRun` will perform.
3888  oneof operation {
3889    // Output only. Promotes a release to a specified 'Target'.
3890    PromoteReleaseOperation promote_release_operation = 13
3891        [(google.api.field_behavior) = OUTPUT_ONLY];
3892
3893    // Output only. Advances a rollout to the next phase.
3894    AdvanceRolloutOperation advance_rollout_operation = 14
3895        [(google.api.field_behavior) = OUTPUT_ONLY];
3896
3897    // Output only. Repairs a failed 'Rollout'.
3898    RepairRolloutOperation repair_rollout_operation = 17
3899        [(google.api.field_behavior) = OUTPUT_ONLY];
3900  }
3901
3902  // Output only. Earliest time the `AutomationRun` will attempt to resume.
3903  // Wait-time is configured by `wait` in automation rule.
3904  google.protobuf.Timestamp wait_until_time = 16
3905      [(google.api.field_behavior) = OUTPUT_ONLY];
3906}
3907
3908// Contains the information of an automated promote-release operation.
3909message PromoteReleaseOperation {
3910  // Output only. The ID of the target that represents the promotion stage to
3911  // which the release will be promoted. The value of this field is the last
3912  // segment of a target name.
3913  string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3914
3915  // Output only. How long the operation will be paused.
3916  google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3917
3918  // Output only. The name of the rollout that initiates the `AutomationRun`.
3919  string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3920
3921  // Output only. The starting phase of the rollout created by this operation.
3922  string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3923}
3924
3925// Contains the information of an automated advance-rollout operation.
3926message AdvanceRolloutOperation {
3927  // Output only. The phase of a deployment that initiated the operation.
3928  string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
3929
3930  // Output only. How long the operation will be paused.
3931  google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3932
3933  // Output only. The name of the rollout that initiates the `AutomationRun`.
3934  string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3935
3936  // Output only. The phase the rollout will be advanced to.
3937  string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3938}
3939
3940// Contains the information for an automated `repair rollout` operation.
3941message RepairRolloutOperation {
3942  // Output only. The name of the rollout that initiates the `AutomationRun`.
3943  string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3944
3945  // Output only. The index of the current repair action in the repair sequence.
3946  int64 current_repair_mode_index = 2
3947      [(google.api.field_behavior) = OUTPUT_ONLY];
3948
3949  // Output only. Records of the repair attempts. Each repair phase may have
3950  // multiple retry attempts or single rollback attempt.
3951  repeated RepairPhase repair_phases = 3
3952      [(google.api.field_behavior) = OUTPUT_ONLY];
3953}
3954
3955// RepairPhase tracks the repair attempts that have been made for
3956// each `RepairMode` specified in the `Automation` resource.
3957message RepairPhase {
3958  oneof repair_phase {
3959    // Output only. Records of the retry attempts for retry repair mode.
3960    RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3961
3962    // Output only. Rollback attempt for rollback repair mode .
3963    RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3964  }
3965}
3966
3967// RetryPhase contains the retry attempts and the metadata for initiating a
3968// new attempt.
3969message RetryPhase {
3970  // Output only. The number of attempts that have been made.
3971  int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3972
3973  // Output only. The pattern of how the wait time of the retry attempt is
3974  // calculated.
3975  BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3976
3977  // Output only. The phase ID of the phase that includes the job being retried.
3978  string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
3979
3980  // Output only. The job ID for the Job to retry.
3981  string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
3982
3983  // Output only. Detail of a retry action.
3984  repeated RetryAttempt attempts = 5
3985      [(google.api.field_behavior) = OUTPUT_ONLY];
3986}
3987
3988// RetryAttempt represents an action of retrying the failed Cloud Deploy job.
3989message RetryAttempt {
3990  // Output only. The index of this retry attempt.
3991  int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
3992
3993  // Output only. How long the operation will be paused.
3994  google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
3995
3996  // Output only. Valid state of this retry action.
3997  RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
3998
3999  // Output only. Description of the state of the Retry.
4000  string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
4001}
4002
4003// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'.
4004message RollbackAttempt {
4005  // Output only. The phase to which the rollout will be rolled back to.
4006  string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
4007
4008  // Output only. ID of the rollback `Rollout` to create.
4009  string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
4010
4011  // Output only. Valid state of this rollback action.
4012  RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
4013
4014  // Output only. Description of the state of the Rollback.
4015  string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
4016}
4017
4018// The request object for `ListAutomationRuns`.
4019message ListAutomationRunsRequest {
4020  // Required. The parent `Delivery Pipeline`, which owns this collection of
4021  // automationRuns. Format must be
4022  // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
4023  string parent = 1 [
4024    (google.api.field_behavior) = REQUIRED,
4025    (google.api.resource_reference) = {
4026      child_type: "clouddeploy.googleapis.com/AutomationRun"
4027    }
4028  ];
4029
4030  // The maximum number of automationRuns to return. The service may return
4031  // fewer than this value. If unspecified, at most 50 automationRuns will
4032  // be returned. The maximum value is 1000; values above 1000 will be set
4033  // to 1000.
4034  int32 page_size = 2;
4035
4036  // A page token, received from a previous `ListAutomationRuns` call.
4037  // Provide this to retrieve the subsequent page.
4038  //
4039  // When paginating, all other provided parameters match
4040  // the call that provided the page token.
4041  string page_token = 3;
4042
4043  // Filter automationRuns to be returned. All fields can be used in the
4044  // filter.
4045  string filter = 4;
4046
4047  // Field to sort by.
4048  string order_by = 5;
4049}
4050
4051// The response object from `ListAutomationRuns`.
4052message ListAutomationRunsResponse {
4053  // The `AutomationRuns` objects.
4054  repeated AutomationRun automation_runs = 1;
4055
4056  // A token, which can be sent as `page_token` to retrieve the next page.
4057  // If this field is omitted, there are no subsequent pages.
4058  string next_page_token = 2;
4059
4060  // Locations that could not be reached.
4061  repeated string unreachable = 3;
4062}
4063
4064// The request object for `GetAutomationRun`
4065message GetAutomationRunRequest {
4066  // Required. Name of the `AutomationRun`. Format must be
4067  // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
4068  string name = 1 [
4069    (google.api.field_behavior) = REQUIRED,
4070    (google.api.resource_reference) = {
4071      type: "clouddeploy.googleapis.com/AutomationRun"
4072    }
4073  ];
4074}
4075
4076// The request object used by `CancelAutomationRun`.
4077message CancelAutomationRunRequest {
4078  // Required. Name of the `AutomationRun`. Format is
4079  // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
4080  string name = 1 [
4081    (google.api.field_behavior) = REQUIRED,
4082    (google.api.resource_reference) = {
4083      type: "clouddeploy.googleapis.com/AutomationRun"
4084    }
4085  ];
4086}
4087
4088// The response object from `CancelAutomationRun`.
4089message CancelAutomationRunResponse {}
4090
4091// The support state of a specific Skaffold version.
4092enum SkaffoldSupportState {
4093  // Default value. This value is unused.
4094  SKAFFOLD_SUPPORT_STATE_UNSPECIFIED = 0;
4095
4096  // This Skaffold version is currently supported.
4097  SKAFFOLD_SUPPORT_STATE_SUPPORTED = 1;
4098
4099  // This Skaffold version is in maintenance mode.
4100  SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE = 2;
4101
4102  // This Skaffold version is no longer supported.
4103  SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3;
4104}
4105
4106// The pattern of how wait time is increased.
4107enum BackoffMode {
4108  // No WaitMode is specified.
4109  BACKOFF_MODE_UNSPECIFIED = 0;
4110
4111  // Increases the wait time linearly.
4112  BACKOFF_MODE_LINEAR = 1;
4113
4114  // Increases the wait time exponentially.
4115  BACKOFF_MODE_EXPONENTIAL = 2;
4116}
4117
4118// Valid state of a repair attempt.
4119enum RepairState {
4120  // The `repair` has an unspecified state.
4121  REPAIR_STATE_UNSPECIFIED = 0;
4122
4123  // The `repair` action has succeeded.
4124  REPAIR_STATE_SUCCEEDED = 1;
4125
4126  // The `repair` action was cancelled.
4127  REPAIR_STATE_CANCELLED = 2;
4128
4129  // The `repair` action has failed.
4130  REPAIR_STATE_FAILED = 3;
4131
4132  // The `repair` action is in progress.
4133  REPAIR_STATE_IN_PROGRESS = 4;
4134
4135  // The `repair` action is pending.
4136  REPAIR_STATE_PENDING = 5;
4137
4138  // The `repair` action was skipped.
4139  REPAIR_STATE_SKIPPED = 6;
4140}
4141