Built motion from commit 44377920.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / talent / v4beta1 / company_service.proto
1 // Copyright 2019 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 //
15
16 syntax = "proto3";
17
18 package google.cloud.talent.v4beta1;
19
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";
25
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";
31
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"
38       body: "*"
39     };
40   }
41
42   // Retrieves specified company.
43   rpc GetCompany(GetCompanyRequest) returns (Company) {
44     option (google.api.http) = {
45       get: "/v4beta1/{name=projects/*/companies/*}"
46     };
47   }
48
49   // Updates specified company.
50   rpc UpdateCompany(UpdateCompanyRequest) returns (Company) {
51     option (google.api.http) = {
52       patch: "/v4beta1/{company.name=projects/*/companies/*}"
53       body: "*"
54     };
55   }
56
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/*}"
62     };
63   }
64
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"
69     };
70   }
71 }
72
73 // The Request of the CreateCompany method.
74 message CreateCompanyRequest {
75   // Required.
76   //
77   // Resource name of the project under which the company is created.
78   //
79   // The format is "projects/{project_id}", for example,
80   // "projects/api-test-project".
81   string parent = 1;
82
83   // Required.
84   //
85   // The company to be created.
86   Company company = 2;
87 }
88
89 // Request for getting a company by name.
90 message GetCompanyRequest {
91   // Required.
92   //
93   // The resource name of the company to be retrieved.
94   //
95   // The format is "projects/{project_id}/companies/{company_id}", for example,
96   // "projects/api-test-project/companies/foo".
97   string name = 1;
98 }
99
100 // Request for updating a specified company.
101 message UpdateCompanyRequest {
102   // Required.
103   //
104   // The company resource to replace the current resource in the system.
105   Company company = 1;
106
107   // Optional but strongly recommended for the best service
108   // experience.
109   //
110   // If
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.
115   //
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
118   // supported.
119   google.protobuf.FieldMask update_mask = 2;
120 }
121
122 // Request to delete a company.
123 message DeleteCompanyRequest {
124   // Required.
125   //
126   // The resource name of the company to be deleted.
127   //
128   // The format is "projects/{project_id}/companies/{company_id}", for example,
129   // "projects/api-test-project/companies/foo".
130   string name = 1;
131 }
132
133 // List companies for which the client has ACL visibility.
134 message ListCompaniesRequest {
135   // Required.
136   //
137   // Resource name of the project under which the company is created.
138   //
139   // The format is "projects/{project_id}", for example,
140   // "projects/api-test-project".
141   string parent = 1;
142
143   // Optional.
144   //
145   // The starting indicator from which to return results.
146   string page_token = 2;
147
148   // Optional.
149   //
150   // The maximum number of companies to be returned, at most 100.
151   // Default is 100 if a non-positive number is provided.
152   int32 page_size = 3;
153
154   // Optional.
155   //
156   // Set to true if the companies requested must have open jobs.
157   //
158   // Defaults to false.
159   //
160   // If true, at most
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;
164 }
165
166 // Output only.
167 //
168 // The List companies response object.
169 message ListCompaniesResponse {
170   // Companies for the current client.
171   repeated Company companies = 1;
172
173   // A token to retrieve the next page of results.
174   string next_page_token = 2;
175
176   // Additional information for the API invocation, such as the request
177   // tracking id.
178   ResponseMetadata metadata = 3;
179 }