Class GrpcTranslationServiceStub
- java.lang.Object
-
- com.google.cloud.translate.v3beta1.stub.TranslationServiceStub
-
- com.google.cloud.translate.v3beta1.stub.GrpcTranslationServiceStub
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource,AutoCloseable
@BetaApi @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 protectedGrpcTranslationServiceStub(TranslationServiceStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext)Constructs an instance of GrpcTranslationServiceStub, using the given settings.protectedGrpcTranslationServiceStub(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.v3beta1.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:
getOperationsStubin classTranslationServiceStub
-
translateTextCallable
public com.google.api.gax.rpc.UnaryCallable<TranslateTextRequest,TranslateTextResponse> translateTextCallable()
- Overrides:
translateTextCallablein classTranslationServiceStub
-
detectLanguageCallable
public com.google.api.gax.rpc.UnaryCallable<DetectLanguageRequest,DetectLanguageResponse> detectLanguageCallable()
- Overrides:
detectLanguageCallablein classTranslationServiceStub
-
getSupportedLanguagesCallable
public com.google.api.gax.rpc.UnaryCallable<GetSupportedLanguagesRequest,SupportedLanguages> getSupportedLanguagesCallable()
- Overrides:
getSupportedLanguagesCallablein classTranslationServiceStub
-
translateDocumentCallable
public com.google.api.gax.rpc.UnaryCallable<TranslateDocumentRequest,TranslateDocumentResponse> translateDocumentCallable()
- Overrides:
translateDocumentCallablein classTranslationServiceStub
-
batchTranslateTextCallable
public com.google.api.gax.rpc.UnaryCallable<BatchTranslateTextRequest,com.google.longrunning.Operation> batchTranslateTextCallable()
- Overrides:
batchTranslateTextCallablein classTranslationServiceStub
-
batchTranslateTextOperationCallable
public com.google.api.gax.rpc.OperationCallable<BatchTranslateTextRequest,BatchTranslateResponse,BatchTranslateMetadata> batchTranslateTextOperationCallable()
- Overrides:
batchTranslateTextOperationCallablein classTranslationServiceStub
-
batchTranslateDocumentCallable
public com.google.api.gax.rpc.UnaryCallable<BatchTranslateDocumentRequest,com.google.longrunning.Operation> batchTranslateDocumentCallable()
- Overrides:
batchTranslateDocumentCallablein classTranslationServiceStub
-
batchTranslateDocumentOperationCallable
public com.google.api.gax.rpc.OperationCallable<BatchTranslateDocumentRequest,BatchTranslateDocumentResponse,BatchTranslateDocumentMetadata> batchTranslateDocumentOperationCallable()
- Overrides:
batchTranslateDocumentOperationCallablein classTranslationServiceStub
-
createGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<CreateGlossaryRequest,com.google.longrunning.Operation> createGlossaryCallable()
- Overrides:
createGlossaryCallablein classTranslationServiceStub
-
createGlossaryOperationCallable
public com.google.api.gax.rpc.OperationCallable<CreateGlossaryRequest,Glossary,CreateGlossaryMetadata> createGlossaryOperationCallable()
- Overrides:
createGlossaryOperationCallablein classTranslationServiceStub
-
listGlossariesCallable
public com.google.api.gax.rpc.UnaryCallable<ListGlossariesRequest,ListGlossariesResponse> listGlossariesCallable()
- Overrides:
listGlossariesCallablein classTranslationServiceStub
-
listGlossariesPagedCallable
public com.google.api.gax.rpc.UnaryCallable<ListGlossariesRequest,TranslationServiceClient.ListGlossariesPagedResponse> listGlossariesPagedCallable()
- Overrides:
listGlossariesPagedCallablein classTranslationServiceStub
-
getGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<GetGlossaryRequest,Glossary> getGlossaryCallable()
- Overrides:
getGlossaryCallablein classTranslationServiceStub
-
deleteGlossaryCallable
public com.google.api.gax.rpc.UnaryCallable<DeleteGlossaryRequest,com.google.longrunning.Operation> deleteGlossaryCallable()
- Overrides:
deleteGlossaryCallablein classTranslationServiceStub
-
deleteGlossaryOperationCallable
public com.google.api.gax.rpc.OperationCallable<DeleteGlossaryRequest,DeleteGlossaryResponse,DeleteGlossaryMetadata> deleteGlossaryOperationCallable()
- Overrides:
deleteGlossaryOperationCallablein classTranslationServiceStub
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein 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
-
-