Home
last modified time | relevance | path

Searched full:translateoptions (Results 1 – 17 of 17) sorted by relevance

/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/testing/
H A DRemoteTranslateHelper.java22 import com.google.cloud.translate.TranslateOptions;
32 * TranslateOptions#getRetrySettings()}: {@link RetrySettings#getMaxAttempts()} is {@code 10},
42 private final TranslateOptions options;
44 private RemoteTranslateHelper(TranslateOptions options) { in RemoteTranslateHelper()
48 /** Returns a {@link TranslateOptions} object to be used for testing. */
49 public TranslateOptions getOptions() { in getOptions()
66 HttpTransportOptions transportOptions = TranslateOptions.getDefaultHttpTransportOptions(); in create()
69 TranslateOptions translateOptions = in create() local
70 TranslateOptions.newBuilder() in create()
76 return new RemoteTranslateHelper(translateOptions); in create()
[all …]
/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/
H A DTranslateOptions.java39 public class TranslateOptions extends ServiceOptions<Translate, TranslateOptions> { class
41 private static final Logger logger = Logger.getLogger(TranslateOptions.class.getName());
58 public Translate create(TranslateOptions options) { in create()
68 public ServiceRpc create(TranslateOptions options) { in create()
73 public static class Builder extends ServiceOptions.Builder<Translate, TranslateOptions, Builder> {
80 private Builder(TranslateOptions options) { in Builder()
137 public TranslateOptions build() { in build()
138 return new TranslateOptions(this); in build()
142 private TranslateOptions(Builder builder) { in TranslateOptions() method in TranslateOptions
182 private static class TranslateDefaults implements ServiceDefaults<Translate, TranslateOptions> {
[all …]
H A DTranslate.java29 public interface Translate extends Service<TranslateOptions> {
42 * returned by {@link TranslateOptions#getTargetLanguage()} is used. When provided, the returned
74 * returned by {@link TranslateOptions#getTargetLanguage()} is used.
111 * TranslateOptions#getTargetLanguage()}.
114 * TranslateOptions#getTargetLanguage()}:
120 * // Translate translate = TranslateOptions.getDefaultInstance().getService();
137 * // Translate translate = TranslateOptions.getDefaultInstance().getService();
160 * // Translate translate = TranslateOptions.getDefaultInstance().getService();
260 * // Translate translate = TranslateOptions.getDefaultInstance().getService();
H A Dpackage-info.java25 * {@link com.google.cloud.translate.TranslateOptions.Builder#setApiKey(java.lang.String)} to set an
31 * {@code Translate translate = TranslateOptions.getDefaultInstance().getService();
H A DTranslateImpl.java39 final class TranslateImpl extends BaseService<TranslateOptions> implements Translate {
52 TranslateImpl(TranslateOptions options) { in TranslateImpl()
H A DTranslateFactory.java22 public interface TranslateFactory extends ServiceFactory<Translate, TranslateOptions> {}
/aosp_15_r20/external/google-cloud-java/java-translate/
H A D.readme-partials.yaml16 import com.google.cloud.translate.TranslateOptions;
18 Translate translate = TranslateOptions.getDefaultInstance().getService();
23 …methods on the Translation service created via `TranslateOptions.getDefaultInstance().getService()…
27 Translate translate = TranslateOptions.newBuilder().setApiKey("myKey").build().getService();
H A DREADME.md108 import com.google.cloud.translate.TranslateOptions;
110 Translate translate = TranslateOptions.getDefaultInstance().getService();
115 methods on the Translation service created via `TranslateOptions.getDefaultInstance().getService()`.
119 Translate translate = TranslateOptions.newBuilder().setApiKey("myKey").build().getService();
/aosp_15_r20/external/google-cloud-java/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/
H A DTranslateExample.java22 import com.google.cloud.translate.TranslateOptions;
46 * com.google.cloud.translate.TranslateOptions.Builder#setTargetLanguage(String)}).
185 TranslateOptions.Builder optionsBuilder = TranslateOptions.newBuilder(); in main()
/aosp_15_r20/external/google-cloud-java/google-cloud-examples/src/test/java/com/google/cloud/examples/translate/snippets/
H A DITTranslateSnippets.java67 // Translate translate = TranslateOptions.getDefaultInstance().getService(); in testListSupportedLanguages()
91 // Translate translate = TranslateOptions.getDefaultInstance().getService(); in testListSupportedLanguagesWithTarget()
128 // Translate translate = TranslateOptions.getDefaultInstance().getService(); in testDetectLanguageOfTextList()
193 // Translate translate = TranslateOptions.getDefaultInstance().getService(); in testTranslateText()
/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/test/java/com/google/cloud/translate/
H A DSerializationTest.java48 TranslateOptions options = in serializableObjects()
49 TranslateOptions.newBuilder().setCredentials(NoCredentials.getInstance()).build(); in serializableObjects()
50 TranslateOptions otherOptions = options.toBuilder().build(); in serializableObjects()
H A DTranslateImplTest.java103 private TranslateOptions options;
112 EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(TranslateOptions.class))) in setUp()
116 TranslateOptions.newBuilder() in setUp()
445 TranslateOptions overridden = options.toBuilder().setCredentials(credentials).build(); in testCredentialsOverridesApiKey()
H A DTranslateOptionsTest.java29 TranslateOptions.newBuilder() in testInvalidTransport()
/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/v2/
H A DHttpTranslateRpc.java31 import com.google.cloud.translate.TranslateOptions;
41 private final TranslateOptions options;
44 public HttpTranslateRpc(TranslateOptions options) { in HttpTranslateRpc()
/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/test/java/com/google/cloud/translate/it/
H A DITTranslateTest.java29 import com.google.cloud.translate.TranslateOptions;
147 TranslateOptions options = RemoteTranslateHelper.create(API_KEY).getOptions(); in testApiKeyOverridesDefaultCredentials()
154 TranslateOptions options = RemoteTranslateHelper.create().getOptions(); in testDefaultCredentialsOverridesDefaultApiKey()
/aosp_15_r20/external/google-cloud-java/java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/
H A DTranslateRpcFactory.java20 import com.google.cloud.translate.TranslateOptions;
26 public interface TranslateRpcFactory extends ServiceRpcFactory<TranslateOptions> {}
/aosp_15_r20/external/google-cloud-java/google-cloud-examples/src/main/java/com/google/cloud/examples/translate/snippets/
H A DDetectLanguageAndTranslate.java28 import com.google.cloud.translate.TranslateOptions;
43 Translate translate = TranslateOptions.getDefaultInstance().getService(); in main()