application_service.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. // Copyright 2020 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.talent.v4beta1;
  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/talent/v4beta1/application.proto";
  21. import "google/cloud/talent/v4beta1/common.proto";
  22. import "google/protobuf/empty.proto";
  23. import "google/protobuf/field_mask.proto";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "ApplicationServiceProto";
  27. option java_package = "com.google.cloud.talent.v4beta1";
  28. option objc_class_prefix = "CTS";
  29. // A service that handles application management, including CRUD and
  30. // enumeration.
  31. service ApplicationService {
  32. option (google.api.default_host) = "jobs.googleapis.com";
  33. option (google.api.oauth_scopes) =
  34. "https://www.googleapis.com/auth/cloud-platform,"
  35. "https://www.googleapis.com/auth/jobs";
  36. // Creates a new application entity.
  37. rpc CreateApplication(CreateApplicationRequest) returns (Application) {
  38. option (google.api.http) = {
  39. post: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications"
  40. body: "*"
  41. };
  42. option (google.api.method_signature) = "parent,application";
  43. }
  44. // Retrieves specified application.
  45. rpc GetApplication(GetApplicationRequest) returns (Application) {
  46. option (google.api.http) = {
  47. get: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}"
  48. };
  49. option (google.api.method_signature) = "name";
  50. }
  51. // Updates specified application.
  52. rpc UpdateApplication(UpdateApplicationRequest) returns (Application) {
  53. option (google.api.http) = {
  54. patch: "/v4beta1/{application.name=projects/*/tenants/*/profiles/*/applications/*}"
  55. body: "*"
  56. };
  57. option (google.api.method_signature) = "application";
  58. }
  59. // Deletes specified application.
  60. rpc DeleteApplication(DeleteApplicationRequest) returns (google.protobuf.Empty) {
  61. option (google.api.http) = {
  62. delete: "/v4beta1/{name=projects/*/tenants/*/profiles/*/applications/*}"
  63. };
  64. option (google.api.method_signature) = "name";
  65. }
  66. // Lists all applications associated with the profile.
  67. rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) {
  68. option (google.api.http) = {
  69. get: "/v4beta1/{parent=projects/*/tenants/*/profiles/*}/applications"
  70. };
  71. option (google.api.method_signature) = "parent";
  72. }
  73. }
  74. // The Request of the CreateApplication method.
  75. message CreateApplicationRequest {
  76. // Required. Resource name of the profile under which the application is created.
  77. //
  78. // The format is
  79. // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}".
  80. // For example, "projects/foo/tenants/bar/profiles/baz".
  81. string parent = 1 [
  82. (google.api.field_behavior) = REQUIRED,
  83. (google.api.resource_reference) = {
  84. type: "jobs.googleapis.com/Profile"
  85. }
  86. ];
  87. // Required. The application to be created.
  88. Application application = 2 [(google.api.field_behavior) = REQUIRED];
  89. }
  90. // Request for getting a application by name.
  91. message GetApplicationRequest {
  92. // Required. The resource name of the application to be retrieved.
  93. //
  94. // The format is
  95. // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
  96. // For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
  97. string name = 1 [
  98. (google.api.field_behavior) = REQUIRED,
  99. (google.api.resource_reference) = {
  100. type: "jobs.googleapis.com/Application"
  101. }
  102. ];
  103. }
  104. // Request for updating a specified application.
  105. message UpdateApplicationRequest {
  106. // Required. The application resource to replace the current resource in the system.
  107. Application application = 1 [(google.api.field_behavior) = REQUIRED];
  108. // Strongly recommended for the best service experience.
  109. //
  110. // If [update_mask][google.cloud.talent.v4beta1.UpdateApplicationRequest.update_mask] is provided, only the specified fields in
  111. // [application][google.cloud.talent.v4beta1.UpdateApplicationRequest.application] are updated. Otherwise all the fields are updated.
  112. //
  113. // A field mask to specify the application fields to be updated. Only
  114. // top level fields of [Application][google.cloud.talent.v4beta1.Application] are supported.
  115. google.protobuf.FieldMask update_mask = 2;
  116. }
  117. // Request to delete a application.
  118. message DeleteApplicationRequest {
  119. // Required. The resource name of the application to be deleted.
  120. //
  121. // The format is
  122. // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
  123. // For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
  124. string name = 1 [
  125. (google.api.field_behavior) = REQUIRED,
  126. (google.api.resource_reference) = {
  127. type: "jobs.googleapis.com/Application"
  128. }
  129. ];
  130. }
  131. // List applications for which the client has ACL visibility.
  132. message ListApplicationsRequest {
  133. // Required. Resource name of the profile under which the application is created.
  134. //
  135. // The format is
  136. // "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
  137. // example, "projects/foo/tenants/bar/profiles/baz".
  138. string parent = 1 [
  139. (google.api.field_behavior) = REQUIRED,
  140. (google.api.resource_reference) = {
  141. type: "jobs.googleapis.com/Profile"
  142. }
  143. ];
  144. // The starting indicator from which to return results.
  145. string page_token = 2;
  146. // The maximum number of applications to be returned, at most 100.
  147. // Default is 100 if a non-positive number is provided.
  148. int32 page_size = 3;
  149. }
  150. // The List applications response object.
  151. message ListApplicationsResponse {
  152. // Applications for the current client.
  153. repeated Application applications = 1;
  154. // A token to retrieve the next page of results.
  155. string next_page_token = 2;
  156. // Additional information for the API invocation, such as the request
  157. // tracking id.
  158. ResponseMetadata metadata = 3;
  159. }