registry_service.proto 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.apigeeregistry.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/httpbody.proto";
  20. import "google/api/resource.proto";
  21. import "google/cloud/apigeeregistry/v1/registry_models.proto";
  22. import "google/protobuf/empty.proto";
  23. import "google/protobuf/field_mask.proto";
  24. option csharp_namespace = "Google.Cloud.ApigeeRegistry.V1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1;apigeeregistry";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "RegistryServiceProto";
  28. option java_package = "com.google.cloud.apigeeregistry.v1";
  29. option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1";
  30. option ruby_package = "Google::Cloud::ApigeeRegistry::V1";
  31. // The Registry service allows teams to manage descriptions of APIs.
  32. service Registry {
  33. option (google.api.default_host) = "apigeeregistry.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  35. // Returns matching APIs.
  36. rpc ListApis(ListApisRequest) returns (ListApisResponse) {
  37. option (google.api.http) = {
  38. get: "/v1/{parent=projects/*/locations/*}/apis"
  39. };
  40. option (google.api.method_signature) = "parent";
  41. }
  42. // Returns a specified API.
  43. rpc GetApi(GetApiRequest) returns (Api) {
  44. option (google.api.http) = {
  45. get: "/v1/{name=projects/*/locations/*/apis/*}"
  46. };
  47. option (google.api.method_signature) = "name";
  48. }
  49. // Creates a specified API.
  50. rpc CreateApi(CreateApiRequest) returns (Api) {
  51. option (google.api.http) = {
  52. post: "/v1/{parent=projects/*/locations/*}/apis"
  53. body: "api"
  54. };
  55. option (google.api.method_signature) = "parent,api,api_id";
  56. }
  57. // Used to modify a specified API.
  58. rpc UpdateApi(UpdateApiRequest) returns (Api) {
  59. option (google.api.http) = {
  60. patch: "/v1/{api.name=projects/*/locations/*/apis/*}"
  61. body: "api"
  62. };
  63. option (google.api.method_signature) = "api,update_mask";
  64. }
  65. // Removes a specified API and all of the resources that it
  66. // owns.
  67. rpc DeleteApi(DeleteApiRequest) returns (google.protobuf.Empty) {
  68. option (google.api.http) = {
  69. delete: "/v1/{name=projects/*/locations/*/apis/*}"
  70. };
  71. option (google.api.method_signature) = "name";
  72. }
  73. // Returns matching versions.
  74. rpc ListApiVersions(ListApiVersionsRequest) returns (ListApiVersionsResponse) {
  75. option (google.api.http) = {
  76. get: "/v1/{parent=projects/*/locations/*/apis/*}/versions"
  77. };
  78. option (google.api.method_signature) = "parent";
  79. }
  80. // Returns a specified version.
  81. rpc GetApiVersion(GetApiVersionRequest) returns (ApiVersion) {
  82. option (google.api.http) = {
  83. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*}"
  84. };
  85. option (google.api.method_signature) = "name";
  86. }
  87. // Creates a specified version.
  88. rpc CreateApiVersion(CreateApiVersionRequest) returns (ApiVersion) {
  89. option (google.api.http) = {
  90. post: "/v1/{parent=projects/*/locations/*/apis/*}/versions"
  91. body: "api_version"
  92. };
  93. option (google.api.method_signature) = "parent,api_version,api_version_id";
  94. }
  95. // Used to modify a specified version.
  96. rpc UpdateApiVersion(UpdateApiVersionRequest) returns (ApiVersion) {
  97. option (google.api.http) = {
  98. patch: "/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}"
  99. body: "api_version"
  100. };
  101. option (google.api.method_signature) = "api_version,update_mask";
  102. }
  103. // Removes a specified version and all of the resources that
  104. // it owns.
  105. rpc DeleteApiVersion(DeleteApiVersionRequest) returns (google.protobuf.Empty) {
  106. option (google.api.http) = {
  107. delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*}"
  108. };
  109. option (google.api.method_signature) = "name";
  110. }
  111. // Returns matching specs.
  112. rpc ListApiSpecs(ListApiSpecsRequest) returns (ListApiSpecsResponse) {
  113. option (google.api.http) = {
  114. get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs"
  115. };
  116. option (google.api.method_signature) = "parent";
  117. }
  118. // Returns a specified spec.
  119. rpc GetApiSpec(GetApiSpecRequest) returns (ApiSpec) {
  120. option (google.api.http) = {
  121. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}"
  122. };
  123. option (google.api.method_signature) = "name";
  124. }
  125. // Returns the contents of a specified spec.
  126. // If specs are stored with GZip compression, the default behavior
  127. // is to return the spec uncompressed (the mime_type response field
  128. // indicates the exact format returned).
  129. rpc GetApiSpecContents(GetApiSpecContentsRequest) returns (google.api.HttpBody) {
  130. option (google.api.http) = {
  131. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents"
  132. };
  133. option (google.api.method_signature) = "name";
  134. }
  135. // Creates a specified spec.
  136. rpc CreateApiSpec(CreateApiSpecRequest) returns (ApiSpec) {
  137. option (google.api.http) = {
  138. post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs"
  139. body: "api_spec"
  140. };
  141. option (google.api.method_signature) = "parent,api_spec,api_spec_id";
  142. }
  143. // Used to modify a specified spec.
  144. rpc UpdateApiSpec(UpdateApiSpecRequest) returns (ApiSpec) {
  145. option (google.api.http) = {
  146. patch: "/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}"
  147. body: "api_spec"
  148. };
  149. option (google.api.method_signature) = "api_spec,update_mask";
  150. }
  151. // Removes a specified spec, all revisions, and all child
  152. // resources (e.g., artifacts).
  153. rpc DeleteApiSpec(DeleteApiSpecRequest) returns (google.protobuf.Empty) {
  154. option (google.api.http) = {
  155. delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}"
  156. };
  157. option (google.api.method_signature) = "name";
  158. }
  159. // Adds a tag to a specified revision of a spec.
  160. rpc TagApiSpecRevision(TagApiSpecRevisionRequest) returns (ApiSpec) {
  161. option (google.api.http) = {
  162. post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision"
  163. body: "*"
  164. };
  165. }
  166. // Lists all revisions of a spec.
  167. // Revisions are returned in descending order of revision creation time.
  168. rpc ListApiSpecRevisions(ListApiSpecRevisionsRequest) returns (ListApiSpecRevisionsResponse) {
  169. option (google.api.http) = {
  170. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions"
  171. };
  172. }
  173. // Sets the current revision to a specified prior revision.
  174. // Note that this creates a new revision with a new revision ID.
  175. rpc RollbackApiSpec(RollbackApiSpecRequest) returns (ApiSpec) {
  176. option (google.api.http) = {
  177. post: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback"
  178. body: "*"
  179. };
  180. }
  181. // Deletes a revision of a spec.
  182. rpc DeleteApiSpecRevision(DeleteApiSpecRevisionRequest) returns (ApiSpec) {
  183. option (google.api.http) = {
  184. delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision"
  185. };
  186. option (google.api.method_signature) = "name";
  187. }
  188. // Returns matching deployments.
  189. rpc ListApiDeployments(ListApiDeploymentsRequest) returns (ListApiDeploymentsResponse) {
  190. option (google.api.http) = {
  191. get: "/v1/{parent=projects/*/locations/*/apis/*}/deployments"
  192. };
  193. option (google.api.method_signature) = "parent";
  194. }
  195. // Returns a specified deployment.
  196. rpc GetApiDeployment(GetApiDeploymentRequest) returns (ApiDeployment) {
  197. option (google.api.http) = {
  198. get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}"
  199. };
  200. option (google.api.method_signature) = "name";
  201. }
  202. // Creates a specified deployment.
  203. rpc CreateApiDeployment(CreateApiDeploymentRequest) returns (ApiDeployment) {
  204. option (google.api.http) = {
  205. post: "/v1/{parent=projects/*/locations/*/apis/*}/deployments"
  206. body: "api_deployment"
  207. };
  208. option (google.api.method_signature) = "parent,api_deployment,api_deployment_id";
  209. }
  210. // Used to modify a specified deployment.
  211. rpc UpdateApiDeployment(UpdateApiDeploymentRequest) returns (ApiDeployment) {
  212. option (google.api.http) = {
  213. patch: "/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}"
  214. body: "api_deployment"
  215. };
  216. option (google.api.method_signature) = "api_deployment,update_mask";
  217. }
  218. // Removes a specified deployment, all revisions, and all
  219. // child resources (e.g., artifacts).
  220. rpc DeleteApiDeployment(DeleteApiDeploymentRequest) returns (google.protobuf.Empty) {
  221. option (google.api.http) = {
  222. delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}"
  223. };
  224. option (google.api.method_signature) = "name";
  225. }
  226. // Adds a tag to a specified revision of a
  227. // deployment.
  228. rpc TagApiDeploymentRevision(TagApiDeploymentRevisionRequest) returns (ApiDeployment) {
  229. option (google.api.http) = {
  230. post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision"
  231. body: "*"
  232. };
  233. }
  234. // Lists all revisions of a deployment.
  235. // Revisions are returned in descending order of revision creation time.
  236. rpc ListApiDeploymentRevisions(ListApiDeploymentRevisionsRequest) returns (ListApiDeploymentRevisionsResponse) {
  237. option (google.api.http) = {
  238. get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions"
  239. };
  240. }
  241. // Sets the current revision to a specified prior
  242. // revision. Note that this creates a new revision with a new revision ID.
  243. rpc RollbackApiDeployment(RollbackApiDeploymentRequest) returns (ApiDeployment) {
  244. option (google.api.http) = {
  245. post: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback"
  246. body: "*"
  247. };
  248. }
  249. // Deletes a revision of a deployment.
  250. rpc DeleteApiDeploymentRevision(DeleteApiDeploymentRevisionRequest) returns (ApiDeployment) {
  251. option (google.api.http) = {
  252. delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision"
  253. };
  254. option (google.api.method_signature) = "name";
  255. }
  256. // Returns matching artifacts.
  257. rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) {
  258. option (google.api.http) = {
  259. get: "/v1/{parent=projects/*/locations/*}/artifacts"
  260. additional_bindings {
  261. get: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts"
  262. }
  263. additional_bindings {
  264. get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts"
  265. }
  266. additional_bindings {
  267. get: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts"
  268. }
  269. additional_bindings {
  270. get: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts"
  271. }
  272. };
  273. option (google.api.method_signature) = "parent";
  274. }
  275. // Returns a specified artifact.
  276. rpc GetArtifact(GetArtifactRequest) returns (Artifact) {
  277. option (google.api.http) = {
  278. get: "/v1/{name=projects/*/locations/*/artifacts/*}"
  279. additional_bindings {
  280. get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}"
  281. }
  282. additional_bindings {
  283. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}"
  284. }
  285. additional_bindings {
  286. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}"
  287. }
  288. additional_bindings {
  289. get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}"
  290. }
  291. };
  292. option (google.api.method_signature) = "name";
  293. }
  294. // Returns the contents of a specified artifact.
  295. // If artifacts are stored with GZip compression, the default behavior
  296. // is to return the artifact uncompressed (the mime_type response field
  297. // indicates the exact format returned).
  298. rpc GetArtifactContents(GetArtifactContentsRequest) returns (google.api.HttpBody) {
  299. option (google.api.http) = {
  300. get: "/v1/{name=projects/*/locations/*/artifacts/*}:getContents"
  301. additional_bindings {
  302. get: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContents"
  303. }
  304. additional_bindings {
  305. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContents"
  306. }
  307. additional_bindings {
  308. get: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContents"
  309. }
  310. additional_bindings {
  311. get: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents"
  312. }
  313. };
  314. option (google.api.method_signature) = "name";
  315. }
  316. // Creates a specified artifact.
  317. rpc CreateArtifact(CreateArtifactRequest) returns (Artifact) {
  318. option (google.api.http) = {
  319. post: "/v1/{parent=projects/*/locations/*}/artifacts"
  320. body: "artifact"
  321. additional_bindings {
  322. post: "/v1/{parent=projects/*/locations/*/apis/*}/artifacts"
  323. body: "artifact"
  324. }
  325. additional_bindings {
  326. post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts"
  327. body: "artifact"
  328. }
  329. additional_bindings {
  330. post: "/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts"
  331. body: "artifact"
  332. }
  333. additional_bindings {
  334. post: "/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts"
  335. body: "artifact"
  336. }
  337. };
  338. option (google.api.method_signature) = "parent,artifact,artifact_id";
  339. }
  340. // Used to replace a specified artifact.
  341. rpc ReplaceArtifact(ReplaceArtifactRequest) returns (Artifact) {
  342. option (google.api.http) = {
  343. put: "/v1/{artifact.name=projects/*/locations/*/artifacts/*}"
  344. body: "artifact"
  345. additional_bindings {
  346. put: "/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}"
  347. body: "artifact"
  348. }
  349. additional_bindings {
  350. put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}"
  351. body: "artifact"
  352. }
  353. additional_bindings {
  354. put: "/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}"
  355. body: "artifact"
  356. }
  357. additional_bindings {
  358. put: "/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}"
  359. body: "artifact"
  360. }
  361. };
  362. option (google.api.method_signature) = "artifact";
  363. }
  364. // Removes a specified artifact.
  365. rpc DeleteArtifact(DeleteArtifactRequest) returns (google.protobuf.Empty) {
  366. option (google.api.http) = {
  367. delete: "/v1/{name=projects/*/locations/*/artifacts/*}"
  368. additional_bindings {
  369. delete: "/v1/{name=projects/*/locations/*/apis/*/artifacts/*}"
  370. }
  371. additional_bindings {
  372. delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}"
  373. }
  374. additional_bindings {
  375. delete: "/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}"
  376. }
  377. additional_bindings {
  378. delete: "/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}"
  379. }
  380. };
  381. option (google.api.method_signature) = "name";
  382. }
  383. }
  384. // Request message for ListApis.
  385. message ListApisRequest {
  386. // Required. The parent, which owns this collection of APIs.
  387. // Format: `projects/*/locations/*`
  388. string parent = 1 [
  389. (google.api.field_behavior) = REQUIRED,
  390. (google.api.resource_reference) = {
  391. child_type: "apigeeregistry.googleapis.com/Api"
  392. }
  393. ];
  394. // The maximum number of APIs to return.
  395. // The service may return fewer than this value.
  396. // If unspecified, at most 50 values will be returned.
  397. // The maximum is 1000; values above 1000 will be coerced to 1000.
  398. int32 page_size = 2;
  399. // A page token, received from a previous `ListApis` call.
  400. // Provide this to retrieve the subsequent page.
  401. //
  402. // When paginating, all other parameters provided to `ListApis` must match
  403. // the call that provided the page token.
  404. string page_token = 3;
  405. // An expression that can be used to filter the list. Filters use the Common
  406. // Expression Language and can refer to all message fields.
  407. string filter = 4;
  408. }
  409. // Response message for ListApis.
  410. message ListApisResponse {
  411. // The APIs from the specified publisher.
  412. repeated Api apis = 1;
  413. // A token, which can be sent as `page_token` to retrieve the next page.
  414. // If this field is omitted, there are no subsequent pages.
  415. string next_page_token = 2;
  416. }
  417. // Request message for GetApi.
  418. message GetApiRequest {
  419. // Required. The name of the API to retrieve.
  420. // Format: `projects/*/locations/*/apis/*`
  421. string name = 1 [
  422. (google.api.field_behavior) = REQUIRED,
  423. (google.api.resource_reference) = {
  424. type: "apigeeregistry.googleapis.com/Api"
  425. }
  426. ];
  427. }
  428. // Request message for CreateApi.
  429. message CreateApiRequest {
  430. // Required. The parent, which owns this collection of APIs.
  431. // Format: `projects/*/locations/*`
  432. string parent = 1 [
  433. (google.api.field_behavior) = REQUIRED,
  434. (google.api.resource_reference) = {
  435. child_type: "apigeeregistry.googleapis.com/Api"
  436. }
  437. ];
  438. // Required. The API to create.
  439. Api api = 2 [(google.api.field_behavior) = REQUIRED];
  440. // Required. The ID to use for the API, which will become the final component of
  441. // the API's resource name.
  442. //
  443. // This value should be 4-63 characters, and valid characters
  444. // are /[a-z][0-9]-/.
  445. //
  446. // Following AIP-162, IDs must not have the form of a UUID.
  447. string api_id = 3 [(google.api.field_behavior) = REQUIRED];
  448. }
  449. // Request message for UpdateApi.
  450. message UpdateApiRequest {
  451. // Required. The API to update.
  452. //
  453. // The `name` field is used to identify the API to update.
  454. // Format: `projects/*/locations/*/apis/*`
  455. Api api = 1 [(google.api.field_behavior) = REQUIRED];
  456. // The list of fields to be updated. If omitted, all fields are updated that
  457. // are set in the request message (fields set to default values are ignored).
  458. // If an asterisk "*" is specified, all fields are updated, including fields
  459. // that are unspecified/default in the request.
  460. google.protobuf.FieldMask update_mask = 2;
  461. // If set to true, and the API is not found, a new API will be created.
  462. // In this situation, `update_mask` is ignored.
  463. bool allow_missing = 3;
  464. }
  465. // Request message for DeleteApi.
  466. message DeleteApiRequest {
  467. // Required. The name of the API to delete.
  468. // Format: `projects/*/locations/*/apis/*`
  469. string name = 1 [
  470. (google.api.field_behavior) = REQUIRED,
  471. (google.api.resource_reference) = {
  472. type: "apigeeregistry.googleapis.com/Api"
  473. }
  474. ];
  475. // If set to true, any child resources will also be deleted.
  476. // (Otherwise, the request will only work if there are no child resources.)
  477. bool force = 2;
  478. }
  479. // Request message for ListApiVersions.
  480. message ListApiVersionsRequest {
  481. // Required. The parent, which owns this collection of versions.
  482. // Format: `projects/*/locations/*/apis/*`
  483. string parent = 1 [
  484. (google.api.field_behavior) = REQUIRED,
  485. (google.api.resource_reference) = {
  486. child_type: "apigeeregistry.googleapis.com/ApiVersion"
  487. }
  488. ];
  489. // The maximum number of versions to return.
  490. // The service may return fewer than this value.
  491. // If unspecified, at most 50 values will be returned.
  492. // The maximum is 1000; values above 1000 will be coerced to 1000.
  493. int32 page_size = 2;
  494. // A page token, received from a previous `ListApiVersions` call.
  495. // Provide this to retrieve the subsequent page.
  496. //
  497. // When paginating, all other parameters provided to `ListApiVersions` must
  498. // match the call that provided the page token.
  499. string page_token = 3;
  500. // An expression that can be used to filter the list. Filters use the Common
  501. // Expression Language and can refer to all message fields.
  502. string filter = 4;
  503. }
  504. // Response message for ListApiVersions.
  505. message ListApiVersionsResponse {
  506. // The versions from the specified publisher.
  507. repeated ApiVersion api_versions = 1;
  508. // A token, which can be sent as `page_token` to retrieve the next page.
  509. // If this field is omitted, there are no subsequent pages.
  510. string next_page_token = 2;
  511. }
  512. // Request message for GetApiVersion.
  513. message GetApiVersionRequest {
  514. // Required. The name of the version to retrieve.
  515. // Format: `projects/*/locations/*/apis/*/versions/*`
  516. string name = 1 [
  517. (google.api.field_behavior) = REQUIRED,
  518. (google.api.resource_reference) = {
  519. type: "apigeeregistry.googleapis.com/ApiVersion"
  520. }
  521. ];
  522. }
  523. // Request message for CreateApiVersion.
  524. message CreateApiVersionRequest {
  525. // Required. The parent, which owns this collection of versions.
  526. // Format: `projects/*/locations/*/apis/*`
  527. string parent = 1 [
  528. (google.api.field_behavior) = REQUIRED,
  529. (google.api.resource_reference) = {
  530. child_type: "apigeeregistry.googleapis.com/ApiVersion"
  531. }
  532. ];
  533. // Required. The version to create.
  534. ApiVersion api_version = 2 [(google.api.field_behavior) = REQUIRED];
  535. // Required. The ID to use for the version, which will become the final component of
  536. // the version's resource name.
  537. //
  538. // This value should be 1-63 characters, and valid characters
  539. // are /[a-z][0-9]-/.
  540. //
  541. // Following AIP-162, IDs must not have the form of a UUID.
  542. string api_version_id = 3 [(google.api.field_behavior) = REQUIRED];
  543. }
  544. // Request message for UpdateApiVersion.
  545. message UpdateApiVersionRequest {
  546. // Required. The version to update.
  547. //
  548. // The `name` field is used to identify the version to update.
  549. // Format: `projects/*/locations/*/apis/*/versions/*`
  550. ApiVersion api_version = 1 [(google.api.field_behavior) = REQUIRED];
  551. // The list of fields to be updated. If omitted, all fields are updated that
  552. // are set in the request message (fields set to default values are ignored).
  553. // If an asterisk "*" is specified, all fields are updated, including fields
  554. // that are unspecified/default in the request.
  555. google.protobuf.FieldMask update_mask = 2;
  556. // If set to true, and the version is not found, a new version will be
  557. // created. In this situation, `update_mask` is ignored.
  558. bool allow_missing = 3;
  559. }
  560. // Request message for DeleteApiVersion.
  561. message DeleteApiVersionRequest {
  562. // Required. The name of the version to delete.
  563. // Format: `projects/*/locations/*/apis/*/versions/*`
  564. string name = 1 [
  565. (google.api.field_behavior) = REQUIRED,
  566. (google.api.resource_reference) = {
  567. type: "apigeeregistry.googleapis.com/ApiVersion"
  568. }
  569. ];
  570. // If set to true, any child resources will also be deleted.
  571. // (Otherwise, the request will only work if there are no child resources.)
  572. bool force = 2;
  573. }
  574. // Request message for ListApiSpecs.
  575. message ListApiSpecsRequest {
  576. // Required. The parent, which owns this collection of specs.
  577. // Format: `projects/*/locations/*/apis/*/versions/*`
  578. string parent = 1 [
  579. (google.api.field_behavior) = REQUIRED,
  580. (google.api.resource_reference) = {
  581. child_type: "apigeeregistry.googleapis.com/ApiSpec"
  582. }
  583. ];
  584. // The maximum number of specs to return.
  585. // The service may return fewer than this value.
  586. // If unspecified, at most 50 values will be returned.
  587. // The maximum is 1000; values above 1000 will be coerced to 1000.
  588. int32 page_size = 2;
  589. // A page token, received from a previous `ListApiSpecs` call.
  590. // Provide this to retrieve the subsequent page.
  591. //
  592. // When paginating, all other parameters provided to `ListApiSpecs` must match
  593. // the call that provided the page token.
  594. string page_token = 3;
  595. // An expression that can be used to filter the list. Filters use the Common
  596. // Expression Language and can refer to all message fields except contents.
  597. string filter = 4;
  598. }
  599. // Response message for ListApiSpecs.
  600. message ListApiSpecsResponse {
  601. // The specs from the specified publisher.
  602. repeated ApiSpec api_specs = 1;
  603. // A token, which can be sent as `page_token` to retrieve the next page.
  604. // If this field is omitted, there are no subsequent pages.
  605. string next_page_token = 2;
  606. }
  607. // Request message for GetApiSpec.
  608. message GetApiSpecRequest {
  609. // Required. The name of the spec to retrieve.
  610. // Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
  611. string name = 1 [
  612. (google.api.field_behavior) = REQUIRED,
  613. (google.api.resource_reference) = {
  614. type: "apigeeregistry.googleapis.com/ApiSpec"
  615. }
  616. ];
  617. }
  618. // Request message for GetApiSpecContents.
  619. message GetApiSpecContentsRequest {
  620. // Required. The name of the spec whose contents should be retrieved.
  621. // Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
  622. string name = 1 [
  623. (google.api.field_behavior) = REQUIRED,
  624. (google.api.resource_reference) = {
  625. type: "apigeeregistry.googleapis.com/ApiSpec"
  626. }
  627. ];
  628. }
  629. // Request message for CreateApiSpec.
  630. message CreateApiSpecRequest {
  631. // Required. The parent, which owns this collection of specs.
  632. // Format: `projects/*/locations/*/apis/*/versions/*`
  633. string parent = 1 [
  634. (google.api.field_behavior) = REQUIRED,
  635. (google.api.resource_reference) = {
  636. child_type: "apigeeregistry.googleapis.com/ApiSpec"
  637. }
  638. ];
  639. // Required. The spec to create.
  640. ApiSpec api_spec = 2 [(google.api.field_behavior) = REQUIRED];
  641. // Required. The ID to use for the spec, which will become the final component of
  642. // the spec's resource name.
  643. //
  644. // This value should be 4-63 characters, and valid characters
  645. // are /[a-z][0-9]-/.
  646. //
  647. // Following AIP-162, IDs must not have the form of a UUID.
  648. string api_spec_id = 3 [(google.api.field_behavior) = REQUIRED];
  649. }
  650. // Request message for UpdateApiSpec.
  651. message UpdateApiSpecRequest {
  652. // Required. The spec to update.
  653. //
  654. // The `name` field is used to identify the spec to update.
  655. // Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
  656. ApiSpec api_spec = 1 [(google.api.field_behavior) = REQUIRED];
  657. // The list of fields to be updated. If omitted, all fields are updated that
  658. // are set in the request message (fields set to default values are ignored).
  659. // If an asterisk "*" is specified, all fields are updated, including fields
  660. // that are unspecified/default in the request.
  661. google.protobuf.FieldMask update_mask = 2;
  662. // If set to true, and the spec is not found, a new spec will be created.
  663. // In this situation, `update_mask` is ignored.
  664. bool allow_missing = 3;
  665. }
  666. // Request message for DeleteApiSpec.
  667. message DeleteApiSpecRequest {
  668. // Required. The name of the spec to delete.
  669. // Format: `projects/*/locations/*/apis/*/versions/*/specs/*`
  670. string name = 1 [
  671. (google.api.field_behavior) = REQUIRED,
  672. (google.api.resource_reference) = {
  673. type: "apigeeregistry.googleapis.com/ApiSpec"
  674. }
  675. ];
  676. // If set to true, any child resources will also be deleted.
  677. // (Otherwise, the request will only work if there are no child resources.)
  678. bool force = 2;
  679. }
  680. // Request message for TagApiSpecRevision.
  681. message TagApiSpecRevisionRequest {
  682. // Required. The name of the spec to be tagged, including the revision ID.
  683. string name = 1 [
  684. (google.api.field_behavior) = REQUIRED,
  685. (google.api.resource_reference) = {
  686. type: "apigeeregistry.googleapis.com/ApiSpec"
  687. }
  688. ];
  689. // Required. The tag to apply.
  690. // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
  691. string tag = 2 [(google.api.field_behavior) = REQUIRED];
  692. }
  693. // Request message for ListApiSpecRevisions.
  694. message ListApiSpecRevisionsRequest {
  695. // Required. The name of the spec to list revisions for.
  696. string name = 1 [
  697. (google.api.field_behavior) = REQUIRED,
  698. (google.api.resource_reference) = {
  699. type: "apigeeregistry.googleapis.com/ApiSpec"
  700. }
  701. ];
  702. // The maximum number of revisions to return per page.
  703. int32 page_size = 2;
  704. // The page token, received from a previous ListApiSpecRevisions call.
  705. // Provide this to retrieve the subsequent page.
  706. string page_token = 3;
  707. }
  708. // Response message for ListApiSpecRevisionsResponse.
  709. message ListApiSpecRevisionsResponse {
  710. // The revisions of the spec.
  711. repeated ApiSpec api_specs = 1;
  712. // A token that can be sent as `page_token` to retrieve the next page.
  713. // If this field is omitted, there are no subsequent pages.
  714. string next_page_token = 2;
  715. }
  716. // Request message for RollbackApiSpec.
  717. message RollbackApiSpecRequest {
  718. // Required. The spec being rolled back.
  719. string name = 1 [
  720. (google.api.field_behavior) = REQUIRED,
  721. (google.api.resource_reference) = {
  722. type: "apigeeregistry.googleapis.com/ApiSpec"
  723. }
  724. ];
  725. // Required. The revision ID to roll back to.
  726. // It must be a revision of the same spec.
  727. //
  728. // Example: `c7cfa2a8`
  729. string revision_id = 2 [(google.api.field_behavior) = REQUIRED];
  730. }
  731. // Request message for DeleteApiSpecRevision.
  732. message DeleteApiSpecRevisionRequest {
  733. // Required. The name of the spec revision to be deleted,
  734. // with a revision ID explicitly included.
  735. //
  736. // Example:
  737. // `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8`
  738. string name = 1 [
  739. (google.api.field_behavior) = REQUIRED,
  740. (google.api.resource_reference) = {
  741. type: "apigeeregistry.googleapis.com/ApiSpec"
  742. }
  743. ];
  744. }
  745. // Request message for ListApiDeployments.
  746. message ListApiDeploymentsRequest {
  747. // Required. The parent, which owns this collection of deployments.
  748. // Format: `projects/*/locations/*/apis/*`
  749. string parent = 1 [
  750. (google.api.field_behavior) = REQUIRED,
  751. (google.api.resource_reference) = {
  752. child_type: "apigeeregistry.googleapis.com/ApiDeployment"
  753. }
  754. ];
  755. // The maximum number of deployments to return.
  756. // The service may return fewer than this value.
  757. // If unspecified, at most 50 values will be returned.
  758. // The maximum is 1000; values above 1000 will be coerced to 1000.
  759. int32 page_size = 2;
  760. // A page token, received from a previous `ListApiDeployments` call.
  761. // Provide this to retrieve the subsequent page.
  762. //
  763. // When paginating, all other parameters provided to `ListApiDeployments` must
  764. // match the call that provided the page token.
  765. string page_token = 3;
  766. // An expression that can be used to filter the list. Filters use the Common
  767. // Expression Language and can refer to all message fields.
  768. string filter = 4;
  769. }
  770. // Response message for ListApiDeployments.
  771. message ListApiDeploymentsResponse {
  772. // The deployments from the specified publisher.
  773. repeated ApiDeployment api_deployments = 1;
  774. // A token, which can be sent as `page_token` to retrieve the next page.
  775. // If this field is omitted, there are no subsequent pages.
  776. string next_page_token = 2;
  777. }
  778. // Request message for GetApiDeployment.
  779. message GetApiDeploymentRequest {
  780. // Required. The name of the deployment to retrieve.
  781. // Format: `projects/*/locations/*/apis/*/deployments/*`
  782. string name = 1 [
  783. (google.api.field_behavior) = REQUIRED,
  784. (google.api.resource_reference) = {
  785. type: "apigeeregistry.googleapis.com/ApiDeployment"
  786. }
  787. ];
  788. }
  789. // Request message for CreateApiDeployment.
  790. message CreateApiDeploymentRequest {
  791. // Required. The parent, which owns this collection of deployments.
  792. // Format: `projects/*/locations/*/apis/*`
  793. string parent = 1 [
  794. (google.api.field_behavior) = REQUIRED,
  795. (google.api.resource_reference) = {
  796. child_type: "apigeeregistry.googleapis.com/ApiDeployment"
  797. }
  798. ];
  799. // Required. The deployment to create.
  800. ApiDeployment api_deployment = 2 [(google.api.field_behavior) = REQUIRED];
  801. // Required. The ID to use for the deployment, which will become the final component of
  802. // the deployment's resource name.
  803. //
  804. // This value should be 4-63 characters, and valid characters
  805. // are /[a-z][0-9]-/.
  806. //
  807. // Following AIP-162, IDs must not have the form of a UUID.
  808. string api_deployment_id = 3 [(google.api.field_behavior) = REQUIRED];
  809. }
  810. // Request message for UpdateApiDeployment.
  811. message UpdateApiDeploymentRequest {
  812. // Required. The deployment to update.
  813. //
  814. // The `name` field is used to identify the deployment to update.
  815. // Format: `projects/*/locations/*/apis/*/deployments/*`
  816. ApiDeployment api_deployment = 1 [(google.api.field_behavior) = REQUIRED];
  817. // The list of fields to be updated. If omitted, all fields are updated that
  818. // are set in the request message (fields set to default values are ignored).
  819. // If an asterisk "*" is specified, all fields are updated, including fields
  820. // that are unspecified/default in the request.
  821. google.protobuf.FieldMask update_mask = 2;
  822. // If set to true, and the deployment is not found, a new deployment will be
  823. // created. In this situation, `update_mask` is ignored.
  824. bool allow_missing = 3;
  825. }
  826. // Request message for DeleteApiDeployment.
  827. message DeleteApiDeploymentRequest {
  828. // Required. The name of the deployment to delete.
  829. // Format: `projects/*/locations/*/apis/*/deployments/*`
  830. string name = 1 [
  831. (google.api.field_behavior) = REQUIRED,
  832. (google.api.resource_reference) = {
  833. type: "apigeeregistry.googleapis.com/ApiDeployment"
  834. }
  835. ];
  836. // If set to true, any child resources will also be deleted.
  837. // (Otherwise, the request will only work if there are no child resources.)
  838. bool force = 2;
  839. }
  840. // Request message for TagApiDeploymentRevision.
  841. message TagApiDeploymentRevisionRequest {
  842. // Required. The name of the deployment to be tagged, including the revision ID.
  843. string name = 1 [
  844. (google.api.field_behavior) = REQUIRED,
  845. (google.api.resource_reference) = {
  846. type: "apigeeregistry.googleapis.com/ApiDeployment"
  847. }
  848. ];
  849. // Required. The tag to apply.
  850. // The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`.
  851. string tag = 2 [(google.api.field_behavior) = REQUIRED];
  852. }
  853. // Request message for ListApiDeploymentRevisions.
  854. message ListApiDeploymentRevisionsRequest {
  855. // Required. The name of the deployment to list revisions for.
  856. string name = 1 [
  857. (google.api.field_behavior) = REQUIRED,
  858. (google.api.resource_reference) = {
  859. type: "apigeeregistry.googleapis.com/ApiDeployment"
  860. }
  861. ];
  862. // The maximum number of revisions to return per page.
  863. int32 page_size = 2;
  864. // The page token, received from a previous ListApiDeploymentRevisions call.
  865. // Provide this to retrieve the subsequent page.
  866. string page_token = 3;
  867. }
  868. // Response message for ListApiDeploymentRevisionsResponse.
  869. message ListApiDeploymentRevisionsResponse {
  870. // The revisions of the deployment.
  871. repeated ApiDeployment api_deployments = 1;
  872. // A token that can be sent as `page_token` to retrieve the next page.
  873. // If this field is omitted, there are no subsequent pages.
  874. string next_page_token = 2;
  875. }
  876. // Request message for RollbackApiDeployment.
  877. message RollbackApiDeploymentRequest {
  878. // Required. The deployment being rolled back.
  879. string name = 1 [
  880. (google.api.field_behavior) = REQUIRED,
  881. (google.api.resource_reference) = {
  882. type: "apigeeregistry.googleapis.com/ApiDeployment"
  883. }
  884. ];
  885. // Required. The revision ID to roll back to.
  886. // It must be a revision of the same deployment.
  887. //
  888. // Example: `c7cfa2a8`
  889. string revision_id = 2 [(google.api.field_behavior) = REQUIRED];
  890. }
  891. // Request message for DeleteApiDeploymentRevision.
  892. message DeleteApiDeploymentRevisionRequest {
  893. // Required. The name of the deployment revision to be deleted,
  894. // with a revision ID explicitly included.
  895. //
  896. // Example:
  897. // `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8`
  898. string name = 1 [
  899. (google.api.field_behavior) = REQUIRED,
  900. (google.api.resource_reference) = {
  901. type: "apigeeregistry.googleapis.com/ApiDeployment"
  902. }
  903. ];
  904. }
  905. // Request message for ListArtifacts.
  906. message ListArtifactsRequest {
  907. // Required. The parent, which owns this collection of artifacts.
  908. // Format: `{parent}`
  909. string parent = 1 [
  910. (google.api.field_behavior) = REQUIRED,
  911. (google.api.resource_reference) = {
  912. child_type: "apigeeregistry.googleapis.com/Artifact"
  913. }
  914. ];
  915. // The maximum number of artifacts to return.
  916. // The service may return fewer than this value.
  917. // If unspecified, at most 50 values will be returned.
  918. // The maximum is 1000; values above 1000 will be coerced to 1000.
  919. int32 page_size = 2;
  920. // A page token, received from a previous `ListArtifacts` call.
  921. // Provide this to retrieve the subsequent page.
  922. //
  923. // When paginating, all other parameters provided to `ListArtifacts` must
  924. // match the call that provided the page token.
  925. string page_token = 3;
  926. // An expression that can be used to filter the list. Filters use the Common
  927. // Expression Language and can refer to all message fields except contents.
  928. string filter = 4;
  929. }
  930. // Response message for ListArtifacts.
  931. message ListArtifactsResponse {
  932. // The artifacts from the specified publisher.
  933. repeated Artifact artifacts = 1;
  934. // A token, which can be sent as `page_token` to retrieve the next page.
  935. // If this field is omitted, there are no subsequent pages.
  936. string next_page_token = 2;
  937. }
  938. // Request message for GetArtifact.
  939. message GetArtifactRequest {
  940. // Required. The name of the artifact to retrieve.
  941. // Format: `{parent}/artifacts/*`
  942. string name = 1 [
  943. (google.api.field_behavior) = REQUIRED,
  944. (google.api.resource_reference) = {
  945. type: "apigeeregistry.googleapis.com/Artifact"
  946. }
  947. ];
  948. }
  949. // Request message for GetArtifactContents.
  950. message GetArtifactContentsRequest {
  951. // Required. The name of the artifact whose contents should be retrieved.
  952. // Format: `{parent}/artifacts/*`
  953. string name = 1 [
  954. (google.api.field_behavior) = REQUIRED,
  955. (google.api.resource_reference) = {
  956. type: "apigeeregistry.googleapis.com/Artifact"
  957. }
  958. ];
  959. }
  960. // Request message for CreateArtifact.
  961. message CreateArtifactRequest {
  962. // Required. The parent, which owns this collection of artifacts.
  963. // Format: `{parent}`
  964. string parent = 1 [
  965. (google.api.field_behavior) = REQUIRED,
  966. (google.api.resource_reference) = {
  967. child_type: "apigeeregistry.googleapis.com/Artifact"
  968. }
  969. ];
  970. // Required. The artifact to create.
  971. Artifact artifact = 2 [(google.api.field_behavior) = REQUIRED];
  972. // Required. The ID to use for the artifact, which will become the final component of
  973. // the artifact's resource name.
  974. //
  975. // This value should be 4-63 characters, and valid characters
  976. // are /[a-z][0-9]-/.
  977. //
  978. // Following AIP-162, IDs must not have the form of a UUID.
  979. string artifact_id = 3 [(google.api.field_behavior) = REQUIRED];
  980. }
  981. // Request message for ReplaceArtifact.
  982. message ReplaceArtifactRequest {
  983. // Required. The artifact to replace.
  984. //
  985. // The `name` field is used to identify the artifact to replace.
  986. // Format: `{parent}/artifacts/*`
  987. Artifact artifact = 1 [(google.api.field_behavior) = REQUIRED];
  988. }
  989. // Request message for DeleteArtifact.
  990. message DeleteArtifactRequest {
  991. // Required. The name of the artifact to delete.
  992. // Format: `{parent}/artifacts/*`
  993. string name = 1 [
  994. (google.api.field_behavior) = REQUIRED,
  995. (google.api.resource_reference) = {
  996. type: "apigeeregistry.googleapis.com/Artifact"
  997. }
  998. ];
  999. }