xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1beta1/extension_registry_service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.aiplatform.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/aiplatform/v1beta1/extension.proto";
24import "google/cloud/aiplatform/v1beta1/operation.proto";
25import "google/longrunning/operations.proto";
26import "google/protobuf/empty.proto";
27import "google/protobuf/field_mask.proto";
28
29option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
30option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
31option java_multiple_files = true;
32option java_outer_classname = "ExtensionRegistryServiceProto";
33option java_package = "com.google.cloud.aiplatform.v1beta1";
34option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
35option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
36
37// A service for managing Vertex AI's Extension registry.
38service ExtensionRegistryService {
39  option (google.api.default_host) = "aiplatform.googleapis.com";
40  option (google.api.oauth_scopes) =
41      "https://www.googleapis.com/auth/cloud-platform";
42
43  // Imports an Extension.
44  rpc ImportExtension(ImportExtensionRequest)
45      returns (google.longrunning.Operation) {
46    option (google.api.http) = {
47      post: "/v1beta1/{parent=projects/*/locations/*}/extensions:import"
48      body: "extension"
49    };
50    option (google.api.method_signature) = "parent,extension";
51    option (google.longrunning.operation_info) = {
52      response_type: "Extension"
53      metadata_type: "ImportExtensionOperationMetadata"
54    };
55  }
56
57  // Gets an Extension.
58  rpc GetExtension(GetExtensionRequest) returns (Extension) {
59    option (google.api.http) = {
60      get: "/v1beta1/{name=projects/*/locations/*/extensions/*}"
61    };
62    option (google.api.method_signature) = "name";
63  }
64
65  // Lists Extensions in a location.
66  rpc ListExtensions(ListExtensionsRequest) returns (ListExtensionsResponse) {
67    option (google.api.http) = {
68      get: "/v1beta1/{parent=projects/*/locations/*}/extensions"
69    };
70    option (google.api.method_signature) = "parent";
71  }
72
73  // Updates an Extension.
74  rpc UpdateExtension(UpdateExtensionRequest) returns (Extension) {
75    option (google.api.http) = {
76      patch: "/v1beta1/{extension.name=projects/*/locations/*/extensions/*}"
77      body: "extension"
78    };
79    option (google.api.method_signature) = "extension,update_mask";
80  }
81
82  // Deletes an Extension.
83  rpc DeleteExtension(DeleteExtensionRequest)
84      returns (google.longrunning.Operation) {
85    option (google.api.http) = {
86      delete: "/v1beta1/{name=projects/*/locations/*/extensions/*}"
87    };
88    option (google.api.method_signature) = "name";
89    option (google.longrunning.operation_info) = {
90      response_type: "google.protobuf.Empty"
91      metadata_type: "DeleteOperationMetadata"
92    };
93  }
94}
95
96// Request message for
97// [ExtensionRegistryService.ImportExtension][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.ImportExtension].
98message ImportExtensionRequest {
99  // Required. The resource name of the Location to import the Extension in.
100  // Format: `projects/{project}/locations/{location}`
101  string parent = 1 [
102    (google.api.field_behavior) = REQUIRED,
103    (google.api.resource_reference) = {
104      type: "locations.googleapis.com/Location"
105    }
106  ];
107
108  // Required. The Extension to import.
109  Extension extension = 2 [(google.api.field_behavior) = REQUIRED];
110}
111
112// Details of
113// [ExtensionRegistryService.ImportExtension][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.ImportExtension]
114// operation.
115message ImportExtensionOperationMetadata {
116  // The common part of the operation metadata.
117  GenericOperationMetadata generic_metadata = 1;
118}
119
120// Request message for
121// [ExtensionRegistryService.GetExtension][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.GetExtension].
122message GetExtensionRequest {
123  // Required. The name of the Extension resource.
124  // Format:
125  // `projects/{project}/locations/{location}/extensions/{extension}`
126  string name = 1 [
127    (google.api.field_behavior) = REQUIRED,
128    (google.api.resource_reference) = {
129      type: "aiplatform.googleapis.com/Extension"
130    }
131  ];
132}
133
134// Request message for
135// [ExtensionRegistryService.UpdateExtension][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.UpdateExtension].
136message UpdateExtensionRequest {
137  // Required. The Extension which replaces the resource on the server.
138  Extension extension = 1 [(google.api.field_behavior) = REQUIRED];
139
140  // Required. Mask specifying which fields to update.
141  // Supported fields:
142  //
143  //    * `display_name`
144  //    * `description`
145  //    * `tool_use_examples`
146  google.protobuf.FieldMask update_mask = 2
147      [(google.api.field_behavior) = REQUIRED];
148}
149
150// Request message for
151// [ExtensionRegistryService.ListExtensions][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.ListExtensions].
152message ListExtensionsRequest {
153  // Required. The resource name of the Location to list the Extensions from.
154  // Format: `projects/{project}/locations/{location}`
155  string parent = 1 [
156    (google.api.field_behavior) = REQUIRED,
157    (google.api.resource_reference) = {
158      type: "locations.googleapis.com/Location"
159    }
160  ];
161
162  // Optional. The standard list filter.
163  // Supported fields:
164  //    * `display_name`
165  //    * `create_time`
166  //    * `update_time`
167  //
168  // More detail in [AIP-160](https://google.aip.dev/160).
169  string filter = 2 [(google.api.field_behavior) = OPTIONAL];
170
171  // Optional. The standard list page size.
172  int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
173
174  // Optional. The standard list page token.
175  string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
176
177  // Optional. A comma-separated list of fields to order by, sorted in ascending
178  // order. Use "desc" after a field name for descending. Supported fields:
179  //   * `display_name`
180  //   * `create_time`
181  //   * `update_time`
182  //
183  // Example: `display_name, create_time desc`.
184  string order_by = 6 [(google.api.field_behavior) = OPTIONAL];
185}
186
187// Response message for
188// [ExtensionRegistryService.ListExtensions][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.ListExtensions]
189message ListExtensionsResponse {
190  // List of Extension in the requested page.
191  repeated Extension extensions = 1;
192
193  // A token to retrieve the next page of results.
194  // Pass to
195  // [ListExtensionsRequest.page_token][google.cloud.aiplatform.v1beta1.ListExtensionsRequest.page_token]
196  // to obtain that page.
197  string next_page_token = 2;
198}
199
200// Request message for
201// [ExtensionRegistryService.DeleteExtension][google.cloud.aiplatform.v1beta1.ExtensionRegistryService.DeleteExtension].
202message DeleteExtensionRequest {
203  // Required. The name of the Extension resource to be deleted.
204  // Format:
205  // `projects/{project}/locations/{location}/extensions/{extension}`
206  string name = 1 [
207    (google.api.field_behavior) = REQUIRED,
208    (google.api.resource_reference) = {
209      type: "aiplatform.googleapis.com/Extension"
210    }
211  ];
212}
213