1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.cloud.talent.v4beta1;
20 import "google/api/annotations.proto";
21 import "google/cloud/talent/v4beta1/common.proto";
22 import "google/cloud/talent/v4beta1/company.proto";
23 import "google/protobuf/empty.proto";
24 import "google/protobuf/field_mask.proto";
26 option go_package = "google.golang.org/genproto/googleapis/cloud/talent/v4beta1;talent";
27 option java_multiple_files = true;
28 option java_outer_classname = "CompanyServiceProto";
29 option java_package = "com.google.cloud.talent.v4beta1";
30 option objc_class_prefix = "CTS";
32 // A service that handles company management, including CRUD and enumeration.
33 service CompanyService {
34 // Creates a new company entity.
35 rpc CreateCompany(CreateCompanyRequest) returns (Company) {
36 option (google.api.http) = {
37 post: "/v4beta1/{parent=projects/*}/companies"
42 // Retrieves specified company.
43 rpc GetCompany(GetCompanyRequest) returns (Company) {
44 option (google.api.http) = {
45 get: "/v4beta1/{name=projects/*/companies/*}"
49 // Updates specified company.
50 rpc UpdateCompany(UpdateCompanyRequest) returns (Company) {
51 option (google.api.http) = {
52 patch: "/v4beta1/{company.name=projects/*/companies/*}"
57 // Deletes specified company.
58 // Prerequisite: The company has no jobs associated with it.
59 rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) {
60 option (google.api.http) = {
61 delete: "/v4beta1/{name=projects/*/companies/*}"
65 // Lists all companies associated with the project.
66 rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) {
67 option (google.api.http) = {
68 get: "/v4beta1/{parent=projects/*}/companies"
73 // The Request of the CreateCompany method.
74 message CreateCompanyRequest {
77 // Resource name of the project under which the company is created.
79 // The format is "projects/{project_id}", for example,
80 // "projects/api-test-project".
85 // The company to be created.
89 // Request for getting a company by name.
90 message GetCompanyRequest {
93 // The resource name of the company to be retrieved.
95 // The format is "projects/{project_id}/companies/{company_id}", for example,
96 // "projects/api-test-project/companies/foo".
100 // Request for updating a specified company.
101 message UpdateCompanyRequest {
104 // The company resource to replace the current resource in the system.
107 // Optional but strongly recommended for the best service
111 // [update_mask][google.cloud.talent.v4beta1.UpdateCompanyRequest.update_mask]
112 // is provided, only the specified fields in
113 // [company][google.cloud.talent.v4beta1.UpdateCompanyRequest.company] are
114 // updated. Otherwise all the fields are updated.
116 // A field mask to specify the company fields to be updated. Only
117 // top level fields of [Company][google.cloud.talent.v4beta1.Company] are
119 google.protobuf.FieldMask update_mask = 2;
122 // Request to delete a company.
123 message DeleteCompanyRequest {
126 // The resource name of the company to be deleted.
128 // The format is "projects/{project_id}/companies/{company_id}", for example,
129 // "projects/api-test-project/companies/foo".
133 // List companies for which the client has ACL visibility.
134 message ListCompaniesRequest {
137 // Resource name of the project under which the company is created.
139 // The format is "projects/{project_id}", for example,
140 // "projects/api-test-project".
145 // The starting indicator from which to return results.
146 string page_token = 2;
150 // The maximum number of companies to be returned, at most 100.
151 // Default is 100 if a non-positive number is provided.
156 // Set to true if the companies requested must have open jobs.
158 // Defaults to false.
161 // [page_size][google.cloud.talent.v4beta1.ListCompaniesRequest.page_size] of
162 // companies are fetched, among which only those with open jobs are returned.
163 bool require_open_jobs = 4;
168 // The List companies response object.
169 message ListCompaniesResponse {
170 // Companies for the current client.
171 repeated Company companies = 1;
173 // A token to retrieve the next page of results.
174 string next_page_token = 2;
176 // Additional information for the API invocation, such as the request
178 ResponseMetadata metadata = 3;