Class GrpcTranslationServiceStub
- java.lang.Object
-
- com.google.cloud.translate.v3.stub.TranslationServiceStub
-
- com.google.cloud.translate.v3.stub.GrpcTranslationServiceStub
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@Generated("by gapic-generator-java") public class GrpcTranslationServiceStub extends TranslationServiceStub
gRPC stub implementation for the TranslationService service API.This class is for advanced usage and reflects the underlying API directly.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GrpcTranslationServiceStub(TranslationServiceStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext)
Constructs an instance of GrpcTranslationServiceStub, using the given settings.protected
GrpcTranslationServiceStub(TranslationServiceStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory)
Constructs an instance of GrpcTranslationServiceStub, using the given settings.
-
Method Summary
-
Methods inherited from class com.google.cloud.translate.v3.stub.TranslationServiceStub
getHttpJsonOperationsStub
-
-
-
-
Constructor Detail
-
GrpcTranslationServiceStub
protected GrpcTranslationServiceStub(TranslationServiceStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext) throws IOException
Constructs an instance of GrpcTranslationServiceStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
GrpcTranslationServiceStub
protected GrpcTranslationServiceStub(TranslationServiceStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory) throws IOException
Constructs an instance of GrpcTranslationServiceStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
-
Method Detail
-
create
public static final GrpcTranslationServiceStub create(TranslationServiceStubSettings settings) throws IOException
- Throws:
IOException
-
create
public static final GrpcTranslationServiceStub create(com.google.api.gax.rpc.ClientContext clientContext) throws IOException
- Throws:
IOException
-
create
public static final GrpcTranslationServiceStub create(com.google.api.gax.rpc.ClientContext clientContext, com.google.api.gax.grpc.GrpcStubCallableFactory callableFactory) throws IOException
- Throws:
IOException
-
getOperationsStub
public com.google.longrunning.stub.GrpcOperationsStub getOperationsStub()
- Overrides:
getOperationsStub
in classTranslationServiceStub
-
translateTextCallable
public com.google.api.gax.rpc.UnaryCallable<TranslateTextRequest,TranslateTextResponse> translateTextCallable()
- Overrides:
translateTextCallable
in classTranslationServiceStub
-
detectLanguageCallable
public com.google.api.gax.rpc.UnaryCallable<DetectLanguageRequest,DetectLanguageResponse> detectLanguageCallable()
- Overrides:
detectLanguageCallable
in classTranslationServiceStub
-
getSupportedLanguagesCallable
public com.google.api.gax.rpc.UnaryCallable<GetSupportedLanguagesRequest,SupportedLanguages> getSupportedLanguagesCallable()
- Overrides:
getSupportedLanguagesCallable
in classTranslationServiceStub
-
translateDocumentCallable
public com.google.api.gax.rpc.UnaryCallable<TranslateDocumentRequest,TranslateDocumentResponse> translateDocumentCallable()
- Overrides:
translateDocumentCallable
in classTranslationServiceStub
-
batchTranslateTextCallable
public com.google.api.gax.rpc.UnaryCallable<BatchTranslateTextRequest,com.google.longrunning.Operation> batchTranslateTextCallable()
- Overrides:
batchTranslateTextCallable
in classTranslationServiceStub
-
batchTranslateTextOperationCallable
public com.google.api.gax.rpc.OperationCallable<BatchTranslateTextRequest,BatchTranslateResponse,BatchTranslateMetadata> batchTranslateTextOperationCallable()
- Overrides:
batchTranslateTextOperationCallable
in classTranslationServiceStub
-
batchTranslateDocumentCallable
public com.google.api.gax.rpc.UnaryCallable<BatchTranslateDocumentRequest,com.google.longrunning.Operation> batchTranslateDocumentCallable()
- Overrides:
batchTranslateDocumentCallable
in classTranslationServiceStub
-
batchTranslateDocumentOperationCallable
public com.google.api.gax.rpc.OperationCallable<BatchTranslateDocumentRequest,BatchTranslateDocumentResponse,BatchTranslateDocumentMetadata> batchTranslateDocumentOperationCallable()
- Overrides:
batchTranslateDocumentOperationCallable
in classTranslationServiceStub
-
createGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<CreateGlossaryRequest,com.google.longrunning.Operation> createGlossaryCallable()
- Overrides:
createGlossaryCallable
in classTranslationServiceStub
-
createGlossaryOperationCallable
public com.google.api.gax.rpc.OperationCallable<CreateGlossaryRequest,Glossary,CreateGlossaryMetadata> createGlossaryOperationCallable()
- Overrides:
createGlossaryOperationCallable
in classTranslationServiceStub
-
listGlossariesCallable
public com.google.api.gax.rpc.UnaryCallable<ListGlossariesRequest,ListGlossariesResponse> listGlossariesCallable()
- Overrides:
listGlossariesCallable
in classTranslationServiceStub
-
listGlossariesPagedCallable
public com.google.api.gax.rpc.UnaryCallable<ListGlossariesRequest,TranslationServiceClient.ListGlossariesPagedResponse> listGlossariesPagedCallable()
- Overrides:
listGlossariesPagedCallable
in classTranslationServiceStub
-
getGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<GetGlossaryRequest,Glossary> getGlossaryCallable()
- Overrides:
getGlossaryCallable
in classTranslationServiceStub
-
deleteGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<DeleteGlossaryRequest,com.google.longrunning.Operation> deleteGlossaryCallable()
- Overrides:
deleteGlossaryCallable
in classTranslationServiceStub
-
deleteGlossaryOperationCallable
public com.google.api.gax.rpc.OperationCallable<DeleteGlossaryRequest,DeleteGlossaryResponse,DeleteGlossaryMetadata> deleteGlossaryOperationCallable()
- Overrides:
deleteGlossaryOperationCallable
in classTranslationServiceStub
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classTranslationServiceStub
-
shutdown
public void shutdown()
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
shutdownNow
public void shutdownNow()
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Throws:
InterruptedException
-
-