summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/cloud/deploy/v1/cloud_deploy.proto
blob: 69f8d522208e5f51e5e82abb040e8210c2c82a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.deploy.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/type/date.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy";
option java_multiple_files = true;
option java_outer_classname = "CloudDeployProto";
option java_package = "com.google.cloud.deploy.v1";
option (google.api.resource_definition) = {
  type: "cloudbuild.googleapis.com/Build"
  pattern: "projects/{project}/locations/{location}/builds/{build}"
};
option (google.api.resource_definition) = {
  type: "container.googleapis.com/Cluster"
  pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
};
option (google.api.resource_definition) = {
  type: "clouddeploy.googleapis.com/Operation"
  pattern: "projects/{project}/locations/{location}/operations/{operation}"
};
option (google.api.resource_definition) = {
  type: "cloudbuild.googleapis.com/WorkerPool"
  pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}"
};
option (google.api.resource_definition) = {
  type: "gkehub.googleapis.com/Membership"
  pattern: "projects/{project}/locations/{location}/memberships/{membership}"
};

// CloudDeploy service creates and manages Continuous Delivery operations
// on Google Cloud Platform via Skaffold (https://skaffold.dev).
service CloudDeploy {
  option (google.api.default_host) = "clouddeploy.googleapis.com";
  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";

  // Lists DeliveryPipelines in a given project and location.
  rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) returns (ListDeliveryPipelinesResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single DeliveryPipeline.
  rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) returns (DeliveryPipeline) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new DeliveryPipeline in a given project and location.
  rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
      body: "delivery_pipeline"
    };
    option (google.api.method_signature) = "parent,delivery_pipeline,delivery_pipeline_id";
    option (google.longrunning.operation_info) = {
      response_type: "DeliveryPipeline"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the parameters of a single DeliveryPipeline.
  rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}"
      body: "delivery_pipeline"
    };
    option (google.api.method_signature) = "delivery_pipeline,update_mask";
    option (google.longrunning.operation_info) = {
      response_type: "DeliveryPipeline"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a single DeliveryPipeline.
  rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Lists Targets in a given project and location.
  rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*}/targets"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Target.
  rpc GetTarget(GetTargetRequest) returns (Target) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/targets/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new Target in a given project and location.
  rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*}/targets"
      body: "target"
    };
    option (google.api.method_signature) = "parent,target,target_id";
    option (google.longrunning.operation_info) = {
      response_type: "Target"
      metadata_type: "OperationMetadata"
    };
  }

  // Updates the parameters of a single Target.
  rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      patch: "/v1/{target.name=projects/*/locations/*/targets/*}"
      body: "target"
    };
    option (google.api.method_signature) = "target,update_mask";
    option (google.longrunning.operation_info) = {
      response_type: "Target"
      metadata_type: "OperationMetadata"
    };
  }

  // Deletes a single Target.
  rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      delete: "/v1/{name=projects/*/locations/*/targets/*}"
    };
    option (google.api.method_signature) = "name";
    option (google.longrunning.operation_info) = {
      response_type: "google.protobuf.Empty"
      metadata_type: "OperationMetadata"
    };
  }

  // Lists Releases in a given project and location.
  rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Release.
  rpc GetRelease(GetReleaseRequest) returns (Release) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new Release in a given project and location.
  rpc CreateRelease(CreateReleaseRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
      body: "release"
    };
    option (google.api.method_signature) = "parent,release,release_id";
    option (google.longrunning.operation_info) = {
      response_type: "Release"
      metadata_type: "OperationMetadata"
    };
  }

  // Abandons a Release in the Delivery Pipeline.
  rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) {
    option (google.api.http) = {
      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon"
      body: "*"
    };
    option (google.api.method_signature) = "name";
  }

  // Approves a Rollout.
  rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) {
    option (google.api.http) = {
      post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve"
      body: "*"
    };
    option (google.api.method_signature) = "name";
  }

  // Lists Rollouts in a given project and location.
  rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single Rollout.
  rpc GetRollout(GetRolloutRequest) returns (Rollout) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Creates a new Rollout in a given project and location.
  rpc CreateRollout(CreateRolloutRequest) returns (google.longrunning.Operation) {
    option (google.api.http) = {
      post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
      body: "rollout"
    };
    option (google.api.method_signature) = "parent,rollout,rollout_id";
    option (google.longrunning.operation_info) = {
      response_type: "Rollout"
      metadata_type: "OperationMetadata"
    };
  }

  // Retries the specified Job in a Rollout.
  rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) {
    option (google.api.http) = {
      post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob"
      body: "*"
    };
    option (google.api.method_signature) = "rollout,phase_id,job_id";
  }

  // Lists JobRuns in a given project and location.
  rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) {
    option (google.api.http) = {
      get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns"
    };
    option (google.api.method_signature) = "parent";
  }

  // Gets details of a single JobRun.
  rpc GetJobRun(GetJobRunRequest) returns (JobRun) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}"
    };
    option (google.api.method_signature) = "name";
  }

  // Gets the configuration for a location.
  rpc GetConfig(GetConfigRequest) returns (Config) {
    option (google.api.http) = {
      get: "/v1/{name=projects/*/locations/*/config}"
    };
    option (google.api.method_signature) = "name";
  }
}

// A `DeliveryPipeline` resource in the Google Cloud Deploy API.
//
// A `DeliveryPipeline` defines a pipeline through which a Skaffold
// configuration can progress.
message DeliveryPipeline {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/DeliveryPipeline"
    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}"
  };

  // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
  // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
  string name = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Unique identifier of the `DeliveryPipeline`.
  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Description of the `DeliveryPipeline`. Max length is 255 characters.
  string description = 3;

  // User annotations. These attributes can only be set and used by the
  // user, and not by Google Cloud Deploy.
  map<string, string> annotations = 4;

  // Labels are attributes that can be set and used by both the
  // user and by Google Cloud Deploy. Labels must meet the following
  // constraints:
  //
  // * Keys and values can contain only lowercase letters, numeric characters,
  // underscores, and dashes.
  // * All characters must use UTF-8 encoding, and international characters are
  // allowed.
  // * Keys must start with a lowercase letter or international character.
  // * Each resource is limited to a maximum of 64 labels.
  //
  // Both keys and values are additionally constrained to be <= 128 bytes.
  map<string, string> labels = 5;

  // Output only. Time at which the pipeline was created.
  google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Most recent time at which the pipeline was updated.
  google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The ordering configuration of the `DeliveryPipeline`.
  oneof pipeline {
    // SerialPipeline defines a sequential set of stages for a
    // `DeliveryPipeline`.
    SerialPipeline serial_pipeline = 8;
  }

  // Output only. Information around the state of the Delivery Pipeline.
  PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY];

  // This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 10;

  // When suspended, no new releases or rollouts can be created,
  // but in-progress ones will complete.
  bool suspended = 12;
}

// SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
message SerialPipeline {
  // Each stage specifies configuration for a `Target`. The ordering
  // of this list defines the promotion flow.
  repeated Stage stages = 1;
}

// Stage specifies a location to which to deploy.
message Stage {
  // The target_id to which this stage points. This field refers exclusively to
  // the last segment of a target name. For example, this field would just be
  // `my-target` (rather than
  // `projects/project/locations/location/targets/my-target`). The location of
  // the `Target` is inferred to be the same as the location of the
  // `DeliveryPipeline` that contains this `Stage`.
  string target_id = 1;

  // Skaffold profiles to use when rendering the manifest for this stage's
  // `Target`.
  repeated string profiles = 2;

  // Optional. The strategy to use for a `Rollout` to this stage.
  Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Strategy contains deployment strategy information.
message Strategy {
  // Deployment strategy details.
  oneof deployment_strategy {
    // Standard deployment strategy executes a single deploy and allows
    // verifying the deployment.
    Standard standard = 1;
  }
}

// Standard represents the standard deployment strategy.
message Standard {
  // Whether to verify a deployment.
  bool verify = 1;
}

// PipelineReadyCondition contains information around the status of the
// Pipeline.
message PipelineReadyCondition {
  // True if the Pipeline is in a valid state. Otherwise at least one condition
  // in `PipelineCondition` is in an invalid state. Iterate over those
  // conditions and see which condition(s) has status = false to find out what
  // is wrong with the Pipeline.
  bool status = 3;

  // Last time the condition was updated.
  google.protobuf.Timestamp update_time = 4;
}

// TargetsPresentCondition contains information on any Targets defined in
// the Delivery Pipeline that do not actually exist.
message TargetsPresentCondition {
  // True if there aren't any missing Targets.
  bool status = 1;

  // The list of Target names that are missing. For example,
  // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  repeated string missing_targets = 2 [(google.api.resource_reference) = {
                                         type: "clouddeploy.googleapis.com/Target"
                                       }];

  // Last time the condition was updated.
  google.protobuf.Timestamp update_time = 4;
}

// PipelineCondition contains all conditions relevant to a Delivery Pipeline.
message PipelineCondition {
  // Details around the Pipeline's overall status.
  PipelineReadyCondition pipeline_ready_condition = 1;

  // Detalis around targets enumerated in the pipeline.
  TargetsPresentCondition targets_present_condition = 3;
}

// The request object for `ListDeliveryPipelines`.
message ListDeliveryPipelinesRequest {
  // Required. The parent, which owns this collection of pipelines. Format must be
  // projects/{project_id}/locations/{location_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];

  // The maximum number of pipelines to return. The service may return
  // fewer than this value. If unspecified, at most 50 pipelines will
  // be returned. The maximum value is 1000; values above 1000 will be set
  // to 1000.
  int32 page_size = 2;

  // A page token, received from a previous `ListDeliveryPipelines` call.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other provided parameters match
  // the call that provided the page token.
  string page_token = 3;

  // Filter pipelines to be returned. See https://google.aip.dev/160 for more
  // details.
  string filter = 4;

  // Field to sort by. See https://google.aip.dev/132#ordering for more details.
  string order_by = 5;
}

// The response object from `ListDeliveryPipelines`.
message ListDeliveryPipelinesResponse {
  // The `DeliveryPipeline` objects.
  repeated DeliveryPipeline delivery_pipelines = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// The request object for `GetDeliveryPipeline`
message GetDeliveryPipelineRequest {
  // Required. Name of the `DeliveryPipeline`. Format must be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];
}

// The request object for `CreateDeliveryPipeline`.
message CreateDeliveryPipelineRequest {
  // Required. The parent collection in which the `DeliveryPipeline` should be created.
  // Format should be projects/{project_id}/locations/{location_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];

  // Required. ID of the `DeliveryPipeline`.
  string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The `DeliveryPipeline` to create.
  DeliveryPipeline delivery_pipeline = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The request object for `UpdateDeliveryPipeline`.
message UpdateDeliveryPipelineRequest {
  // Required. Field mask is used to specify the fields to be overwritten in the
  // `DeliveryPipeline` resource by the update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask. If the
  // user does not provide a mask then all fields will be overwritten.
  google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The `DeliveryPipeline` to update.
  DeliveryPipeline delivery_pipeline = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
  // result in the creation of a new `DeliveryPipeline`.
  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The request object for `DeleteDeliveryPipeline`.
message DeleteDeliveryPipelineRequest {
  // Required. The name of the `DeliveryPipeline` to delete. Format should be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes after the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, then deleting an already deleted or non-existing
  // `DeliveryPipeline` will succeed.
  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set, validate the request and preview the review, but do not actually
  // post it.
  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, all child resources under this pipeline will also be
  // deleted. Otherwise, the request will only work if the pipeline has
  // no child resources.
  bool force = 6 [(google.api.field_behavior) = OPTIONAL];

  // Optional. This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
}

// A `Target` resource in the Google Cloud Deploy API.
//
// A `Target` defines a location to which a Skaffold configuration
// can be deployed.
message Target {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/Target"
    pattern: "projects/{project}/locations/{location}/targets/{target}"
  };

  // Optional. Name of the `Target`. Format is
  // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
  string name = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Resource id of the `Target`.
  string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Unique identifier of the `Target`.
  string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Optional. Description of the `Target`. Max length is 255 characters.
  string description = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. User annotations. These attributes can only be set and used by the
  // user, and not by Google Cloud Deploy. See
  // https://google.aip.dev/128#annotations for more details such as format and
  // size limitations.
  map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Labels are attributes that can be set and used by both the
  // user and by Google Cloud Deploy. Labels must meet the following
  // constraints:
  //
  // * Keys and values can contain only lowercase letters, numeric characters,
  // underscores, and dashes.
  // * All characters must use UTF-8 encoding, and international characters are
  // allowed.
  // * Keys must start with a lowercase letter or international character.
  // * Each resource is limited to a maximum of 64 labels.
  //
  // Both keys and values are additionally constrained to be <= 128 bytes.
  map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Whether or not the `Target` requires approval.
  bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Time at which the `Target` was created.
  google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Most recent time at which the `Target` was updated.
  google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Destination to which the Skaffold configuration is applied during a
  // rollout.
  oneof deployment_target {
    // Information specifying a GKE Cluster.
    GkeCluster gke = 15;

    // Information specifying an Anthos Cluster.
    AnthosCluster anthos_cluster = 17;

    // Information specifying a Cloud Run deployment target.
    CloudRunLocation run = 18;
  }

  // Optional. This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 12 [(google.api.field_behavior) = OPTIONAL];

  // Configurations for all execution that relates to this `Target`.
  // Each `ExecutionEnvironmentUsage` value may only be used in a single
  // configuration; using the same value multiple times is an error.
  // When one or more configurations are specified, they must include the
  // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
  // When no configurations are specified, execution will use the default
  // specified in `DefaultPool`.
  repeated ExecutionConfig execution_configs = 16;
}

// Configuration of the environment to use when calling Skaffold.
message ExecutionConfig {
  // Possible usages of this configuration.
  enum ExecutionEnvironmentUsage {
    // Default value. This value is unused.
    EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0;

    // Use for rendering.
    RENDER = 1;

    // Use for deploying and deployment hooks.
    DEPLOY = 2;

    // Use for deployment verification.
    VERIFY = 3;
  }

  // Required. Usages when this configuration should be applied.
  repeated ExecutionEnvironmentUsage usages = 1 [(google.api.field_behavior) = REQUIRED];

  // Details of the environment.
  oneof execution_environment {
    // Optional. Use default Cloud Build pool.
    DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL];

    // Optional. Use private Cloud Build pool.
    PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL];
  }

  // Optional. The resource name of the `WorkerPool`, with the format
  // `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
  // If this optional field is unspecified, the default Cloud Build pool will be
  // used.
  string worker_pool = 4 [
    (google.api.field_behavior) = OPTIONAL,
    (google.api.resource_reference) = {
      type: "cloudbuild.googleapis.com/WorkerPool"
    }
  ];

  // Optional. Google service account to use for execution. If unspecified,
  // the project execution service account
  // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) is used.
  string service_account = 5 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Cloud Storage location in which to store execution outputs. This can
  // either be a bucket ("gs://my-bucket") or a path within a bucket
  // ("gs://my-bucket/my-dir").
  // If unspecified, a default bucket located in the same region will be used.
  string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
  // 24h in seconds format.
  // If unspecified, a default timeout of 1h is used.
  google.protobuf.Duration execution_timeout = 7 [(google.api.field_behavior) = OPTIONAL];
}

// Execution using the default Cloud Build pool.
message DefaultPool {
  // Optional. Google service account to use for execution. If unspecified,
  // the project execution service account
  // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
  string service_account = 1 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Cloud Storage location where execution outputs should be stored. This can
  // either be a bucket ("gs://my-bucket") or a path within a bucket
  // ("gs://my-bucket/my-dir").
  // If unspecified, a default bucket located in the same region will be used.
  string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Execution using a private Cloud Build pool.
message PrivatePool {
  // Required. Resource name of the Cloud Build worker pool to use. The format is
  // `projects/{project}/locations/{location}/workerPools/{pool}`.
  string worker_pool = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "cloudbuild.googleapis.com/WorkerPool"
    }
  ];

  // Optional. Google service account to use for execution. If unspecified,
  // the project execution service account
  // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
  string service_account = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Cloud Storage location where execution outputs should be stored. This can
  // either be a bucket ("gs://my-bucket") or a path within a bucket
  // ("gs://my-bucket/my-dir").
  // If unspecified, a default bucket located in the same region will be used.
  string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Information specifying a GKE Cluster.
message GkeCluster {
  // Information specifying a GKE Cluster. Format is
  // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
  string cluster = 1 [(google.api.resource_reference) = {
                        type: "container.googleapis.com/Cluster"
                      }];

  // Optional. If true, `cluster` is accessed using the private IP address of the control
  // plane endpoint. Otherwise, the default IP address of the control plane
  // endpoint is used. The default IP address is the private IP address for
  // clusters with private control-plane endpoints and the public IP address
  // otherwise.
  //
  // Only specify this option when `cluster` is a [private GKE
  // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).
  bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Information specifying an Anthos Cluster.
message AnthosCluster {
  // Membership of the GKE Hub-registered cluster to which to apply the Skaffold
  // configuration. Format is
  // `projects/{project}/locations/{location}/memberships/{membership_name}`.
  string membership = 1 [(google.api.resource_reference) = {
                           type: "gkehub.googleapis.com/Membership"
                         }];
}

// Information specifying where to deploy a Cloud Run Service.
message CloudRunLocation {
  // Required. The location for the Cloud Run Service. Format must be
  // `projects/{project}/locations/{location}`.
  string location = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "locations.googleapis.com/Location"
    }
  ];
}

// The request object for `ListTargets`.
message ListTargetsRequest {
  // Required. The parent, which owns this collection of targets. Format must be
  // projects/{project_id}/locations/{location_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "clouddeploy.googleapis.com/Target"
    }
  ];

  // Optional. The maximum number of `Target` objects to return. The service may return
  // fewer than this value. If unspecified, at most 50 `Target` objects will be
  // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListTargets` call.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other provided parameters match
  // the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter targets to be returned. See https://google.aip.dev/160 for more
  // details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The response object from `ListTargets`.
message ListTargetsResponse {
  // The `Target` objects.
  repeated Target targets = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// The request object for `GetTarget`.
message GetTargetRequest {
  // Required. Name of the `Target`. Format must be
  // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Target"
    }
  ];
}

// The request object for `CreateTarget`.
message CreateTargetRequest {
  // Required. The parent collection in which the `Target` should be created.
  // Format should be
  // projects/{project_id}/locations/{location_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      child_type: "clouddeploy.googleapis.com/Target"
    }
  ];

  // Required. ID of the `Target`.
  string target_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The `Target` to create.
  Target target = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The request object for `UpdateTarget`.
message UpdateTargetRequest {
  // Required. Field mask is used to specify the fields to be overwritten in the
  // Target resource by the update.
  // The fields specified in the update_mask are relative to the resource, not
  // the full request. A field will be overwritten if it is in the mask. If the
  // user does not provide a mask then all fields will be overwritten.
  google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];

  // Required. The `Target` to update.
  Target target = 2 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, updating a `Target` that does not exist will
  // result in the creation of a new `Target`.
  bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The request object for `DeleteTarget`.
message DeleteTargetRequest {
  // Required. The name of the `Target` to delete. Format should be
  // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Target"
    }
  ];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes after the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, then deleting an already deleted or non-existing
  // DeliveryPipeline will succeed.
  bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set, validate the request and preview the review, but do not actually
  // post it.
  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 5 [(google.api.field_behavior) = OPTIONAL];
}

// A `Release` resource in the Google Cloud Deploy API.
//
// A `Release` defines a specific Skaffold configuration instance
// that can be deployed.
message Release {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/Release"
    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}"
  };

  // Valid states of the render operation.
  enum RenderState {
    // The render state is unspecified.
    RENDER_STATE_UNSPECIFIED = 0;

    // All rendering operations have completed successfully.
    SUCCEEDED = 1;

    // All rendering operations have completed, and one or more have failed.
    FAILED = 2;

    // Rendering has started and is not complete.
    IN_PROGRESS = 3;
  }

  // Details of rendering for a single target.
  message TargetRender {
    // Valid states of the render operation.
    enum TargetRenderState {
      // The render operation state is unspecified.
      TARGET_RENDER_STATE_UNSPECIFIED = 0;

      // The render operation has completed successfully.
      SUCCEEDED = 1;

      // The render operation has failed.
      FAILED = 2;

      // The render operation is in progress.
      IN_PROGRESS = 3;
    }

    // Well-known rendering failures.
    enum FailureCause {
      // No reason for failure is specified.
      FAILURE_CAUSE_UNSPECIFIED = 0;

      // Cloud Build is not available, either because it is not enabled or
      // because Google Cloud Deploy has insufficient permissions. See [required
      // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
      CLOUD_BUILD_UNAVAILABLE = 1;

      // The render operation did not complete successfully; check Cloud Build
      // logs.
      EXECUTION_FAILED = 2;
    }

    // Output only. The resource name of the Cloud Build `Build` object that is used to
    // render the manifest for this target. Format is
    // `projects/{project}/locations/{location}/builds/{build}`.
    string rendering_build = 1 [
      (google.api.field_behavior) = OUTPUT_ONLY,
      (google.api.resource_reference) = {
        type: "cloudbuild.googleapis.com/Build"
      }
    ];

    // Output only. Current state of the render operation for this Target.
    TargetRenderState rendering_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. Reason this render failed. This will always be unspecified while the
    // render in progress.
    FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. Additional information about the render failure, if available.
    string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Optional. Name of the `Release`. Format is projects/{project}/
  // locations/{location}/deliveryPipelines/{deliveryPipeline}/
  // releases/[a-z][a-z0-9\-]{0,62}.
  string name = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Unique identifier of the `Release`.
  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Description of the `Release`. Max length is 255 characters.
  string description = 3;

  // User annotations. These attributes can only be set and used by the
  // user, and not by Google Cloud Deploy. See
  // https://google.aip.dev/128#annotations for more details such as format and
  // size limitations.
  map<string, string> annotations = 4;

  // Labels are attributes that can be set and used by both the
  // user and by Google Cloud Deploy. Labels must meet the following
  // constraints:
  //
  // * Keys and values can contain only lowercase letters, numeric characters,
  // underscores, and dashes.
  // * All characters must use UTF-8 encoding, and international characters are
  // allowed.
  // * Keys must start with a lowercase letter or international character.
  // * Each resource is limited to a maximum of 64 labels.
  //
  // Both keys and values are additionally constrained to be <= 128 bytes.
  map<string, string> labels = 5;

  // Output only. Indicates whether this is an abandoned release.
  bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `Release` was created.
  google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the render began.
  google.protobuf.Timestamp render_start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the render completed.
  google.protobuf.Timestamp render_end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Cloud Storage URI of tar.gz archive containing Skaffold configuration.
  string skaffold_config_uri = 17;

  // Filepath of the Skaffold config inside of the config URI.
  string skaffold_config_path = 9;

  // List of artifacts to pass through to Skaffold command.
  repeated BuildArtifact build_artifacts = 10;

  // Output only. Snapshot of the parent pipeline taken at release creation time.
  DeliveryPipeline delivery_pipeline_snapshot = 11 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Snapshot of the targets taken at release creation time.
  repeated Target target_snapshots = 12 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Current state of the render operation.
  RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];

  // This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 16;

  // The Skaffold version to use when operating on this release, such as
  // "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
  // specific set of versions.
  //
  // If unset, the most recent supported Skaffold version will be used.
  string skaffold_version = 19;

  // Output only. Map from target ID to the target artifacts created
  // during the render operation.
  map<string, TargetArtifact> target_artifacts = 20 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Map from target ID to details of the render operation for that target.
  map<string, TargetRender> target_renders = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Description of an a image to use during Skaffold rendering.
message BuildArtifact {
  // Image name in Skaffold configuration.
  string image = 3;

  // Image tag to use. This will generally be the full path to an image, such
  // as "gcr.io/my-project/busybox:1.2.3" or
  // "gcr.io/my-project/busybox@sha256:abc123".
  string tag = 2;
}

// The artifacts produced by a target render operation.
message TargetArtifact {
  oneof uri {
    // Output only. URI of a directory containing the artifacts. This contains
    // deployment configuration used by Skaffold during a rollout, and all
    // paths are relative to this location.
    string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Output only. File path of the resolved Skaffold configuration relative to the URI.
  string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. File path of the rendered manifest relative to the URI.
  string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The request object for `ListReleases`.
message ListReleasesRequest {
  // Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];

  // Optional. The maximum number of `Release` objects to return. The service may return
  // fewer than this value. If unspecified, at most 50 `Release` objects will be
  // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListReleases` call.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other provided parameters match
  // the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter releases to be returned. See https://google.aip.dev/160 for more
  // details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// The response object from `ListReleases`.
message ListReleasesResponse {
  // The `Release` objects.
  repeated Release releases = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// The request object for `GetRelease`.
message GetReleaseRequest {
  // Required. Name of the `Release`. Format must be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Release"
    }
  ];
}

// The request object for `CreateRelease`,
message CreateReleaseRequest {
  // Required. The parent collection in which the `Release` should be created.
  // Format should be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/DeliveryPipeline"
    }
  ];

  // Required. ID of the `Release`.
  string release_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The `Release` to create.
  Release release = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// A `Rollout` resource in the Google Cloud Deploy API.
//
// A `Rollout` contains information around a specific deployment to a `Target`.
message Rollout {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/Rollout"
    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}"
  };

  // Valid approval states of a `Rollout`.
  enum ApprovalState {
    // The `Rollout` has an unspecified approval state.
    APPROVAL_STATE_UNSPECIFIED = 0;

    // The `Rollout` requires approval.
    NEEDS_APPROVAL = 1;

    // The `Rollout` does not require approval.
    DOES_NOT_NEED_APPROVAL = 2;

    // The `Rollout` has been approved.
    APPROVED = 3;

    // The `Rollout` has been rejected.
    REJECTED = 4;
  }

  // Valid states of a `Rollout`.
  enum State {
    // The `Rollout` has an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The `Rollout` has completed successfully.
    SUCCEEDED = 1;

    // The `Rollout` has failed.
    FAILED = 2;

    // The `Rollout` is being deployed.
    IN_PROGRESS = 3;

    // The `Rollout` needs approval.
    PENDING_APPROVAL = 4;

    // An approver rejected the `Rollout`.
    APPROVAL_REJECTED = 5;

    // The `Rollout` is waiting for an earlier Rollout(s) to complete on this
    // `Target`.
    PENDING = 6;

    // The `Rollout` is waiting for the `Release` to be fully rendered.
    PENDING_RELEASE = 7;
  }

  // Well-known rollout failures.
  enum FailureCause {
    // No reason for failure is specified.
    FAILURE_CAUSE_UNSPECIFIED = 0;

    // Cloud Build is not available, either because it is not enabled or because
    // Cloud Deploy has insufficient permissions. See [required
    // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
    CLOUD_BUILD_UNAVAILABLE = 1;

    // The deploy operation did not complete successfully; check Cloud Build
    // logs.
    EXECUTION_FAILED = 2;

    // Deployment did not complete within the alloted time.
    DEADLINE_EXCEEDED = 3;

    // Release is in a failed state.
    RELEASE_FAILED = 4;

    // Release is abandoned.
    RELEASE_ABANDONED = 5;

    // No skaffold verify configuration was found.
    VERIFICATION_CONFIG_NOT_FOUND = 6;
  }

  // Optional. Name of the `Rollout`. Format is projects/{project}/
  // locations/{location}/deliveryPipelines/{deliveryPipeline}/
  // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
  string name = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Unique identifier of the `Rollout`.
  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Description of the `Rollout` for user purposes. Max length is 255
  // characters.
  string description = 3;

  // User annotations. These attributes can only be set and used by the
  // user, and not by Google Cloud Deploy. See
  // https://google.aip.dev/128#annotations for more details such as format and
  // size limitations.
  map<string, string> annotations = 4;

  // Labels are attributes that can be set and used by both the
  // user and by Google Cloud Deploy. Labels must meet the following
  // constraints:
  //
  // * Keys and values can contain only lowercase letters, numeric characters,
  // underscores, and dashes.
  // * All characters must use UTF-8 encoding, and international characters are
  // allowed.
  // * Keys must start with a lowercase letter or international character.
  // * Each resource is limited to a maximum of 64 labels.
  //
  // Both keys and values are additionally constrained to be <= 128 bytes.
  map<string, string> labels = 5;

  // Output only. Time at which the `Rollout` was created.
  google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `Rollout` was approved.
  google.protobuf.Timestamp approve_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `Rollout` was enqueued.
  google.protobuf.Timestamp enqueue_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `Rollout` started deploying.
  google.protobuf.Timestamp deploy_start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `Rollout` finished deploying.
  google.protobuf.Timestamp deploy_end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Required. The ID of Target to which this `Rollout` is deploying.
  string target_id = 18 [(google.api.field_behavior) = REQUIRED];

  // Output only. Approval state of the `Rollout`.
  ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Current state of the `Rollout`.
  State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Additional information about the rollout failure, if available.
  string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The resource name of the Cloud Build `Build` object that is used to deploy
  // the Rollout. Format is
  // `projects/{project}/locations/{location}/builds/{build}`.
  string deploying_build = 17 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "cloudbuild.googleapis.com/Build"
    }
  ];

  // This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 16;

  // Output only. The reason this rollout failed. This will always be unspecified while the
  // rollout is in progress.
  FailureCause deploy_failure_cause = 19 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The phases that represent the workflows of this `Rollout`.
  repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Metadata contains information about the rollout.
  Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Metadata includes information associated with a `Rollout`.
message Metadata {
  // Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
  CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to
// the user.
message DeployJobRunMetadata {
  // Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
  CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// CloudRunMetadata contains information from a Cloud Run deployment.
message CloudRunMetadata {
  // Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
  // Format is projects/{project}/locations/{location}/services/{service}.
  string service = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The Cloud Run Service urls that are associated with a `Rollout`.
  repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The Cloud Run Revision id associated with a `Rollout`.
  string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Phase represents a collection of jobs that are logically grouped together
// for a `Rollout`.
message Phase {
  // Valid states of a Phase.
  enum State {
    // The Phase has an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The Phase is waiting for an earlier Phase(s) to complete.
    PENDING = 1;

    // The Phase is in progress.
    IN_PROGRESS = 2;

    // The Phase has succeeded.
    SUCCEEDED = 3;

    // The Phase has failed.
    FAILED = 4;

    // The Phase was aborted.
    ABORTED = 5;
  }

  // Output only. The ID of the Phase.
  string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Current state of the Phase.
  State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The job composition of this Phase.
  oneof jobs {
    // Output only. Deployment job composition.
    DeploymentJobs deployment_jobs = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

// Deployment job composition.
message DeploymentJobs {
  // Output only. The deploy Job. This is the first job run in the phase.
  Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The verify Job. Runs after a deploy if the deploy succeeds.
  Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Job represents an operation for a `Rollout`.
message Job {
  // Valid states of a Job.
  enum State {
    // The Job has an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The Job is waiting for an earlier Phase(s) or Job(s) to complete.
    PENDING = 1;

    // The Job is disabled.
    DISABLED = 2;

    // The Job is in progress.
    IN_PROGRESS = 3;

    // The Job succeeded.
    SUCCEEDED = 4;

    // The Job failed.
    FAILED = 5;

    // The Job was aborted.
    ABORTED = 6;
  }

  // Output only. The ID of the Job.
  string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The current state of the Job.
  State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The name of the `JobRun` responsible for the most recent invocation of this
  // Job.
  string job_run = 3 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/JobRun"
    }
  ];

  // The type of Job.
  oneof job_type {
    // Output only. A deploy Job.
    DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. A verify Job.
    VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  }
}

// A deploy Job.
message DeployJob {

}

// A verify Job.
message VerifyJob {

}

// ListRolloutsRequest is the request object used by `ListRollouts`.
message ListRolloutsRequest {
  // Required. The `Release` which owns this collection of `Rollout` objects.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Release"
    }
  ];

  // Optional. The maximum number of `Rollout` objects to return. The service may return
  // fewer than this value. If unspecified, at most 50 `Rollout` objects will be
  // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListRollouts` call.
  // Provide this to retrieve the subsequent page.
  //
  // When paginating, all other provided parameters match
  // the call that provided the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more
  // details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// ListRolloutsResponse is the response object reutrned by `ListRollouts`.
message ListRolloutsResponse {
  // The `Rollout` objects.
  repeated Rollout rollouts = 1;

  // A token, which can be sent as `page_token` to retrieve the next page.
  // If this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that could not be reached.
  repeated string unreachable = 3;
}

// GetRolloutRequest is the request object used by `GetRollout`.
message GetRolloutRequest {
  // Required. Name of the `Rollout`. Format must be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Rollout"
    }
  ];
}

// CreateRolloutRequest is the request object used by `CreateRollout`.
message CreateRolloutRequest {
  // Required. The parent collection in which the `Rollout` should be created.
  // Format should be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Release"
    }
  ];

  // Required. ID of the `Rollout`.
  string rollout_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The `Rollout` to create.
  Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED];

  // Optional. A request ID to identify requests. Specify a unique request ID
  // so that if you must retry your request, the server will know to ignore
  // the request if it has already been completed. The server will guarantee
  // that for at least 60 minutes since the first request.
  //
  // For example, consider a situation where you make an initial request and the
  // request times out. If you make the request again with the same request ID,
  // the server can check if original operation with the same request ID was
  // received, and if so, will ignore the second request. This prevents clients
  // from accidentally creating duplicate commitments.
  //
  // The request ID must be a valid UUID with the exception that zero UUID is
  // not supported (00000000-0000-0000-0000-000000000000).
  string request_id = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. If set to true, the request is validated and the user is provided with
  // an expected result, but no actual change is made.
  bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Represents the metadata of the long-running operation.
message OperationMetadata {
  // Output only. The time the operation was created.
  google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The time the operation finished running.
  google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Server-defined resource path for the target of the operation.
  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Name of the verb executed by the operation.
  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Human-readable status of the operation, if any.
  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Identifies whether the user has requested cancellation
  // of the operation. Operations that have successfully been cancelled
  // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  // corresponding to `Code.CANCELLED`.
  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. API version used to start the operation.
  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The request object used by `ApproveRollout`.
message ApproveRolloutRequest {
  // Required. Name of the Rollout. Format is
  // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  // releases/{release}/rollouts/{rollout}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Rollout"
    }
  ];

  // Required. True = approve; false = reject
  bool approved = 2 [(google.api.field_behavior) = REQUIRED];
}

// The response object from `ApproveRollout`.
message ApproveRolloutResponse {

}

// RetryJobRequest is the request object used by `RetryJob`.
message RetryJobRequest {
  // Required. Name of the Rollout. Format is
  // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  // releases/{release}/rollouts/{rollout}.
  string rollout = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Rollout"
    }
  ];

  // Required. The phase ID the Job to retry belongs to.
  string phase_id = 2 [(google.api.field_behavior) = REQUIRED];

  // Required. The job ID for the Job to retry.
  string job_id = 3 [(google.api.field_behavior) = REQUIRED];
}

// The response object from 'RetryJob'.
message RetryJobResponse {

}

// The request object used by `AbandonRelease`.
message AbandonReleaseRequest {
  // Required. Name of the Release. Format is
  // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  // releases/{release}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Release"
    }
  ];
}

// The response object for `AbandonRelease`.
message AbandonReleaseResponse {

}

// A `JobRun` resource in the Google Cloud Deploy API.
//
// A `JobRun` contains information of a single `Rollout` job evaluation.
message JobRun {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/JobRun"
    pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}"
  };

  // Valid states of a `JobRun`.
  enum State {
    // The `JobRun` has an unspecified state.
    STATE_UNSPECIFIED = 0;

    // The `JobRun` is in progress.
    IN_PROGRESS = 1;

    // The `JobRun` has succeeded.
    SUCCEEDED = 2;

    // The `JobRun` has failed.
    FAILED = 3;
  }

  // Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
  // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
  // {rollouts}/jobRuns/{uuid}.
  string name = 1 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Unique identifier of the `JobRun`.
  string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. ID of the `Rollout` phase this `JobRun` belongs in.
  string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. ID of the `Rollout` job this `JobRun` corresponds to.
  string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `JobRun` was created.
  google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `JobRun` was started.
  google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Time at which the `JobRun` ended.
  google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The current state of the `JobRun`.
  State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

  // The `JobRun` type and the information for that type.
  oneof job_run {
    // Output only. Information specific to a deploy `JobRun`.
    DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

    // Output only. Information specific to a verify `JobRun`.
    VerifyJobRun verify_job_run = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  }

  // Output only. This checksum is computed by the server based on the value of other
  // fields, and may be sent on update and delete requests to ensure the
  // client has an up-to-date value before proceeding.
  string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// DeployJobRun contains information specific to a deploy `JobRun`.
message DeployJobRun {
  // Well-known deploy failures.
  enum FailureCause {
    // No reason for failure is specified.
    FAILURE_CAUSE_UNSPECIFIED = 0;

    // Cloud Build is not available, either because it is not enabled or because
    // Google Cloud Deploy has insufficient permissions. See [Required
    // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
    CLOUD_BUILD_UNAVAILABLE = 1;

    // The deploy operation did not complete successfully; check Cloud Build
    // logs.
    EXECUTION_FAILED = 2;

    // The deploy build did not complete within the alloted time.
    DEADLINE_EXCEEDED = 3;
  }

  // Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
  // Format is projects/{project}/locations/{location}/builds/{build}.
  string build = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "cloudbuild.googleapis.com/Build"
    }
  ];

  // Output only. The reason the deploy failed. This will always be unspecified while the
  // deploy is in progress or if it succeeded.
  FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Additional information about the deploy failure, if available.
  string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Metadata containing information about the deploy job run.
  DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// VerifyJobRun contains information specific to a verify `JobRun`.
message VerifyJobRun {
  // Well-known verify failures.
  enum FailureCause {
    // No reason for failure is specified.
    FAILURE_CAUSE_UNSPECIFIED = 0;

    // Cloud Build is not available, either because it is not enabled or because
    // Google Cloud Deploy has insufficient permissions. See [required
    // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
    CLOUD_BUILD_UNAVAILABLE = 1;

    // The verify operation did not complete successfully; check Cloud Build
    // logs.
    EXECUTION_FAILED = 2;

    // The verify build did not complete within the alloted time.
    DEADLINE_EXCEEDED = 3;

    // No Skaffold verify configuration was found.
    VERIFICATION_CONFIG_NOT_FOUND = 4;
  }

  // Output only. The resource name of the Cloud Build `Build` object that is used to verify.
  // Format is projects/{project}/locations/{location}/builds/{build}.
  string build = 1 [
    (google.api.field_behavior) = OUTPUT_ONLY,
    (google.api.resource_reference) = {
      type: "cloudbuild.googleapis.com/Build"
    }
  ];

  // Output only. URI of a directory containing the verify artifacts. This contains the
  // Skaffold event log.
  string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. File path of the Skaffold event log relative to the artifact URI.
  string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The reason the verify failed. This will always be unspecified while the
  // verify is in progress or if it succeeded.
  FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Additional information about the verify failure, if available.
  string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// ListJobRunsRequest is the request object used by `ListJobRuns`.
message ListJobRunsRequest {
  // Required. The `Rollout` which owns this collection of `JobRun` objects.
  string parent = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Rollout"
    }
  ];

  // Optional. The maximum number of `JobRun` objects to return. The service may return
  // fewer than this value. If unspecified, at most 50 `JobRun` objects will be
  // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. A page token, received from a previous `ListJobRuns` call. Provide this
  // to retrieve the subsequent page.
  //
  // When paginating, all other provided parameters match the call that provided
  // the page token.
  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Filter results to be returned. See https://google.aip.dev/160 for more
  // details.
  string filter = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}

// ListJobRunsResponse is the response object returned by `ListJobRuns`.
message ListJobRunsResponse {
  // The `JobRun` objects.
  repeated JobRun job_runs = 1;

  // A token, which can be sent as `page_token` to retrieve the next page. If
  // this field is omitted, there are no subsequent pages.
  string next_page_token = 2;

  // Locations that could not be reached
  repeated string unreachable = 3;
}

// GetJobRunRequest is the request object used by `GetJobRun`.
message GetJobRunRequest {
  // Required. Name of the `JobRun`. Format must be
  // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/JobRun"
    }
  ];
}

// Service-wide configuration.
message Config {
  option (google.api.resource) = {
    type: "clouddeploy.googleapis.com/Config"
    pattern: "projects/{project}/locations/{location}/config"
  };

  // Name of the configuration.
  string name = 1;

  // Output only. All supported versions of Skaffold.
  repeated SkaffoldVersion supported_versions = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Default Skaffold version that is assigned when a Release is created without
  // specifying a Skaffold version.
  string default_skaffold_version = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Details of a supported Skaffold version.
message SkaffoldVersion {
  // Release version number. For example, "1.20.3".
  string version = 1;

  // Date when this version is expected to no longer be supported.
  google.type.Date support_end_date = 2;
}

// Request to get a configuration.
message GetConfigRequest {
  // Required. Name of requested configuration.
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "clouddeploy.googleapis.com/Config"
    }
  ];
}