specialist_pool_service.proto 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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.aiplatform.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/aiplatform/v1/operation.proto";
  21. import "google/cloud/aiplatform/v1/specialist_pool.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/protobuf/field_mask.proto";
  24. option csharp_namespace = "Google.Cloud.AIPlatform.V1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "SpecialistPoolServiceProto";
  28. option java_package = "com.google.cloud.aiplatform.v1";
  29. option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
  30. option ruby_package = "Google::Cloud::AIPlatform::V1";
  31. // A service for creating and managing Customer SpecialistPools.
  32. // When customers start Data Labeling jobs, they can reuse/create Specialist
  33. // Pools to bring their own Specialists to label the data.
  34. // Customers can add/remove Managers for the Specialist Pool on Cloud console,
  35. // then Managers will get email notifications to manage Specialists and tasks on
  36. // CrowdCompute console.
  37. service SpecialistPoolService {
  38. option (google.api.default_host) = "aiplatform.googleapis.com";
  39. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  40. // Creates a SpecialistPool.
  41. rpc CreateSpecialistPool(CreateSpecialistPoolRequest) returns (google.longrunning.Operation) {
  42. option (google.api.http) = {
  43. post: "/v1/{parent=projects/*/locations/*}/specialistPools"
  44. body: "specialist_pool"
  45. };
  46. option (google.api.method_signature) = "parent,specialist_pool";
  47. option (google.longrunning.operation_info) = {
  48. response_type: "SpecialistPool"
  49. metadata_type: "CreateSpecialistPoolOperationMetadata"
  50. };
  51. }
  52. // Gets a SpecialistPool.
  53. rpc GetSpecialistPool(GetSpecialistPoolRequest) returns (SpecialistPool) {
  54. option (google.api.http) = {
  55. get: "/v1/{name=projects/*/locations/*/specialistPools/*}"
  56. };
  57. option (google.api.method_signature) = "name";
  58. }
  59. // Lists SpecialistPools in a Location.
  60. rpc ListSpecialistPools(ListSpecialistPoolsRequest) returns (ListSpecialistPoolsResponse) {
  61. option (google.api.http) = {
  62. get: "/v1/{parent=projects/*/locations/*}/specialistPools"
  63. };
  64. option (google.api.method_signature) = "parent";
  65. }
  66. // Deletes a SpecialistPool as well as all Specialists in the pool.
  67. rpc DeleteSpecialistPool(DeleteSpecialistPoolRequest) returns (google.longrunning.Operation) {
  68. option (google.api.http) = {
  69. delete: "/v1/{name=projects/*/locations/*/specialistPools/*}"
  70. };
  71. option (google.api.method_signature) = "name";
  72. option (google.longrunning.operation_info) = {
  73. response_type: "google.protobuf.Empty"
  74. metadata_type: "DeleteOperationMetadata"
  75. };
  76. }
  77. // Updates a SpecialistPool.
  78. rpc UpdateSpecialistPool(UpdateSpecialistPoolRequest) returns (google.longrunning.Operation) {
  79. option (google.api.http) = {
  80. patch: "/v1/{specialist_pool.name=projects/*/locations/*/specialistPools/*}"
  81. body: "specialist_pool"
  82. };
  83. option (google.api.method_signature) = "specialist_pool,update_mask";
  84. option (google.longrunning.operation_info) = {
  85. response_type: "SpecialistPool"
  86. metadata_type: "UpdateSpecialistPoolOperationMetadata"
  87. };
  88. }
  89. }
  90. // Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
  91. message CreateSpecialistPoolRequest {
  92. // Required. The parent Project name for the new SpecialistPool.
  93. // The form is `projects/{project}/locations/{location}`.
  94. string parent = 1 [
  95. (google.api.field_behavior) = REQUIRED,
  96. (google.api.resource_reference) = {
  97. type: "locations.googleapis.com/Location"
  98. }
  99. ];
  100. // Required. The SpecialistPool to create.
  101. SpecialistPool specialist_pool = 2 [(google.api.field_behavior) = REQUIRED];
  102. }
  103. // Runtime operation information for
  104. // [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.CreateSpecialistPool].
  105. message CreateSpecialistPoolOperationMetadata {
  106. // The operation generic information.
  107. GenericOperationMetadata generic_metadata = 1;
  108. }
  109. // Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.GetSpecialistPool].
  110. message GetSpecialistPoolRequest {
  111. // Required. The name of the SpecialistPool resource.
  112. // The form is
  113. // `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
  114. string name = 1 [
  115. (google.api.field_behavior) = REQUIRED,
  116. (google.api.resource_reference) = {
  117. type: "aiplatform.googleapis.com/SpecialistPool"
  118. }
  119. ];
  120. }
  121. // Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
  122. message ListSpecialistPoolsRequest {
  123. // Required. The name of the SpecialistPool's parent resource.
  124. // Format: `projects/{project}/locations/{location}`
  125. string parent = 1 [
  126. (google.api.field_behavior) = REQUIRED,
  127. (google.api.resource_reference) = {
  128. type: "locations.googleapis.com/Location"
  129. }
  130. ];
  131. // The standard list page size.
  132. int32 page_size = 2;
  133. // The standard list page token.
  134. // Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1.ListSpecialistPoolsResponse.next_page_token] of
  135. // the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools] call. Return
  136. // first page if empty.
  137. string page_token = 3;
  138. // Mask specifying which fields to read. FieldMask represents a set of
  139. google.protobuf.FieldMask read_mask = 4;
  140. }
  141. // Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1.SpecialistPoolService.ListSpecialistPools].
  142. message ListSpecialistPoolsResponse {
  143. // A list of SpecialistPools that matches the specified filter in the request.
  144. repeated SpecialistPool specialist_pools = 1;
  145. // The standard List next-page token.
  146. string next_page_token = 2;
  147. }
  148. // Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.DeleteSpecialistPool].
  149. message DeleteSpecialistPoolRequest {
  150. // Required. The resource name of the SpecialistPool to delete. Format:
  151. // `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
  152. string name = 1 [
  153. (google.api.field_behavior) = REQUIRED,
  154. (google.api.resource_reference) = {
  155. type: "aiplatform.googleapis.com/SpecialistPool"
  156. }
  157. ];
  158. // If set to true, any specialist managers in this SpecialistPool will also be
  159. // deleted. (Otherwise, the request will only work if the SpecialistPool has
  160. // no specialist managers.)
  161. bool force = 2;
  162. }
  163. // Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
  164. message UpdateSpecialistPoolRequest {
  165. // Required. The SpecialistPool which replaces the resource on the server.
  166. SpecialistPool specialist_pool = 1 [(google.api.field_behavior) = REQUIRED];
  167. // Required. The update mask applies to the resource.
  168. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  169. }
  170. // Runtime operation metadata for
  171. // [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1.SpecialistPoolService.UpdateSpecialistPool].
  172. message UpdateSpecialistPoolOperationMetadata {
  173. // Output only. The name of the SpecialistPool to which the specialists are being added.
  174. // Format:
  175. // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
  176. string specialist_pool = 1 [
  177. (google.api.field_behavior) = OUTPUT_ONLY,
  178. (google.api.resource_reference) = {
  179. type: "aiplatform.googleapis.com/SpecialistPool"
  180. }
  181. ];
  182. // The operation generic information.
  183. GenericOperationMetadata generic_metadata = 2;
  184. }