Skip to content

Commit b78beb2

Browse files
committed
[aws-android-sdk-translate] Update models to latest
1 parent 3fb166c commit b78beb2

File tree

1 file changed

+116
-40
lines changed

1 file changed

+116
-40
lines changed

aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateClient.java

Lines changed: 116 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,29 @@ public AmazonTranslateClient(ClientConfiguration clientConfiguration) {
9797
* Constructs a new client to invoke service methods on AmazonTranslate
9898
* using the specified AWS account credentials.
9999
* <p>
100-
* If AWS session credentials are passed in, then those credentials will be
101-
* used to authenticate requests. Otherwise, if AWS long-term credentials
102-
* are passed in, then session management will be handled automatically by
103-
* the SDK. Callers are encouraged to use long-term credentials and let the
104-
* SDK handle starting and renewing sessions.
105-
* <p>
106-
* Automatically managed sessions will be shared among all clients that use
107-
* the same credentials and service endpoint. To opt out of this behavior,
108-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
109-
* returns {@link AWSSessionCredentials}.
100+
* The client requests are authenticated using the {@link AWSCredentials}
101+
* provided in this constructor. Static AWSCredentials can be passed for
102+
* quick testing. However, it is strongly recommended to use Amazon Cognito
103+
* vended temporary credentials for use in production. This can be achieved
104+
* by using {@link AWSMobileClient}. Please see
105+
* https://aws-amplify.github.io/docs/android/authentication for
106+
* instructions on how to enable {@link AWSMobileClient}.
107+
*
108+
* <pre>
109+
* {@code
110+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
111+
* @Override
112+
* public void onResult(final UserStateDetails details) {
113+
* AmazonTranslateClient client = new AmazonTranslateClient(AWSMobileClient.getInstance());
114+
* }
115+
*
116+
* @Override
117+
* public void onError(final Exception e) {
118+
* e.printStackTrace();
119+
* }
120+
* });
121+
* }
122+
* </pre>
110123
* <p>
111124
* All service calls made using this new client object are blocking, and
112125
* will not return until the service call completes.
@@ -123,16 +136,29 @@ public AmazonTranslateClient(AWSCredentials awsCredentials) {
123136
* using the specified AWS account credentials and client configuration
124137
* options.
125138
* <p>
126-
* If AWS session credentials are passed in, then those credentials will be
127-
* used to authenticate requests. Otherwise, if AWS long-term credentials
128-
* are passed in, then session management will be handled automatically by
129-
* the SDK. Callers are encouraged to use long-term credentials and let the
130-
* SDK handle starting and renewing sessions.
131-
* <p>
132-
* Automatically managed sessions will be shared among all clients that use
133-
* the same credentials and service endpoint. To opt out of this behavior,
134-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
135-
* returns {@link AWSSessionCredentials}.
139+
* The client requests are authenticated using the {@link AWSCredentials}
140+
* provided in this constructor. Static AWSCredentials can be passed for
141+
* quick testing. However, it is strongly recommended to use Amazon Cognito
142+
* vended temporary credentials for use in production. This can be achieved
143+
* by using {@link AWSMobileClient}. Please see
144+
* https://aws-amplify.github.io/docs/android/authentication for
145+
* instructions on how to enable {@link AWSMobileClient}.
146+
*
147+
* <pre>
148+
* {@code
149+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
150+
* @Override
151+
* public void onResult(final UserStateDetails details) {
152+
* AmazonTranslateClient client = new AmazonTranslateClient(AWSMobileClient.getInstance());
153+
* }
154+
*
155+
* @Override
156+
* public void onError(final Exception e) {
157+
* e.printStackTrace();
158+
* }
159+
* });
160+
* }
161+
* </pre>
136162
* <p>
137163
* All service calls made using this new client object are blocking, and
138164
* will not return until the service call completes.
@@ -152,16 +178,29 @@ public AmazonTranslateClient(AWSCredentials awsCredentials,
152178
* Constructs a new client to invoke service methods on AmazonTranslate
153179
* using the specified AWS account credentials provider.
154180
* <p>
155-
* If AWS session credentials are passed in, then those credentials will be
156-
* used to authenticate requests. Otherwise, if AWS long-term credentials
157-
* are passed in, then session management will be handled automatically by
158-
* the SDK. Callers are encouraged to use long-term credentials and let the
159-
* SDK handle starting and renewing sessions.
160-
* <p>
161-
* Automatically managed sessions will be shared among all clients that use
162-
* the same credentials and service endpoint. To opt out of this behavior,
163-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
164-
* returns {@link AWSSessionCredentials}.
181+
* The client requests are authenticated using the {@link AWSCredentials}
182+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
183+
* be passed for quick testing. However, it is strongly recommended to use
184+
* Amazon Cognito vended temporary credentials for use in production. This
185+
* can be achieved by using {@link AWSMobileClient}. Please see
186+
* https://aws-amplify.github.io/docs/android/authentication for
187+
* instructions on how to enable {@link AWSMobileClient}.
188+
*
189+
* <pre>
190+
* {@code
191+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
192+
* @Override
193+
* public void onResult(final UserStateDetails details) {
194+
* AmazonTranslateClient client = new AmazonTranslateClient(AWSMobileClient.getInstance());
195+
* }
196+
*
197+
* @Override
198+
* public void onError(final Exception e) {
199+
* e.printStackTrace();
200+
* }
201+
* });
202+
* }
203+
* </pre>
165204
* <p>
166205
* All service calls made using this new client object are blocking, and
167206
* will not return until the service call completes.
@@ -179,16 +218,29 @@ public AmazonTranslateClient(AWSCredentialsProvider awsCredentialsProvider) {
179218
* using the specified AWS account credentials provider and client
180219
* configuration options.
181220
* <p>
182-
* If AWS session credentials are passed in, then those credentials will be
183-
* used to authenticate requests. Otherwise, if AWS long-term credentials
184-
* are passed in, then session management will be handled automatically by
185-
* the SDK. Callers are encouraged to use long-term credentials and let the
186-
* SDK handle starting and renewing sessions.
187-
* <p>
188-
* Automatically managed sessions will be shared among all clients that use
189-
* the same credentials and service endpoint. To opt out of this behavior,
190-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
191-
* returns {@link AWSSessionCredentials}.
221+
* The client requests are authenticated using the {@link AWSCredentials}
222+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
223+
* be passed for quick testing. However, it is strongly recommended to use
224+
* Amazon Cognito vended temporary credentials for use in production. This
225+
* can be achieved by using {@link AWSMobileClient}. Please see
226+
* https://aws-amplify.github.io/docs/android/authentication for
227+
* instructions on how to enable {@link AWSMobileClient}.
228+
*
229+
* <pre>
230+
* {@code
231+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
232+
* @Override
233+
* public void onResult(final UserStateDetails details) {
234+
* AmazonTranslateClient client = new AmazonTranslateClient(AWSMobileClient.getInstance());
235+
* }
236+
*
237+
* @Override
238+
* public void onError(final Exception e) {
239+
* e.printStackTrace();
240+
* }
241+
* });
242+
* }
243+
* </pre>
192244
* <p>
193245
* All service calls made using this new client object are blocking, and
194246
* will not return until the service call completes.
@@ -237,6 +289,30 @@ public AmazonTranslateClient(AWSCredentialsProvider awsCredentialsProvider,
237289
* using the specified AWS account credentials provider, client
238290
* configuration options and request metric collector.
239291
* <p>
292+
* The client requests are authenticated using the {@link AWSCredentials}
293+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
294+
* be passed for quick testing. However, it is strongly recommended to use
295+
* Amazon Cognito vended temporary credentials for use in production. This
296+
* can be achieved by using {@link AWSMobileClient}. Please see
297+
* https://aws-amplify.github.io/docs/android/authentication for
298+
* instructions on how to enable {@link AWSMobileClient}.
299+
*
300+
* <pre>
301+
* {@code
302+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
303+
* @Override
304+
* public void onResult(final UserStateDetails details) {
305+
* AmazonTranslateClient client = new AmazonTranslateClient(AWSMobileClient.getInstance());
306+
* }
307+
*
308+
* @Override
309+
* public void onError(final Exception e) {
310+
* e.printStackTrace();
311+
* }
312+
* });
313+
* }
314+
* </pre>
315+
* <p>
240316
* All service calls made using this new client object are blocking, and
241317
* will not return until the service call completes.
242318
*

0 commit comments

Comments
 (0)