resultstore_upload.proto 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.devtools.resultstore.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/devtools/resultstore/v2/action.proto";
  21. import "google/devtools/resultstore/v2/configuration.proto";
  22. import "google/devtools/resultstore/v2/configured_target.proto";
  23. import "google/devtools/resultstore/v2/file_set.proto";
  24. import "google/devtools/resultstore/v2/invocation.proto";
  25. import "google/devtools/resultstore/v2/target.proto";
  26. import "google/devtools/resultstore/v2/upload_metadata.proto";
  27. import "google/protobuf/empty.proto";
  28. import "google/protobuf/field_mask.proto";
  29. import "google/protobuf/timestamp.proto";
  30. option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
  31. option java_multiple_files = true;
  32. option java_outer_classname = "ResultStoreUploadProto";
  33. option java_package = "com.google.devtools.resultstore.v2";
  34. // This is the interface used to upload information to the ResultStore database,
  35. // to update that information as necessary, and to make it immutable at the end.
  36. //
  37. // This interface intentionally does not support user read-modify-write
  38. // operations. They may corrupt data, and are too expensive. For the same
  39. // reason, all upload RPCs will return no resource fields except name and ID. An
  40. // uploader should hold as little state as possible in memory to avoid running
  41. // out of memory.
  42. service ResultStoreUpload {
  43. option (google.api.default_host) = "resultstore.googleapis.com";
  44. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  45. // Creates the given invocation.
  46. //
  47. // This is not an implicitly idempotent API, so a request id is required to
  48. // make it idempotent.
  49. //
  50. // Returns an empty Invocation proto with only the name and ID fields
  51. // populated.
  52. //
  53. // An error will be reported in the following cases:
  54. // - If an invocation with the same ID already exists.
  55. rpc CreateInvocation(CreateInvocationRequest) returns (Invocation) {
  56. option (google.api.http) = {
  57. post: "/v2/invocations"
  58. body: "invocation"
  59. };
  60. option (google.api.method_signature) = "request_id,invocation,invocation_id,authorization_token";
  61. }
  62. // Applies a standard update to the invocation identified by the given proto's
  63. // name. For all types of fields (primitive, message, or repeated), replaces
  64. // them with the given proto fields if they are under the given field mask
  65. // paths. Fields that match the mask but aren't populated in the given
  66. // invocation are cleared. This is an implicitly idempotent API.
  67. //
  68. // Returns an empty Invocation proto with only the name and ID fields
  69. // populated.
  70. //
  71. // An error will be reported in the following cases:
  72. // - If the invocation does not exist.
  73. // - If the invocation is finalized.
  74. // - If no field mask was given.
  75. rpc UpdateInvocation(UpdateInvocationRequest) returns (Invocation) {
  76. option (google.api.http) = {
  77. patch: "/v2/{invocation.name=invocations/*}"
  78. body: "invocation"
  79. };
  80. option (google.api.method_signature) = "invocation,update_mask,authorization_token";
  81. }
  82. // Applies a merge update to the invocation identified by the given proto's
  83. // name. For primitive and message fields, replaces them with the ones in
  84. // the given proto if they are covered under the field mask paths. For
  85. // repeated fields, merges to them with the given ones if they are covered
  86. // under the field mask paths. This is not an implicitly idempotent API, so a
  87. // request id is required to make it idempotent.
  88. //
  89. // Returns an empty Invocation proto with only the name and ID fields
  90. // populated.
  91. //
  92. //
  93. // An error will be reported in the following cases:
  94. // - If the invocation does not exist.
  95. // - If the invocation is finalized.
  96. // - If no field mask was given.
  97. rpc MergeInvocation(MergeInvocationRequest) returns (Invocation) {
  98. option (google.api.http) = {
  99. post: "/v2/{invocation.name=invocations/*}:merge"
  100. body: "*"
  101. };
  102. }
  103. // Touches the invocation identified by the given proto's name.
  104. //
  105. // This is useful when you need to notify ResultStore that you haven't
  106. // abandoned the upload, since abandoned uploads will be automatically
  107. // finalized after a set period.
  108. //
  109. // An error will be reported in the following cases:
  110. // - If the invocation does not exist.
  111. // - If the invocation is finalized.
  112. rpc TouchInvocation(TouchInvocationRequest) returns (TouchInvocationResponse) {
  113. option (google.api.http) = {
  114. post: "/v2/{name=invocations/*}:touch"
  115. body: "*"
  116. };
  117. }
  118. // Declares the invocation with the given name as finalized and immutable by
  119. // the user. It may still be mutated by post-processing. This is an implicitly
  120. // idempotent API.
  121. //
  122. // If an Invocation is not updated for 24 hours, some time after that
  123. // this will be called automatically.
  124. //
  125. // An error will be reported in the following cases:
  126. // - If the invocation does not exist.
  127. rpc FinalizeInvocation(FinalizeInvocationRequest) returns (FinalizeInvocationResponse) {
  128. option (google.api.http) = {
  129. post: "/v2/{name=invocations/*}:finalize"
  130. body: "*"
  131. };
  132. }
  133. // Deletes an immutable invocation (permanently)
  134. // Note: this does not delete indirect data, e.g. files stored in other
  135. // services.
  136. //
  137. // An error will be reported in the following cases:
  138. // - If the invocation does not exist.
  139. // - If the invocation is not finalized. This can be retried until it is.
  140. rpc DeleteInvocation(DeleteInvocationRequest) returns (google.protobuf.Empty) {
  141. option (google.api.http) = {
  142. delete: "/v2/{name=invocations/*}"
  143. };
  144. }
  145. // Creates the given target under the given parent invocation. The given
  146. // target ID is URL encoded, converted to the full resource name, and assigned
  147. // to the target's name field. This is not an implicitly idempotent API, so a
  148. // request id is required to make it idempotent.
  149. //
  150. // Returns an empty Target proto with only the name and ID fields populated.
  151. //
  152. // An error will be reported in the following cases:
  153. // - If no target ID is provided.
  154. // - If the parent invocation does not exist.
  155. // - If the parent invocation is finalized.
  156. // - If a target with the same name already exists.
  157. rpc CreateTarget(CreateTargetRequest) returns (Target) {
  158. option (google.api.http) = {
  159. post: "/v2/{parent=invocations/*}/targets"
  160. body: "target"
  161. };
  162. option (google.api.method_signature) = "request_id,parent,target,target_id,authorization_token";
  163. }
  164. // Applies a standard update to the target identified by the given proto's
  165. // name. For all types of fields (primitive, message, or repeated), replaces
  166. // them with the given proto fields if they are under the given field mask
  167. // paths. Fields that match the mask but aren't populated in the given
  168. // target are cleared. This is an implicitly idempotent API.
  169. //
  170. // Returns an empty Target proto with only the name and ID fields populated.
  171. //
  172. // An error will be reported in the following cases:
  173. // - If the target does not exist.
  174. // - If the target or parent invocation is finalized.
  175. // - If no field mask was given.
  176. rpc UpdateTarget(UpdateTargetRequest) returns (Target) {
  177. option (google.api.http) = {
  178. patch: "/v2/{target.name=invocations/*/targets/*}"
  179. body: "target"
  180. };
  181. option (google.api.method_signature) = "target,update_mask,authorization_token";
  182. }
  183. // Applies a merge update to the target identified by the given proto's
  184. // name. For primitive and message fields, replaces them with the ones in the
  185. // given proto if they are covered under the field mask paths. For repeated
  186. // fields, merges to them with the given ones if they are covered under the
  187. // field mask paths. This is not an implicitly idempotent API, so a request
  188. // id is required to make it idempotent.
  189. //
  190. // Returns an empty Target proto with only the name and ID fields populated.
  191. //
  192. //
  193. // An error will be reported in the following cases:
  194. // - If the target does not exist.
  195. // - If the target or parent invocation is finalized.
  196. // - If no field mask was given.
  197. rpc MergeTarget(MergeTargetRequest) returns (Target) {
  198. option (google.api.http) = {
  199. post: "/v2/{target.name=invocations/*/targets/*}:merge"
  200. body: "*"
  201. };
  202. }
  203. // Declares the target with the given name as finalized and immutable by the
  204. // user. It may still be mutated by post-processing. This is an implicitly
  205. // idempotent API.
  206. //
  207. // An error will be reported in the following cases:
  208. // - If the target does not exist.
  209. rpc FinalizeTarget(FinalizeTargetRequest) returns (FinalizeTargetResponse) {
  210. option (google.api.http) = {
  211. post: "/v2/{name=invocations/*/targets/*}:finalize"
  212. body: "*"
  213. };
  214. }
  215. // Creates the given configured target under the given parent target.
  216. // The given configured target ID is URL encoded, converted to the full
  217. // resource name, and assigned to the configured target's name field.
  218. // This is not an implicitly idempotent API, so a request id is required
  219. // to make it idempotent.
  220. //
  221. // Returns an empty ConfiguredTarget proto with only the name and ID fields
  222. // populated.
  223. //
  224. // An error will be reported in the following cases:
  225. // - If no config ID is provided.
  226. // - If a configured target with the same ID already exists.
  227. // - If the parent target does not exist.
  228. // - If the parent target or invocation is finalized.
  229. rpc CreateConfiguredTarget(CreateConfiguredTargetRequest) returns (ConfiguredTarget) {
  230. option (google.api.http) = {
  231. post: "/v2/{parent=invocations/*/targets/*}/configuredTargets"
  232. body: "configured_target"
  233. };
  234. option (google.api.method_signature) = "request_id,parent,configured_target,config_id,authorization_token";
  235. }
  236. // Applies a standard update to the configured target identified by the given
  237. // proto's name. For all types of fields (primitive, message, or repeated),
  238. // replaces them with the given proto fields if they are under the given
  239. // field mask paths. Fields that match the mask but aren't populated in the
  240. // given configured target are cleared. This is an implicitly idempotent API.
  241. //
  242. // Returns an empty ConfiguredTarget proto with only the name and ID fields
  243. // populated.
  244. //
  245. // An error will be reported in the following cases:
  246. // - If the configured target does not exist.
  247. // - If the parent target or invocation is finalized.
  248. // - If no field mask was given.
  249. rpc UpdateConfiguredTarget(UpdateConfiguredTargetRequest) returns (ConfiguredTarget) {
  250. option (google.api.http) = {
  251. patch: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}"
  252. body: "configured_target"
  253. };
  254. option (google.api.method_signature) = "configured_target,update_mask,authorization_token";
  255. }
  256. // Applies a merge update to the configured target identified by the given
  257. // proto's name. For primitive and message fields, replaces them with the
  258. // ones in the given proto if they are covered under the field mask paths.
  259. // For repeated fields, merges to them with the given ones if they are
  260. // covered under the field mask paths. This is not an implicitly idempotent
  261. // API, so a request id is required to make it idempotent.
  262. //
  263. // Returns an empty ConfiguredTarget proto with only the name and ID fields
  264. // populated.
  265. //
  266. //
  267. // An error will be reported in the following cases:
  268. // - If the configured target does not exist.
  269. // - If the parent target or invocation is finalized.
  270. // - If no field mask was given.
  271. rpc MergeConfiguredTarget(MergeConfiguredTargetRequest) returns (ConfiguredTarget) {
  272. option (google.api.http) = {
  273. post: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}:merge"
  274. body: "*"
  275. };
  276. }
  277. // Declares the configured target with the given name as finalized and
  278. // immutable by the user. It may still be mutated by post-processing. This is
  279. // an implicitly idempotent API.
  280. //
  281. // An error will be reported in the following cases:
  282. // - If the configured target does not exist.
  283. rpc FinalizeConfiguredTarget(FinalizeConfiguredTargetRequest) returns (FinalizeConfiguredTargetResponse) {
  284. option (google.api.http) = {
  285. post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finalize"
  286. body: "*"
  287. };
  288. }
  289. // Creates the given action under the given configured target. The given
  290. // action ID is URL encoded, converted to the full resource name, and
  291. // assigned to the action's name field. This is not an implicitly
  292. // idempotent API, so a request id is required to make it idempotent.
  293. //
  294. // Returns an empty Action proto with only the name and ID fields populated.
  295. //
  296. // An error will be reported in the following cases:
  297. // - If no action ID provided.
  298. // - If the parent configured target does not exist.
  299. // - If the parent target or invocation is finalized.
  300. // - If an action with the same name already exists.
  301. rpc CreateAction(CreateActionRequest) returns (Action) {
  302. option (google.api.http) = {
  303. post: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions"
  304. body: "action"
  305. };
  306. option (google.api.method_signature) = "request_id,parent,action,action_id,authorization_token";
  307. }
  308. // Applies a standard update to the action identified by the given
  309. // proto's name. For all types of fields (primitive, message, or repeated),
  310. // replaces them with the given proto fields if they are under the given
  311. // field mask paths. Fields that match the mask but aren't populated in the
  312. // given action are cleared. This is an implicitly idempotent API.
  313. //
  314. // Returns an empty Action proto with only the name and ID fields populated.
  315. //
  316. // An error will be reported in the following cases:
  317. // - If the action does not exist.
  318. // - If the parent target or invocation is finalized.
  319. // - If no field mask was given.
  320. rpc UpdateAction(UpdateActionRequest) returns (Action) {
  321. option (google.api.http) = {
  322. patch: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}"
  323. body: "action"
  324. };
  325. option (google.api.method_signature) = "action,update_mask,authorization_token";
  326. }
  327. // Applies a merge update to the action identified by the given
  328. // proto's name. For primitive and message fields, replaces them with the
  329. // ones in the given proto if they are covered under the field mask paths.
  330. // For repeated fields, merges to them with the given ones if they are
  331. // covered under the field mask paths. This is not an implicitly idempotent
  332. // API, so a request id is required to make it idempotent.
  333. //
  334. // Returns an empty Action proto with only the name and ID fields populated.
  335. //
  336. //
  337. // An error will be reported in the following cases:
  338. // - If the action does not exist.
  339. // - If the parent target or invocation is finalized.
  340. // - If no field mask was given.
  341. rpc MergeAction(MergeActionRequest) returns (Action) {
  342. option (google.api.http) = {
  343. post: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}:merge"
  344. body: "*"
  345. };
  346. }
  347. // Creates the given configuration under the given parent invocation. The
  348. // given configuration ID is URL encoded, converted to the full resource name,
  349. // and assigned to the configuration's name field. The configuration ID of
  350. // "default" should be preferred for the default configuration in a
  351. // single-config invocation. This is not an implicitly idempotent API, so a
  352. // request id is required to make it idempotent.
  353. //
  354. // Returns an empty Configuration proto with only the name and ID fields
  355. // populated.
  356. //
  357. // An error will be reported in the following cases:
  358. // - If no configuration ID is provided.
  359. // - If the parent invocation does not exist.
  360. // - If the parent invocation is finalized.
  361. // - If a configuration with the same name already exists.
  362. rpc CreateConfiguration(CreateConfigurationRequest) returns (Configuration) {
  363. option (google.api.http) = {
  364. post: "/v2/{parent=invocations/*}/configs"
  365. body: "configuration"
  366. };
  367. option (google.api.method_signature) = "request_id,parent,configuration,config_id,authorization_token";
  368. }
  369. // Applies a standard update to the configuration identified by the given
  370. // proto's name. For all types of fields (primitive, message, or repeated),
  371. // replaces them with the given proto fields if they are under the given field
  372. // mask paths. Fields that match the mask but aren't populated in the given
  373. // configuration are cleared. This is an implicitly idempotent API.
  374. //
  375. // Returns an empty Configuration proto with only the name and ID fields
  376. // populated.
  377. //
  378. // An error will be reported in the following cases:
  379. // - If the configuration does not exist.
  380. // - If the parent invocation is finalized.
  381. // - If no field mask was given.
  382. // - If a given field mask path is not valid.
  383. rpc UpdateConfiguration(UpdateConfigurationRequest) returns (Configuration) {
  384. option (google.api.http) = {
  385. patch: "/v2/{configuration.name=invocations/*/configs/*}"
  386. body: "configuration"
  387. };
  388. option (google.api.method_signature) = "configuration,update_mask,authorization_token";
  389. }
  390. // Creates the given file set under the given parent invocation. The given
  391. // file set ID is URL encoded, converted to the full resource name, and
  392. // assigned to the file set's name field. This is not an implicitly idempotent
  393. // API, so a request id is required to make it idempotent.
  394. //
  395. // Returns an empty FileSet proto with only the name and ID fields populated.
  396. //
  397. // An error will be reported in the following cases:
  398. // - If no file set ID is provided.
  399. // - If a file set with the same name already exists.
  400. // - If the parent invocation does not exist.
  401. // - If the parent invocation is finalized.
  402. rpc CreateFileSet(CreateFileSetRequest) returns (FileSet) {
  403. option (google.api.http) = {
  404. post: "/v2/{parent=invocations/*}/fileSets"
  405. body: "file_set"
  406. };
  407. option (google.api.method_signature) = "request_id,parent,file_set,file_set_id,authorization_token";
  408. }
  409. // Applies a standard update to the file set identified by the given proto's
  410. // name. For all types of fields (primitive, message, or repeated), replaces
  411. // them with the given proto fields if they are under the given field mask
  412. // paths. Fields that match the mask but aren't populated in the given
  413. // configuration are cleared. This is an implicitly idempotent API.
  414. //
  415. // Returns an empty FileSet proto with only the name and ID fields populated.
  416. //
  417. // An error will be reported in the following cases:
  418. // - If the file set does not exist.
  419. // - If the parent invocation is finalized.
  420. // - If no field mask was given.
  421. // - If a given field mask path is not valid.
  422. rpc UpdateFileSet(UpdateFileSetRequest) returns (FileSet) {
  423. option (google.api.http) = {
  424. patch: "/v2/{file_set.name=invocations/*/fileSets/*}"
  425. body: "file_set"
  426. };
  427. option (google.api.method_signature) = "file_set,update_mask,authorization_token";
  428. }
  429. // Applies a merge update to the file set identified by the given proto's
  430. // name. For primitive and message fields, updates them with the ones in the
  431. // given proto if they are covered under the field mask paths. For repeated
  432. // fields, merges to them with the given ones if they are covered under the
  433. // field mask paths. This is not an implicitly idempotent API, so a request
  434. // id is required to make it idempotent.
  435. //
  436. // Returns an empty FileSet proto with only the name and ID fields populated.
  437. //
  438. //
  439. // An error will be reported in the following cases:
  440. // - If the file set does not exist.
  441. // - If the parent invocation is finalized.
  442. // - If a given field mask path is not valid.
  443. // - If no field mask was given.
  444. rpc MergeFileSet(MergeFileSetRequest) returns (FileSet) {
  445. option (google.api.http) = {
  446. post: "/v2/{file_set.name=invocations/*/fileSets/*}:merge"
  447. body: "*"
  448. };
  449. }
  450. // This is the RPC used for batch upload. It supports uploading multiple
  451. // resources for an invocation in a transaction safe manner.
  452. //
  453. // To use this RPC, the CreateInvocationRequest must have been provided a
  454. // resume_token.
  455. //
  456. // Combining batch upload with normal upload on a single Invocation is not
  457. // supported. If an Invocation is created with a resume_token, all further
  458. // calls must be through UploadBatch. If an Invocation is created without
  459. // resume_token normal upload, all further upload calls must be through normal
  460. // upload RPCs.
  461. //
  462. // The recommend total size of UploadBatchRequest is 10 MiB. If
  463. // it is too large, it may be rejected.
  464. rpc UploadBatch(UploadBatchRequest) returns (UploadBatchResponse) {
  465. option (google.api.http) = {
  466. post: "/v2/{parent=invocations/*}/batch:upload"
  467. body: "*"
  468. };
  469. }
  470. // Provides a way to read the metadata for an invocation.
  471. // The UploadMetadata could still be retrieved by this RPC even the Invocation
  472. // has been finalized.
  473. // This API requires setting a response FieldMask via 'fields' URL query
  474. // parameter or X-Goog-FieldMask HTTP/gRPC header.
  475. //
  476. // An error will be reported in the following case:
  477. // - If the invocation does not exist.
  478. // - If no field mask was given.
  479. rpc GetInvocationUploadMetadata(GetInvocationUploadMetadataRequest) returns (UploadMetadata) {
  480. option (google.api.http) = {
  481. get: "/v2/{name=invocations/*/uploadMetadata}"
  482. };
  483. option (google.api.method_signature) = "name,authorization_token";
  484. }
  485. }
  486. // Request passed into CreateInvocation
  487. message CreateInvocationRequest {
  488. // A unique identifier for this request. Must be set to a different value for
  489. // each request that affects a given resource (eg. a random UUID). Required
  490. // for the operation to be idempotent. This is achieved by ignoring this
  491. // request if the last successful operation on the resource had the same
  492. // request ID. If set, invocation_id must also be provided.
  493. // Restricted to 36 Unicode characters.
  494. string request_id = 1;
  495. // The invocation ID. It is optional, but strongly recommended.
  496. //
  497. // If left empty then a new unique ID will be assigned by the server. If
  498. // populated, a RFC 4122-compliant v4 UUID is preferred, but v3 or v5 UUIDs
  499. // are allowed too.
  500. string invocation_id = 2;
  501. // Required. The invocation to create. Its name field will be ignored, since the name
  502. // will be derived from the id field above and assigned by the server.
  503. Invocation invocation = 3 [(google.api.field_behavior) = REQUIRED];
  504. // This is a token to authorize upload access to this invocation. It must be
  505. // set to a RFC 4122-compliant v3, v4, or v5 UUID. Once this is set in
  506. // CreateInvocation, all other upload RPCs for that Invocation and any of its
  507. // child resources must also include the exact same token, or they will be
  508. // rejected. The generated token should be unique to this invocation, and it
  509. // should be kept secret.
  510. //
  511. // The purpose of this field is to prevent other users and tools from
  512. // clobbering your upload intentionally or accidentally. The standard way of
  513. // using this token is to create a second v4 UUID when the invocation_id is
  514. // created, and storing them together during the upload. Essentially, this is
  515. // a "password" to the invocation.
  516. string authorization_token = 4;
  517. // By default, Invocations are auto-finalized if they are not modified for 24
  518. // hours. If you need auto-finalize to happen sooner, set this field to the
  519. // time you'd like auto-finalize to occur.
  520. google.protobuf.Timestamp auto_finalize_time = 6;
  521. // Client provided unique token for batch upload to ensure data integrity and
  522. // to provide a way to resume batch upload in case of a distributed failure on
  523. // the client side. The standard uploading client is presumed to have many
  524. // machines uploading to ResultStore, and that any given machine could process
  525. // any given Invocation at any time. This field is used to coordinate between
  526. // the client's machines, resolve concurrency issues, and enforce "exactly
  527. // once" semantics on each batch within the upload.
  528. //
  529. // The typical usage of the resume_token is that it should contain a "key"
  530. // indicating to the client where it is in the upload process, so that the
  531. // client can use it to resume the upload by reconstructing the state of
  532. // upload from the point where it was interrupted.
  533. //
  534. // If this matches the previously uploaded resume_token, then this request
  535. // will silently do nothing, making CreateInvocation idempotent.
  536. // If this token is provided, all further upload RPCs must be done through
  537. // UploadBatch. This token must not be combined with request_id.
  538. // Must be web safe Base64 encoded bytes.
  539. string initial_resume_token = 7;
  540. // Client-specific data used to resume batch upload if an error occurs and
  541. // retry is needed. This serves a role closely related to resume_token, as
  542. // both fields may be used to provide state required to restore a Batch
  543. // Upload, but they differ in two important aspects:
  544. // - it is not compared to previous values, and as such does not provide
  545. // concurrency control;
  546. // - it allows for a larger payload, since the contents are never
  547. // inspected/compared;
  548. // The size of the message must be within 1 MiB. Too large requests will be
  549. // rejected.
  550. bytes uploader_state = 8;
  551. }
  552. // Request passed into UpdateInvocation
  553. message UpdateInvocationRequest {
  554. // Contains the name and the fields of the invocation to be updated. The
  555. // name format must be: invocations/${INVOCATION_ID}
  556. Invocation invocation = 3;
  557. // Indicates which fields to update.
  558. google.protobuf.FieldMask update_mask = 4;
  559. // This is a token to authorize access to this invocation. It must be set to
  560. // the same value that was provided in the CreateInvocationRequest.
  561. string authorization_token = 5;
  562. }
  563. // Request passed into MergeInvocation
  564. message MergeInvocationRequest {
  565. // A unique identifier for this request. Must be set to a different value for
  566. // each request that affects a given resource (eg. a random UUID). Required
  567. // for the operation to be idempotent. This is achieved by ignoring this
  568. // request if the last successful operation on the resource had the same
  569. // request ID. Restricted to 36 Unicode characters.
  570. string request_id = 1;
  571. // Contains the name and the fields of the invocation to be merged. The
  572. // name format must be: invocations/${INVOCATION_ID}
  573. Invocation invocation = 3;
  574. // Indicates which fields to merge.
  575. google.protobuf.FieldMask update_mask = 4;
  576. // This is a token to authorize access to this invocation. It must be set to
  577. // the same value that was provided in the CreateInvocationRequest.
  578. string authorization_token = 5;
  579. }
  580. // Request passed into TouchInvocation
  581. message TouchInvocationRequest {
  582. // Required. The name of the invocation. Its format must be:
  583. // invocations/${INVOCATION_ID}
  584. string name = 1 [
  585. (google.api.field_behavior) = REQUIRED,
  586. (google.api.resource_reference) = {
  587. type: "resultstore.googleapis.com/Invocation"
  588. }
  589. ];
  590. // This is a token to authorize access to this invocation. It must be set to
  591. // the same value that was provided in the CreateInvocationRequest.
  592. string authorization_token = 2;
  593. }
  594. // Response returned from TouchInvocation
  595. message TouchInvocationResponse {
  596. // The name of the invocation. Its format will be:
  597. // invocations/${INVOCATION_ID}
  598. string name = 1;
  599. // The resource ID components that identify the Invocation.
  600. Invocation.Id id = 2;
  601. }
  602. // Request passed into DeleteInvocation
  603. message DeleteInvocationRequest {
  604. // Required. The name of the invocation. Its format must be:
  605. // invocations/${INVOCATION_ID}
  606. string name = 1 [
  607. (google.api.field_behavior) = REQUIRED,
  608. (google.api.resource_reference) = {
  609. type: "resultstore.googleapis.com/Invocation"
  610. }
  611. ];
  612. }
  613. // Request passed into FinalizeInvocation
  614. message FinalizeInvocationRequest {
  615. // Required. The name of the invocation. Its format must be:
  616. // invocations/${INVOCATION_ID}
  617. string name = 1 [
  618. (google.api.field_behavior) = REQUIRED,
  619. (google.api.resource_reference) = {
  620. type: "resultstore.googleapis.com/Invocation"
  621. }
  622. ];
  623. // This is a token to authorize access to this invocation. It must be set to
  624. // the same value that was provided in the CreateInvocationRequest.
  625. string authorization_token = 3;
  626. }
  627. // Response returned from FinalizeInvocation
  628. message FinalizeInvocationResponse {
  629. // The name of the invocation. Its format will be:
  630. // invocations/${INVOCATION_ID}
  631. string name = 1;
  632. // The resource ID components that identify the Invocation.
  633. Invocation.Id id = 2;
  634. }
  635. // Request passed into CreateTarget
  636. message CreateTargetRequest {
  637. // A unique identifier for this request. Must be set to a different value for
  638. // each request that affects a given resource (eg. a random UUID). Required
  639. // for the operation to be idempotent. This is achieved by ignoring this
  640. // request if the last successful operation on the resource had the same
  641. // request ID. Restricted to 36 Unicode characters.
  642. string request_id = 1;
  643. // Required. The name of the parent invocation in which the target is created.
  644. // Its format must be invocations/${INVOCATION_ID}
  645. string parent = 2 [
  646. (google.api.field_behavior) = REQUIRED,
  647. (google.api.resource_reference) = {
  648. type: "resultstore.googleapis.com/Invocation"
  649. }
  650. ];
  651. // The target identifier. It can be any string up to 1024 Unicode characters
  652. // long except for the reserved id '-'.
  653. string target_id = 3;
  654. // Required. The target to create. Its name field will be ignored, since the name will
  655. // be derived from the id field above and assigned by the server.
  656. Target target = 4 [(google.api.field_behavior) = REQUIRED];
  657. // This is a token to authorize access to this invocation. It must be set to
  658. // the same value that was provided in the CreateInvocationRequest.
  659. string authorization_token = 5;
  660. }
  661. // Request passed into UpdateTarget
  662. message UpdateTargetRequest {
  663. // Contains the name and the fields of the target to be updated. The name
  664. // format must be:
  665. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  666. Target target = 3;
  667. // Indicates which fields to update.
  668. google.protobuf.FieldMask update_mask = 4;
  669. // This is a token to authorize access to this invocation. It must be set to
  670. // the same value that was provided in the CreateInvocationRequest.
  671. string authorization_token = 5;
  672. // If true then the Update operation will become a Create operation if the
  673. // Target is NOT_FOUND.
  674. bool create_if_not_found = 6;
  675. }
  676. // Request passed into MergeTarget
  677. message MergeTargetRequest {
  678. // A unique identifier for this request. Must be set to a different value for
  679. // each request that affects a given resource (eg. a random UUID). Required
  680. // for the operation to be idempotent. This is achieved by ignoring this
  681. // request if the last successful operation on the resource had the same
  682. // request ID. Restricted to 36 Unicode characters.
  683. string request_id = 1;
  684. // Contains the name and the fields of the target to be merged. The name
  685. // format must be:
  686. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  687. Target target = 3;
  688. // Indicates which fields to merge.
  689. google.protobuf.FieldMask update_mask = 4;
  690. // This is a token to authorize access to this invocation. It must be set to
  691. // the same value that was provided in the CreateInvocationRequest.
  692. string authorization_token = 5;
  693. // If true then the Merge operation will become a Create operation if the
  694. // Target is NOT_FOUND.
  695. bool create_if_not_found = 6;
  696. }
  697. // Request passed into FinalizeTarget
  698. message FinalizeTargetRequest {
  699. // Required. The name of the target. Its format must be:
  700. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  701. string name = 1 [
  702. (google.api.field_behavior) = REQUIRED,
  703. (google.api.resource_reference) = {
  704. type: "resultstore.googleapis.com/Target"
  705. }
  706. ];
  707. // This is a token to authorize access to this invocation. It must be set to
  708. // the same value that was provided in the CreateInvocationRequest.
  709. string authorization_token = 3;
  710. }
  711. // Response returned from FinalizeTarget
  712. message FinalizeTargetResponse {
  713. // The name of the target. Its format will be:
  714. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  715. string name = 1;
  716. // The resource ID components that identify the Target.
  717. Target.Id id = 2;
  718. }
  719. // Request passed into CreateConfiguredTarget
  720. message CreateConfiguredTargetRequest {
  721. // A unique identifier for this request. Must be set to a different value for
  722. // each request that affects a given resource (eg. a random UUID). Required
  723. // for the operation to be idempotent. This is achieved by ignoring this
  724. // request if the last successful operation on the resource had the same
  725. // request ID. Restricted to 36 Unicode characters.
  726. string request_id = 1;
  727. // Required. The name of the parent target in which the configured target is created.
  728. // Its format must be:
  729. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  730. string parent = 2 [
  731. (google.api.field_behavior) = REQUIRED,
  732. (google.api.resource_reference) = {
  733. type: "resultstore.googleapis.com/Target"
  734. }
  735. ];
  736. // The configuration identifier. This must match the ID of an existing
  737. // Configuration under this Invocation. Cannot be the reserved id '-'.
  738. string config_id = 3;
  739. // Required. The configured target to create. Its name field will be ignored, since the
  740. // name will be derived from the id field above and assigned by the server.
  741. ConfiguredTarget configured_target = 4 [(google.api.field_behavior) = REQUIRED];
  742. // This is a token to authorize access to this invocation. It must be set to
  743. // the same value that was provided in the CreateInvocationRequest.
  744. string authorization_token = 5;
  745. }
  746. // Request passed into UpdateConfiguredTarget
  747. message UpdateConfiguredTargetRequest {
  748. // Contains the name and the fields of the configured target to be updated.
  749. // The name format must be:
  750. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
  751. ConfiguredTarget configured_target = 3;
  752. // Indicates which fields to update.
  753. google.protobuf.FieldMask update_mask = 4;
  754. // This is a token to authorize access to this invocation. It must be set to
  755. // the same value that was provided in the CreateInvocationRequest.
  756. string authorization_token = 5;
  757. // If true then the Update operation will become a Create operation if the
  758. // ConfiguredTarget is NOT_FOUND.
  759. bool create_if_not_found = 6;
  760. }
  761. // Request passed into MergeConfiguredTarget
  762. message MergeConfiguredTargetRequest {
  763. // A unique identifier for this request. Must be set to a different value for
  764. // each request that affects a given resource (eg. a random UUID). Required
  765. // for the operation to be idempotent. This is achieved by ignoring this
  766. // request if the last successful operation on the resource had the same
  767. // request ID. Restricted to 36 Unicode characters.
  768. string request_id = 1;
  769. // Contains the name and the fields of the configured target to be merged.
  770. // The name format must be:
  771. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
  772. ConfiguredTarget configured_target = 3;
  773. // Indicates which fields to merge.
  774. google.protobuf.FieldMask update_mask = 4;
  775. // This is a token to authorize access to this invocation. It must be set to
  776. // the same value that was provided in the CreateInvocationRequest.
  777. string authorization_token = 5;
  778. // If true then the Merge operation will become a Create operation if the
  779. // ConfiguredTarget is NOT_FOUND.
  780. bool create_if_not_found = 6;
  781. }
  782. // Request passed into FinalizeConfiguredTarget
  783. message FinalizeConfiguredTargetRequest {
  784. // Required. The name of the configured target. Its format must be:
  785. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
  786. string name = 1 [
  787. (google.api.field_behavior) = REQUIRED,
  788. (google.api.resource_reference) = {
  789. type: "resultstore.googleapis.com/ConfiguredTarget"
  790. }
  791. ];
  792. // This is a token to authorize access to this invocation. It must be set to
  793. // the same value that was provided in the CreateInvocationRequest.
  794. string authorization_token = 3;
  795. }
  796. // Response returned from FinalizeConfiguredTarget
  797. message FinalizeConfiguredTargetResponse {
  798. // The name of the configured target. Its format must be:
  799. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
  800. string name = 1;
  801. // The resource ID components that identify the ConfiguredTarget.
  802. ConfiguredTarget.Id id = 2;
  803. }
  804. // Request passed into CreateAction
  805. message CreateActionRequest {
  806. // A unique identifier for this request. Must be set to a different value for
  807. // each request that affects a given resource (eg. a random UUID). Required
  808. // for the operation to be idempotent. This is achieved by ignoring this
  809. // request if the last successful operation on the resource had the same
  810. // request ID. Restricted to 36 Unicode characters.
  811. string request_id = 1;
  812. // Required. The name of the parent configured target in which the action is created.
  813. // Its format must be:
  814. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
  815. string parent = 2 [
  816. (google.api.field_behavior) = REQUIRED,
  817. (google.api.resource_reference) = {
  818. type: "resultstore.googleapis.com/ConfiguredTarget"
  819. }
  820. ];
  821. // The action identifier. It can be any string up to 512 Unicode characters
  822. // long, except for the reserved id '-'.
  823. //
  824. // Recommended IDs for Test Actions:
  825. // "test": For a single test action.
  826. // "test_shard0_run0_attempt0" ... "test_shard9_run9_attempt9": For tests with
  827. // shard/run/attempts.
  828. //
  829. // Recommended IDs for Build Actions:
  830. // "build": If you only have a single build action.
  831. string action_id = 3;
  832. // Required. The action to create. Its name field will be ignored, since the
  833. // name will be derived from the id field above and assigned by the server.
  834. Action action = 4 [(google.api.field_behavior) = REQUIRED];
  835. // This is a token to authorize access to this invocation. It must be set to
  836. // the same value that was provided in the CreateInvocationRequest.
  837. string authorization_token = 5;
  838. }
  839. // Request passed into UpdateAction
  840. message UpdateActionRequest {
  841. // Contains the name and the fields of the action to be updated. The
  842. // name format must be:
  843. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
  844. Action action = 3;
  845. // Indicates which fields to update.
  846. google.protobuf.FieldMask update_mask = 4;
  847. // This is a token to authorize access to this invocation. It must be set to
  848. // the same value that was provided in the CreateInvocationRequest.
  849. string authorization_token = 5;
  850. // If true then the Update operation will become a Create operation if the
  851. // Action is NOT_FOUND.
  852. bool create_if_not_found = 6;
  853. }
  854. // Request passed into MergeAction
  855. message MergeActionRequest {
  856. // A unique identifier for this request. Must be set to a different value for
  857. // each request that affects a given resource (eg. a random UUID). Required
  858. // for the operation to be idempotent. This is achieved by ignoring this
  859. // request if the last successful operation on the resource had the same
  860. // request ID. Restricted to 36 Unicode characters.
  861. string request_id = 1;
  862. // Contains the name and the fields of the action to be merged. The
  863. // name format must be:
  864. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
  865. Action action = 3;
  866. // Indicates which fields to merge.
  867. google.protobuf.FieldMask update_mask = 4;
  868. // This is a token to authorize access to this invocation. It must be set to
  869. // the same value that was provided in the CreateInvocationRequest.
  870. string authorization_token = 5;
  871. // If true then the Merge operation will become a Create operation if the
  872. // Action is NOT_FOUND.
  873. bool create_if_not_found = 6;
  874. }
  875. // Request passed into CreateConfiguration
  876. message CreateConfigurationRequest {
  877. // A unique identifier for this request. Must be set to a different value for
  878. // each request that affects a given resource (eg. a random UUID). Required
  879. // for the operation to be idempotent. This is achieved by ignoring this
  880. // request if the last successful operation on the resource had the same
  881. // request ID. Restricted to 36 Unicode characters.
  882. string request_id = 1;
  883. // Required. The name of the parent invocation in which the configuration is created.
  884. // Its format must be invocations/${INVOCATION_ID}
  885. string parent = 2 [
  886. (google.api.field_behavior) = REQUIRED,
  887. (google.api.resource_reference) = {
  888. type: "resultstore.googleapis.com/Invocation"
  889. }
  890. ];
  891. // The configuration identifier. It can be any string up to 256 Unicode
  892. // characters long. The configuration ID of "default" should be preferred for
  893. // the default configuration in a single-config invocation. Cannot be the
  894. // reserved id '-'.
  895. string config_id = 3;
  896. // Required. The configuration to create. Its name field will be ignored, since the name
  897. // will be derived from the id field above and assigned by the server.
  898. Configuration configuration = 4 [(google.api.field_behavior) = REQUIRED];
  899. // This is a token to authorize access to this invocation. It must be set to
  900. // the same value that was provided in the CreateInvocationRequest.
  901. string authorization_token = 5;
  902. }
  903. // Request passed into UpdateConfiguration
  904. message UpdateConfigurationRequest {
  905. // Contains the name and fields of the configuration to be updated. The name
  906. // format must be:
  907. // invocations/${INVOCATION_ID}/configs/${CONFIG_ID}
  908. Configuration configuration = 3;
  909. // Indicates which fields to update.
  910. google.protobuf.FieldMask update_mask = 4;
  911. // This is a token to authorize access to this invocation. It must be set to
  912. // the same value that was provided in the CreateInvocationRequest.
  913. string authorization_token = 5;
  914. // If true then the Update operation will become a Create operation if the
  915. // Configuration is NOT_FOUND.
  916. bool create_if_not_found = 6;
  917. }
  918. // Request passed into CreateFileSet
  919. message CreateFileSetRequest {
  920. // A unique identifier for this request. Must be set to a different value for
  921. // each request that affects a given resource (eg. a random UUID). Required
  922. // for the operation to be idempotent. This is achieved by ignoring this
  923. // request if the last successful operation on the resource had the same
  924. // request ID. Restricted to 36 Unicode characters.
  925. string request_id = 1;
  926. // Required. The name of the parent invocation in which the file set is created.
  927. // Its format must be invocations/${INVOCATION_ID}
  928. string parent = 2 [
  929. (google.api.field_behavior) = REQUIRED,
  930. (google.api.resource_reference) = {
  931. type: "resultstore.googleapis.com/Invocation"
  932. }
  933. ];
  934. // The file set identifier. It can be any string up to 256 Unicode characters
  935. // long.
  936. string file_set_id = 3;
  937. // Required. The file set to create. Its name field will be ignored, since the name will
  938. // be derived from the id field above and assigned by the server.
  939. FileSet file_set = 4 [(google.api.field_behavior) = REQUIRED];
  940. // This is a token to authorize access to this invocation. It must be set to
  941. // the same value that was provided in the CreateInvocationRequest.
  942. string authorization_token = 5;
  943. }
  944. // Request passed into UpdateFileSet
  945. message UpdateFileSetRequest {
  946. // Contains the name and fields of the file set to be updated. The name format
  947. // must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
  948. FileSet file_set = 1;
  949. // Indicates which fields to update.
  950. google.protobuf.FieldMask update_mask = 2;
  951. // This is a token to authorize access to this invocation. It must be set to
  952. // the same value that was provided in the CreateInvocationRequest.
  953. string authorization_token = 3;
  954. // If true then the Update operation will become a Create operation if the
  955. // FileSet is NOT_FOUND.
  956. bool create_if_not_found = 4;
  957. }
  958. // Request passed into MergeFileSet
  959. message MergeFileSetRequest {
  960. // A unique identifier for this request. Must be set to a different value for
  961. // each request that affects a given resource (eg. a random UUID). Required
  962. // for the operation to be idempotent. This is achieved by ignoring this
  963. // request if the last successful operation on the resource had the same
  964. // request ID. Restricted to 36 Unicode characters.
  965. string request_id = 1;
  966. // Contains the name and fields of the file set to be merged. The name
  967. // format must be:
  968. // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
  969. FileSet file_set = 2;
  970. // Indicates which fields to merge.
  971. google.protobuf.FieldMask update_mask = 3;
  972. // This is a token to authorize access to this invocation. It must be set to
  973. // the same value that was provided in the CreateInvocationRequest.
  974. string authorization_token = 4;
  975. // If true then the Merge operation will become a Create operation if the
  976. // FileSet is NOT_FOUND.
  977. bool create_if_not_found = 5;
  978. }
  979. // Request passed into UploadBatch
  980. message UploadBatchRequest {
  981. // Required. The name of the invocation being modified.
  982. // The name format must be: invocations/${INVOCATION_ID}
  983. string parent = 1 [(google.api.field_behavior) = REQUIRED];
  984. // Required. A UUID that must match the value provided in CreateInvocationRequest.
  985. string authorization_token = 2 [(google.api.field_behavior) = REQUIRED];
  986. // Required. The token of this batch, that will be committed in this UploadBatchRequest.
  987. // If this matches the previously uploaded resume_token, then this request
  988. // will silently do nothing.
  989. // See CreateInvocationRequest.initial_resume_token for more information.
  990. // Must be web safe Base64 encoded bytes.
  991. string next_resume_token = 3 [(google.api.field_behavior) = REQUIRED];
  992. // Required. The token of the previous batch that was committed in a UploadBatchRequest.
  993. // This will be checked after next_resume_token match is checked. If this does
  994. // not match the previously uploaded resume_token, a 409 Conflict (HTTPS) or
  995. // ABORTED (gRPC ) error code indicating a concurrency
  996. // failure will be returned, and that the user should call
  997. // GetInvocationUploadMetadata to fetch the current resume_token to
  998. // reconstruct the state of the upload to resume it.
  999. // See CreateInvocationRequest.initial_resume_token for more information.
  1000. // Must be web safe Base64 encoded bytes.
  1001. string resume_token = 4 [(google.api.field_behavior) = REQUIRED];
  1002. // Client-specific data used to resume batch upload if an error occurs and
  1003. // retry is needed. This serves a role closely related to resume_token, as
  1004. // both fields may be used to provide state required to restore a Batch
  1005. // Upload, but they differ in two important aspects:
  1006. // - it is not compared to previous values, and as such does not provide
  1007. // concurrency control;
  1008. // - it allows for a larger payload, since the contents are never
  1009. // inspected/compared;
  1010. // The size of the message must be within 1 MiB. Too large requests will be
  1011. // rejected.
  1012. bytes uploader_state = 6;
  1013. // The individual upload requests for this batch.
  1014. // This field may be empty, allowing this RPC to be used like TouchInvocation.
  1015. repeated UploadRequest upload_requests = 5;
  1016. }
  1017. // Response for UploadBatch
  1018. message UploadBatchResponse {
  1019. }
  1020. // The individual upload requests for this batch.
  1021. message UploadRequest {
  1022. // The resource ID components that identify the resource being uploaded.
  1023. message Id {
  1024. // Required for Target, ConfiguredTarget, or Action.
  1025. // The Target ID.
  1026. string target_id = 1;
  1027. // Required for Configuration, ConfiguredTarget, or Action.
  1028. // The Configuration ID.
  1029. string configuration_id = 2;
  1030. // Required for Action.
  1031. // The Action ID.
  1032. string action_id = 3;
  1033. // Required for FileSet.
  1034. // The FileSet ID.
  1035. string file_set_id = 4;
  1036. }
  1037. // The operation for the request (e.g. Create(), Update(), etc.)
  1038. enum UploadOperation {
  1039. // Unspecified
  1040. UPLOAD_OPERATION_UNSPECIFIED = 0;
  1041. // Create the given resources except Invocation.
  1042. // For more information, check the Create APIs.
  1043. CREATE = 1;
  1044. // Applies a standard update to the resource identified by the given
  1045. // proto's name. For more information, see the Update APIs.
  1046. // UploadBatch does not support arbitrary field masks. The list of allowed
  1047. // field masks can be found below.
  1048. UPDATE = 2;
  1049. // Applies an merge update to the resource identified by the given
  1050. // proto's name. For more information, see the Merge APIs.
  1051. // UploadBatch does not support arbitrary field masks. The list of allowed
  1052. // field masks can be found below.
  1053. MERGE = 3;
  1054. // Declares the resource with the given name as finalized and immutable by
  1055. // the uploader. Only supported for Invocation, Target, ConfiguredTarget.
  1056. // There must be no operation on child resources after parent resource is
  1057. // Finalized. If there is a Finalize of Invocation, it must be the final
  1058. // UploadRequest. For more information, see the Finalize APIs.
  1059. // An empty resource should be provided below.
  1060. FINALIZE = 4;
  1061. }
  1062. // The resource ID components that identify the resource being uploaded.
  1063. Id id = 1;
  1064. // The operation for the request (e.g. Create(), Update(), etc.)
  1065. UploadOperation upload_operation = 2;
  1066. // Required for Update and Merge operations.
  1067. // Ignored for Create and Finalize operations.
  1068. // Masks the fields of the resource being uploaded. Provides support for a
  1069. // more granular upload. FieldMasks are limited to certain fields and must
  1070. // match one of the follow patterns, where * means any single field name.
  1071. //
  1072. // For Update Operations:
  1073. //
  1074. // Invocation: [*, status_attributes.*, timing.*, invocation_attributes.*,
  1075. // workspace_info.*].
  1076. // Target: [*, status_attributes.*, timing.*].
  1077. // Configuration: [*, status_attributes.*].
  1078. // ConfiguredTarget: [*, status_attributes.*].
  1079. // Action: [*, status_attributes.*, timing.*, test_action.test_suite,
  1080. // test_action.infrastructure_failure_info].
  1081. // FileSet: [*].
  1082. //
  1083. // For Merge Operations:
  1084. //
  1085. // Invocation: [invocation_attributes.labels, workspace_info.command_lines,
  1086. // properties, files, file_processing_errors].
  1087. // Target: [files].
  1088. // ConfiguredTarget: [files].
  1089. // Action: [files, file_processing_errors].
  1090. google.protobuf.FieldMask update_mask = 3;
  1091. // If true then the Update, Merge operation will become a Create operation if
  1092. // the resource is NOT_FOUND. Not supported for Invocation resource.
  1093. bool create_if_not_found = 10;
  1094. // The proto of the resource being uploaded.
  1095. oneof resource {
  1096. // The Invocation Resource
  1097. Invocation invocation = 4;
  1098. // The Target Resource
  1099. Target target = 5;
  1100. // The Configuration Resource
  1101. Configuration configuration = 6;
  1102. // The ConfiguredTarget Resource
  1103. ConfiguredTarget configured_target = 7;
  1104. // The Action Resource
  1105. Action action = 8;
  1106. // The FileSet Resource
  1107. FileSet file_set = 9;
  1108. }
  1109. }
  1110. // Request passed into GetInvocationUploadMetadata
  1111. message GetInvocationUploadMetadataRequest {
  1112. // Required. The name of the UploadMetadata being requested.
  1113. // The name format must be: invocations/${INVOCATION_ID}/uploadMetadata
  1114. string name = 1 [
  1115. (google.api.field_behavior) = REQUIRED,
  1116. (google.api.resource_reference) = {
  1117. type: "resultstore.googleapis.com/UploadMetadata"
  1118. }
  1119. ];
  1120. // Required. A UUID that must match the value provided in CreateInvocationRequest.
  1121. string authorization_token = 2 [(google.api.field_behavior) = REQUIRED];
  1122. }