• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.google.cloud.talent.v4;
17 
18 import static io.grpc.MethodDescriptor.generateFullMethodName;
19 
20 /**
21  *
22  *
23  * <pre>
24  * A service that handles company management, including CRUD and enumeration.
25  * </pre>
26  */
27 @javax.annotation.Generated(
28     value = "by gRPC proto compiler",
29     comments = "Source: google/cloud/talent/v4/company_service.proto")
30 @io.grpc.stub.annotations.GrpcGenerated
31 public final class CompanyServiceGrpc {
32 
CompanyServiceGrpc()33   private CompanyServiceGrpc() {}
34 
35   public static final String SERVICE_NAME = "google.cloud.talent.v4.CompanyService";
36 
37   // Static method descriptors that strictly reflect the proto.
38   private static volatile io.grpc.MethodDescriptor<
39           com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company>
40       getCreateCompanyMethod;
41 
42   @io.grpc.stub.annotations.RpcMethod(
43       fullMethodName = SERVICE_NAME + '/' + "CreateCompany",
44       requestType = com.google.cloud.talent.v4.CreateCompanyRequest.class,
45       responseType = com.google.cloud.talent.v4.Company.class,
46       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
47   public static io.grpc.MethodDescriptor<
48           com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company>
getCreateCompanyMethod()49       getCreateCompanyMethod() {
50     io.grpc.MethodDescriptor<
51             com.google.cloud.talent.v4.CreateCompanyRequest, com.google.cloud.talent.v4.Company>
52         getCreateCompanyMethod;
53     if ((getCreateCompanyMethod = CompanyServiceGrpc.getCreateCompanyMethod) == null) {
54       synchronized (CompanyServiceGrpc.class) {
55         if ((getCreateCompanyMethod = CompanyServiceGrpc.getCreateCompanyMethod) == null) {
56           CompanyServiceGrpc.getCreateCompanyMethod =
57               getCreateCompanyMethod =
58                   io.grpc.MethodDescriptor
59                       .<com.google.cloud.talent.v4.CreateCompanyRequest,
60                           com.google.cloud.talent.v4.Company>
61                           newBuilder()
62                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
63                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCompany"))
64                       .setSampledToLocalTracing(true)
65                       .setRequestMarshaller(
66                           io.grpc.protobuf.ProtoUtils.marshaller(
67                               com.google.cloud.talent.v4.CreateCompanyRequest.getDefaultInstance()))
68                       .setResponseMarshaller(
69                           io.grpc.protobuf.ProtoUtils.marshaller(
70                               com.google.cloud.talent.v4.Company.getDefaultInstance()))
71                       .setSchemaDescriptor(
72                           new CompanyServiceMethodDescriptorSupplier("CreateCompany"))
73                       .build();
74         }
75       }
76     }
77     return getCreateCompanyMethod;
78   }
79 
80   private static volatile io.grpc.MethodDescriptor<
81           com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company>
82       getGetCompanyMethod;
83 
84   @io.grpc.stub.annotations.RpcMethod(
85       fullMethodName = SERVICE_NAME + '/' + "GetCompany",
86       requestType = com.google.cloud.talent.v4.GetCompanyRequest.class,
87       responseType = com.google.cloud.talent.v4.Company.class,
88       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
89   public static io.grpc.MethodDescriptor<
90           com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company>
getGetCompanyMethod()91       getGetCompanyMethod() {
92     io.grpc.MethodDescriptor<
93             com.google.cloud.talent.v4.GetCompanyRequest, com.google.cloud.talent.v4.Company>
94         getGetCompanyMethod;
95     if ((getGetCompanyMethod = CompanyServiceGrpc.getGetCompanyMethod) == null) {
96       synchronized (CompanyServiceGrpc.class) {
97         if ((getGetCompanyMethod = CompanyServiceGrpc.getGetCompanyMethod) == null) {
98           CompanyServiceGrpc.getGetCompanyMethod =
99               getGetCompanyMethod =
100                   io.grpc.MethodDescriptor
101                       .<com.google.cloud.talent.v4.GetCompanyRequest,
102                           com.google.cloud.talent.v4.Company>
103                           newBuilder()
104                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
105                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCompany"))
106                       .setSampledToLocalTracing(true)
107                       .setRequestMarshaller(
108                           io.grpc.protobuf.ProtoUtils.marshaller(
109                               com.google.cloud.talent.v4.GetCompanyRequest.getDefaultInstance()))
110                       .setResponseMarshaller(
111                           io.grpc.protobuf.ProtoUtils.marshaller(
112                               com.google.cloud.talent.v4.Company.getDefaultInstance()))
113                       .setSchemaDescriptor(new CompanyServiceMethodDescriptorSupplier("GetCompany"))
114                       .build();
115         }
116       }
117     }
118     return getGetCompanyMethod;
119   }
120 
121   private static volatile io.grpc.MethodDescriptor<
122           com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company>
123       getUpdateCompanyMethod;
124 
125   @io.grpc.stub.annotations.RpcMethod(
126       fullMethodName = SERVICE_NAME + '/' + "UpdateCompany",
127       requestType = com.google.cloud.talent.v4.UpdateCompanyRequest.class,
128       responseType = com.google.cloud.talent.v4.Company.class,
129       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
130   public static io.grpc.MethodDescriptor<
131           com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company>
getUpdateCompanyMethod()132       getUpdateCompanyMethod() {
133     io.grpc.MethodDescriptor<
134             com.google.cloud.talent.v4.UpdateCompanyRequest, com.google.cloud.talent.v4.Company>
135         getUpdateCompanyMethod;
136     if ((getUpdateCompanyMethod = CompanyServiceGrpc.getUpdateCompanyMethod) == null) {
137       synchronized (CompanyServiceGrpc.class) {
138         if ((getUpdateCompanyMethod = CompanyServiceGrpc.getUpdateCompanyMethod) == null) {
139           CompanyServiceGrpc.getUpdateCompanyMethod =
140               getUpdateCompanyMethod =
141                   io.grpc.MethodDescriptor
142                       .<com.google.cloud.talent.v4.UpdateCompanyRequest,
143                           com.google.cloud.talent.v4.Company>
144                           newBuilder()
145                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
146                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCompany"))
147                       .setSampledToLocalTracing(true)
148                       .setRequestMarshaller(
149                           io.grpc.protobuf.ProtoUtils.marshaller(
150                               com.google.cloud.talent.v4.UpdateCompanyRequest.getDefaultInstance()))
151                       .setResponseMarshaller(
152                           io.grpc.protobuf.ProtoUtils.marshaller(
153                               com.google.cloud.talent.v4.Company.getDefaultInstance()))
154                       .setSchemaDescriptor(
155                           new CompanyServiceMethodDescriptorSupplier("UpdateCompany"))
156                       .build();
157         }
158       }
159     }
160     return getUpdateCompanyMethod;
161   }
162 
163   private static volatile io.grpc.MethodDescriptor<
164           com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>
165       getDeleteCompanyMethod;
166 
167   @io.grpc.stub.annotations.RpcMethod(
168       fullMethodName = SERVICE_NAME + '/' + "DeleteCompany",
169       requestType = com.google.cloud.talent.v4.DeleteCompanyRequest.class,
170       responseType = com.google.protobuf.Empty.class,
171       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
172   public static io.grpc.MethodDescriptor<
173           com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>
getDeleteCompanyMethod()174       getDeleteCompanyMethod() {
175     io.grpc.MethodDescriptor<
176             com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>
177         getDeleteCompanyMethod;
178     if ((getDeleteCompanyMethod = CompanyServiceGrpc.getDeleteCompanyMethod) == null) {
179       synchronized (CompanyServiceGrpc.class) {
180         if ((getDeleteCompanyMethod = CompanyServiceGrpc.getDeleteCompanyMethod) == null) {
181           CompanyServiceGrpc.getDeleteCompanyMethod =
182               getDeleteCompanyMethod =
183                   io.grpc.MethodDescriptor
184                       .<com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>
185                           newBuilder()
186                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
187                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCompany"))
188                       .setSampledToLocalTracing(true)
189                       .setRequestMarshaller(
190                           io.grpc.protobuf.ProtoUtils.marshaller(
191                               com.google.cloud.talent.v4.DeleteCompanyRequest.getDefaultInstance()))
192                       .setResponseMarshaller(
193                           io.grpc.protobuf.ProtoUtils.marshaller(
194                               com.google.protobuf.Empty.getDefaultInstance()))
195                       .setSchemaDescriptor(
196                           new CompanyServiceMethodDescriptorSupplier("DeleteCompany"))
197                       .build();
198         }
199       }
200     }
201     return getDeleteCompanyMethod;
202   }
203 
204   private static volatile io.grpc.MethodDescriptor<
205           com.google.cloud.talent.v4.ListCompaniesRequest,
206           com.google.cloud.talent.v4.ListCompaniesResponse>
207       getListCompaniesMethod;
208 
209   @io.grpc.stub.annotations.RpcMethod(
210       fullMethodName = SERVICE_NAME + '/' + "ListCompanies",
211       requestType = com.google.cloud.talent.v4.ListCompaniesRequest.class,
212       responseType = com.google.cloud.talent.v4.ListCompaniesResponse.class,
213       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
214   public static io.grpc.MethodDescriptor<
215           com.google.cloud.talent.v4.ListCompaniesRequest,
216           com.google.cloud.talent.v4.ListCompaniesResponse>
getListCompaniesMethod()217       getListCompaniesMethod() {
218     io.grpc.MethodDescriptor<
219             com.google.cloud.talent.v4.ListCompaniesRequest,
220             com.google.cloud.talent.v4.ListCompaniesResponse>
221         getListCompaniesMethod;
222     if ((getListCompaniesMethod = CompanyServiceGrpc.getListCompaniesMethod) == null) {
223       synchronized (CompanyServiceGrpc.class) {
224         if ((getListCompaniesMethod = CompanyServiceGrpc.getListCompaniesMethod) == null) {
225           CompanyServiceGrpc.getListCompaniesMethod =
226               getListCompaniesMethod =
227                   io.grpc.MethodDescriptor
228                       .<com.google.cloud.talent.v4.ListCompaniesRequest,
229                           com.google.cloud.talent.v4.ListCompaniesResponse>
230                           newBuilder()
231                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
232                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCompanies"))
233                       .setSampledToLocalTracing(true)
234                       .setRequestMarshaller(
235                           io.grpc.protobuf.ProtoUtils.marshaller(
236                               com.google.cloud.talent.v4.ListCompaniesRequest.getDefaultInstance()))
237                       .setResponseMarshaller(
238                           io.grpc.protobuf.ProtoUtils.marshaller(
239                               com.google.cloud.talent.v4.ListCompaniesResponse
240                                   .getDefaultInstance()))
241                       .setSchemaDescriptor(
242                           new CompanyServiceMethodDescriptorSupplier("ListCompanies"))
243                       .build();
244         }
245       }
246     }
247     return getListCompaniesMethod;
248   }
249 
250   /** Creates a new async stub that supports all call types for the service */
newStub(io.grpc.Channel channel)251   public static CompanyServiceStub newStub(io.grpc.Channel channel) {
252     io.grpc.stub.AbstractStub.StubFactory<CompanyServiceStub> factory =
253         new io.grpc.stub.AbstractStub.StubFactory<CompanyServiceStub>() {
254           @java.lang.Override
255           public CompanyServiceStub newStub(
256               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
257             return new CompanyServiceStub(channel, callOptions);
258           }
259         };
260     return CompanyServiceStub.newStub(factory, channel);
261   }
262 
263   /**
264    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
265    */
newBlockingStub(io.grpc.Channel channel)266   public static CompanyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) {
267     io.grpc.stub.AbstractStub.StubFactory<CompanyServiceBlockingStub> factory =
268         new io.grpc.stub.AbstractStub.StubFactory<CompanyServiceBlockingStub>() {
269           @java.lang.Override
270           public CompanyServiceBlockingStub newStub(
271               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
272             return new CompanyServiceBlockingStub(channel, callOptions);
273           }
274         };
275     return CompanyServiceBlockingStub.newStub(factory, channel);
276   }
277 
278   /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
newFutureStub(io.grpc.Channel channel)279   public static CompanyServiceFutureStub newFutureStub(io.grpc.Channel channel) {
280     io.grpc.stub.AbstractStub.StubFactory<CompanyServiceFutureStub> factory =
281         new io.grpc.stub.AbstractStub.StubFactory<CompanyServiceFutureStub>() {
282           @java.lang.Override
283           public CompanyServiceFutureStub newStub(
284               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
285             return new CompanyServiceFutureStub(channel, callOptions);
286           }
287         };
288     return CompanyServiceFutureStub.newStub(factory, channel);
289   }
290 
291   /**
292    *
293    *
294    * <pre>
295    * A service that handles company management, including CRUD and enumeration.
296    * </pre>
297    */
298   public interface AsyncService {
299 
300     /**
301      *
302      *
303      * <pre>
304      * Creates a new company entity.
305      * </pre>
306      */
createCompany( com.google.cloud.talent.v4.CreateCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)307     default void createCompany(
308         com.google.cloud.talent.v4.CreateCompanyRequest request,
309         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
310       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
311           getCreateCompanyMethod(), responseObserver);
312     }
313 
314     /**
315      *
316      *
317      * <pre>
318      * Retrieves specified company.
319      * </pre>
320      */
getCompany( com.google.cloud.talent.v4.GetCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)321     default void getCompany(
322         com.google.cloud.talent.v4.GetCompanyRequest request,
323         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
324       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCompanyMethod(), responseObserver);
325     }
326 
327     /**
328      *
329      *
330      * <pre>
331      * Updates specified company.
332      * </pre>
333      */
updateCompany( com.google.cloud.talent.v4.UpdateCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)334     default void updateCompany(
335         com.google.cloud.talent.v4.UpdateCompanyRequest request,
336         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
337       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
338           getUpdateCompanyMethod(), responseObserver);
339     }
340 
341     /**
342      *
343      *
344      * <pre>
345      * Deletes specified company.
346      * Prerequisite: The company has no jobs associated with it.
347      * </pre>
348      */
deleteCompany( com.google.cloud.talent.v4.DeleteCompanyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)349     default void deleteCompany(
350         com.google.cloud.talent.v4.DeleteCompanyRequest request,
351         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
352       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
353           getDeleteCompanyMethod(), responseObserver);
354     }
355 
356     /**
357      *
358      *
359      * <pre>
360      * Lists all companies associated with the project.
361      * </pre>
362      */
listCompanies( com.google.cloud.talent.v4.ListCompaniesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.ListCompaniesResponse> responseObserver)363     default void listCompanies(
364         com.google.cloud.talent.v4.ListCompaniesRequest request,
365         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.ListCompaniesResponse>
366             responseObserver) {
367       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
368           getListCompaniesMethod(), responseObserver);
369     }
370   }
371 
372   /**
373    * Base class for the server implementation of the service CompanyService.
374    *
375    * <pre>
376    * A service that handles company management, including CRUD and enumeration.
377    * </pre>
378    */
379   public abstract static class CompanyServiceImplBase
380       implements io.grpc.BindableService, AsyncService {
381 
382     @java.lang.Override
bindService()383     public final io.grpc.ServerServiceDefinition bindService() {
384       return CompanyServiceGrpc.bindService(this);
385     }
386   }
387 
388   /**
389    * A stub to allow clients to do asynchronous rpc calls to service CompanyService.
390    *
391    * <pre>
392    * A service that handles company management, including CRUD and enumeration.
393    * </pre>
394    */
395   public static final class CompanyServiceStub
396       extends io.grpc.stub.AbstractAsyncStub<CompanyServiceStub> {
CompanyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)397     private CompanyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
398       super(channel, callOptions);
399     }
400 
401     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)402     protected CompanyServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
403       return new CompanyServiceStub(channel, callOptions);
404     }
405 
406     /**
407      *
408      *
409      * <pre>
410      * Creates a new company entity.
411      * </pre>
412      */
createCompany( com.google.cloud.talent.v4.CreateCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)413     public void createCompany(
414         com.google.cloud.talent.v4.CreateCompanyRequest request,
415         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
416       io.grpc.stub.ClientCalls.asyncUnaryCall(
417           getChannel().newCall(getCreateCompanyMethod(), getCallOptions()),
418           request,
419           responseObserver);
420     }
421 
422     /**
423      *
424      *
425      * <pre>
426      * Retrieves specified company.
427      * </pre>
428      */
getCompany( com.google.cloud.talent.v4.GetCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)429     public void getCompany(
430         com.google.cloud.talent.v4.GetCompanyRequest request,
431         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
432       io.grpc.stub.ClientCalls.asyncUnaryCall(
433           getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request, responseObserver);
434     }
435 
436     /**
437      *
438      *
439      * <pre>
440      * Updates specified company.
441      * </pre>
442      */
updateCompany( com.google.cloud.talent.v4.UpdateCompanyRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver)443     public void updateCompany(
444         com.google.cloud.talent.v4.UpdateCompanyRequest request,
445         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company> responseObserver) {
446       io.grpc.stub.ClientCalls.asyncUnaryCall(
447           getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()),
448           request,
449           responseObserver);
450     }
451 
452     /**
453      *
454      *
455      * <pre>
456      * Deletes specified company.
457      * Prerequisite: The company has no jobs associated with it.
458      * </pre>
459      */
deleteCompany( com.google.cloud.talent.v4.DeleteCompanyRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)460     public void deleteCompany(
461         com.google.cloud.talent.v4.DeleteCompanyRequest request,
462         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
463       io.grpc.stub.ClientCalls.asyncUnaryCall(
464           getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()),
465           request,
466           responseObserver);
467     }
468 
469     /**
470      *
471      *
472      * <pre>
473      * Lists all companies associated with the project.
474      * </pre>
475      */
listCompanies( com.google.cloud.talent.v4.ListCompaniesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.ListCompaniesResponse> responseObserver)476     public void listCompanies(
477         com.google.cloud.talent.v4.ListCompaniesRequest request,
478         io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.ListCompaniesResponse>
479             responseObserver) {
480       io.grpc.stub.ClientCalls.asyncUnaryCall(
481           getChannel().newCall(getListCompaniesMethod(), getCallOptions()),
482           request,
483           responseObserver);
484     }
485   }
486 
487   /**
488    * A stub to allow clients to do synchronous rpc calls to service CompanyService.
489    *
490    * <pre>
491    * A service that handles company management, including CRUD and enumeration.
492    * </pre>
493    */
494   public static final class CompanyServiceBlockingStub
495       extends io.grpc.stub.AbstractBlockingStub<CompanyServiceBlockingStub> {
CompanyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)496     private CompanyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
497       super(channel, callOptions);
498     }
499 
500     @java.lang.Override
build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)501     protected CompanyServiceBlockingStub build(
502         io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
503       return new CompanyServiceBlockingStub(channel, callOptions);
504     }
505 
506     /**
507      *
508      *
509      * <pre>
510      * Creates a new company entity.
511      * </pre>
512      */
createCompany( com.google.cloud.talent.v4.CreateCompanyRequest request)513     public com.google.cloud.talent.v4.Company createCompany(
514         com.google.cloud.talent.v4.CreateCompanyRequest request) {
515       return io.grpc.stub.ClientCalls.blockingUnaryCall(
516           getChannel(), getCreateCompanyMethod(), getCallOptions(), request);
517     }
518 
519     /**
520      *
521      *
522      * <pre>
523      * Retrieves specified company.
524      * </pre>
525      */
getCompany( com.google.cloud.talent.v4.GetCompanyRequest request)526     public com.google.cloud.talent.v4.Company getCompany(
527         com.google.cloud.talent.v4.GetCompanyRequest request) {
528       return io.grpc.stub.ClientCalls.blockingUnaryCall(
529           getChannel(), getGetCompanyMethod(), getCallOptions(), request);
530     }
531 
532     /**
533      *
534      *
535      * <pre>
536      * Updates specified company.
537      * </pre>
538      */
updateCompany( com.google.cloud.talent.v4.UpdateCompanyRequest request)539     public com.google.cloud.talent.v4.Company updateCompany(
540         com.google.cloud.talent.v4.UpdateCompanyRequest request) {
541       return io.grpc.stub.ClientCalls.blockingUnaryCall(
542           getChannel(), getUpdateCompanyMethod(), getCallOptions(), request);
543     }
544 
545     /**
546      *
547      *
548      * <pre>
549      * Deletes specified company.
550      * Prerequisite: The company has no jobs associated with it.
551      * </pre>
552      */
deleteCompany( com.google.cloud.talent.v4.DeleteCompanyRequest request)553     public com.google.protobuf.Empty deleteCompany(
554         com.google.cloud.talent.v4.DeleteCompanyRequest request) {
555       return io.grpc.stub.ClientCalls.blockingUnaryCall(
556           getChannel(), getDeleteCompanyMethod(), getCallOptions(), request);
557     }
558 
559     /**
560      *
561      *
562      * <pre>
563      * Lists all companies associated with the project.
564      * </pre>
565      */
listCompanies( com.google.cloud.talent.v4.ListCompaniesRequest request)566     public com.google.cloud.talent.v4.ListCompaniesResponse listCompanies(
567         com.google.cloud.talent.v4.ListCompaniesRequest request) {
568       return io.grpc.stub.ClientCalls.blockingUnaryCall(
569           getChannel(), getListCompaniesMethod(), getCallOptions(), request);
570     }
571   }
572 
573   /**
574    * A stub to allow clients to do ListenableFuture-style rpc calls to service CompanyService.
575    *
576    * <pre>
577    * A service that handles company management, including CRUD and enumeration.
578    * </pre>
579    */
580   public static final class CompanyServiceFutureStub
581       extends io.grpc.stub.AbstractFutureStub<CompanyServiceFutureStub> {
CompanyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)582     private CompanyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
583       super(channel, callOptions);
584     }
585 
586     @java.lang.Override
build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)587     protected CompanyServiceFutureStub build(
588         io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
589       return new CompanyServiceFutureStub(channel, callOptions);
590     }
591 
592     /**
593      *
594      *
595      * <pre>
596      * Creates a new company entity.
597      * </pre>
598      */
599     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.talent.v4.Company>
createCompany(com.google.cloud.talent.v4.CreateCompanyRequest request)600         createCompany(com.google.cloud.talent.v4.CreateCompanyRequest request) {
601       return io.grpc.stub.ClientCalls.futureUnaryCall(
602           getChannel().newCall(getCreateCompanyMethod(), getCallOptions()), request);
603     }
604 
605     /**
606      *
607      *
608      * <pre>
609      * Retrieves specified company.
610      * </pre>
611      */
612     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.talent.v4.Company>
getCompany(com.google.cloud.talent.v4.GetCompanyRequest request)613         getCompany(com.google.cloud.talent.v4.GetCompanyRequest request) {
614       return io.grpc.stub.ClientCalls.futureUnaryCall(
615           getChannel().newCall(getGetCompanyMethod(), getCallOptions()), request);
616     }
617 
618     /**
619      *
620      *
621      * <pre>
622      * Updates specified company.
623      * </pre>
624      */
625     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.talent.v4.Company>
updateCompany(com.google.cloud.talent.v4.UpdateCompanyRequest request)626         updateCompany(com.google.cloud.talent.v4.UpdateCompanyRequest request) {
627       return io.grpc.stub.ClientCalls.futureUnaryCall(
628           getChannel().newCall(getUpdateCompanyMethod(), getCallOptions()), request);
629     }
630 
631     /**
632      *
633      *
634      * <pre>
635      * Deletes specified company.
636      * Prerequisite: The company has no jobs associated with it.
637      * </pre>
638      */
639     public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
deleteCompany(com.google.cloud.talent.v4.DeleteCompanyRequest request)640         deleteCompany(com.google.cloud.talent.v4.DeleteCompanyRequest request) {
641       return io.grpc.stub.ClientCalls.futureUnaryCall(
642           getChannel().newCall(getDeleteCompanyMethod(), getCallOptions()), request);
643     }
644 
645     /**
646      *
647      *
648      * <pre>
649      * Lists all companies associated with the project.
650      * </pre>
651      */
652     public com.google.common.util.concurrent.ListenableFuture<
653             com.google.cloud.talent.v4.ListCompaniesResponse>
listCompanies(com.google.cloud.talent.v4.ListCompaniesRequest request)654         listCompanies(com.google.cloud.talent.v4.ListCompaniesRequest request) {
655       return io.grpc.stub.ClientCalls.futureUnaryCall(
656           getChannel().newCall(getListCompaniesMethod(), getCallOptions()), request);
657     }
658   }
659 
660   private static final int METHODID_CREATE_COMPANY = 0;
661   private static final int METHODID_GET_COMPANY = 1;
662   private static final int METHODID_UPDATE_COMPANY = 2;
663   private static final int METHODID_DELETE_COMPANY = 3;
664   private static final int METHODID_LIST_COMPANIES = 4;
665 
666   private static final class MethodHandlers<Req, Resp>
667       implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
668           io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
669           io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
670           io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
671     private final AsyncService serviceImpl;
672     private final int methodId;
673 
MethodHandlers(AsyncService serviceImpl, int methodId)674     MethodHandlers(AsyncService serviceImpl, int methodId) {
675       this.serviceImpl = serviceImpl;
676       this.methodId = methodId;
677     }
678 
679     @java.lang.Override
680     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)681     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
682       switch (methodId) {
683         case METHODID_CREATE_COMPANY:
684           serviceImpl.createCompany(
685               (com.google.cloud.talent.v4.CreateCompanyRequest) request,
686               (io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company>) responseObserver);
687           break;
688         case METHODID_GET_COMPANY:
689           serviceImpl.getCompany(
690               (com.google.cloud.talent.v4.GetCompanyRequest) request,
691               (io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company>) responseObserver);
692           break;
693         case METHODID_UPDATE_COMPANY:
694           serviceImpl.updateCompany(
695               (com.google.cloud.talent.v4.UpdateCompanyRequest) request,
696               (io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.Company>) responseObserver);
697           break;
698         case METHODID_DELETE_COMPANY:
699           serviceImpl.deleteCompany(
700               (com.google.cloud.talent.v4.DeleteCompanyRequest) request,
701               (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver);
702           break;
703         case METHODID_LIST_COMPANIES:
704           serviceImpl.listCompanies(
705               (com.google.cloud.talent.v4.ListCompaniesRequest) request,
706               (io.grpc.stub.StreamObserver<com.google.cloud.talent.v4.ListCompaniesResponse>)
707                   responseObserver);
708           break;
709         default:
710           throw new AssertionError();
711       }
712     }
713 
714     @java.lang.Override
715     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)716     public io.grpc.stub.StreamObserver<Req> invoke(
717         io.grpc.stub.StreamObserver<Resp> responseObserver) {
718       switch (methodId) {
719         default:
720           throw new AssertionError();
721       }
722     }
723   }
724 
bindService(AsyncService service)725   public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
726     return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
727         .addMethod(
728             getCreateCompanyMethod(),
729             io.grpc.stub.ServerCalls.asyncUnaryCall(
730                 new MethodHandlers<
731                     com.google.cloud.talent.v4.CreateCompanyRequest,
732                     com.google.cloud.talent.v4.Company>(service, METHODID_CREATE_COMPANY)))
733         .addMethod(
734             getGetCompanyMethod(),
735             io.grpc.stub.ServerCalls.asyncUnaryCall(
736                 new MethodHandlers<
737                     com.google.cloud.talent.v4.GetCompanyRequest,
738                     com.google.cloud.talent.v4.Company>(service, METHODID_GET_COMPANY)))
739         .addMethod(
740             getUpdateCompanyMethod(),
741             io.grpc.stub.ServerCalls.asyncUnaryCall(
742                 new MethodHandlers<
743                     com.google.cloud.talent.v4.UpdateCompanyRequest,
744                     com.google.cloud.talent.v4.Company>(service, METHODID_UPDATE_COMPANY)))
745         .addMethod(
746             getDeleteCompanyMethod(),
747             io.grpc.stub.ServerCalls.asyncUnaryCall(
748                 new MethodHandlers<
749                     com.google.cloud.talent.v4.DeleteCompanyRequest, com.google.protobuf.Empty>(
750                     service, METHODID_DELETE_COMPANY)))
751         .addMethod(
752             getListCompaniesMethod(),
753             io.grpc.stub.ServerCalls.asyncUnaryCall(
754                 new MethodHandlers<
755                     com.google.cloud.talent.v4.ListCompaniesRequest,
756                     com.google.cloud.talent.v4.ListCompaniesResponse>(
757                     service, METHODID_LIST_COMPANIES)))
758         .build();
759   }
760 
761   private abstract static class CompanyServiceBaseDescriptorSupplier
762       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
763           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
CompanyServiceBaseDescriptorSupplier()764     CompanyServiceBaseDescriptorSupplier() {}
765 
766     @java.lang.Override
getFileDescriptor()767     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
768       return com.google.cloud.talent.v4.CompanyServiceProto.getDescriptor();
769     }
770 
771     @java.lang.Override
getServiceDescriptor()772     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
773       return getFileDescriptor().findServiceByName("CompanyService");
774     }
775   }
776 
777   private static final class CompanyServiceFileDescriptorSupplier
778       extends CompanyServiceBaseDescriptorSupplier {
CompanyServiceFileDescriptorSupplier()779     CompanyServiceFileDescriptorSupplier() {}
780   }
781 
782   private static final class CompanyServiceMethodDescriptorSupplier
783       extends CompanyServiceBaseDescriptorSupplier
784       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
785     private final String methodName;
786 
CompanyServiceMethodDescriptorSupplier(String methodName)787     CompanyServiceMethodDescriptorSupplier(String methodName) {
788       this.methodName = methodName;
789     }
790 
791     @java.lang.Override
getMethodDescriptor()792     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
793       return getServiceDescriptor().findMethodByName(methodName);
794     }
795   }
796 
797   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
798 
getServiceDescriptor()799   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
800     io.grpc.ServiceDescriptor result = serviceDescriptor;
801     if (result == null) {
802       synchronized (CompanyServiceGrpc.class) {
803         result = serviceDescriptor;
804         if (result == null) {
805           serviceDescriptor =
806               result =
807                   io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
808                       .setSchemaDescriptor(new CompanyServiceFileDescriptorSupplier())
809                       .addMethod(getCreateCompanyMethod())
810                       .addMethod(getGetCompanyMethod())
811                       .addMethod(getUpdateCompanyMethod())
812                       .addMethod(getDeleteCompanyMethod())
813                       .addMethod(getListCompaniesMethod())
814                       .build();
815         }
816       }
817     }
818     return result;
819   }
820 }
821