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