Skip to content

Commit bbf2672

Browse files
committed
[aws-android-sdk-machinelearning] Update models to latest
1 parent a583812 commit bbf2672

File tree

1 file changed

+116
-40
lines changed

1 file changed

+116
-40
lines changed

aws-android-sdk-machinelearning/src/main/java/com/amazonaws/services/machinelearning/AmazonMachineLearningClient.java

Lines changed: 116 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,29 @@ public AmazonMachineLearningClient(ClientConfiguration clientConfiguration) {
9797
* Constructs a new client to invoke service methods on
9898
* AmazonMachineLearning 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+
* AmazonMachineLearningClient client = new AmazonMachineLearningClient(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 AmazonMachineLearningClient(AWSCredentials awsCredentials) {
123136
* AmazonMachineLearning using the specified AWS account credentials and
124137
* client configuration 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+
* AmazonMachineLearningClient client = new AmazonMachineLearningClient(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.
@@ -153,16 +179,29 @@ public AmazonMachineLearningClient(AWSCredentials awsCredentials,
153179
* AmazonMachineLearning using the specified AWS account credentials
154180
* provider.
155181
* <p>
156-
* If AWS session credentials are passed in, then those credentials will be
157-
* used to authenticate requests. Otherwise, if AWS long-term credentials
158-
* are passed in, then session management will be handled automatically by
159-
* the SDK. Callers are encouraged to use long-term credentials and let the
160-
* SDK handle starting and renewing sessions.
161-
* <p>
162-
* Automatically managed sessions will be shared among all clients that use
163-
* the same credentials and service endpoint. To opt out of this behavior,
164-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
165-
* returns {@link AWSSessionCredentials}.
182+
* The client requests are authenticated using the {@link AWSCredentials}
183+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
184+
* be passed for quick testing. However, it is strongly recommended to use
185+
* Amazon Cognito vended temporary credentials for use in production. This
186+
* can be achieved by using {@link AWSMobileClient}. Please see
187+
* https://aws-amplify.github.io/docs/android/authentication for
188+
* instructions on how to enable {@link AWSMobileClient}.
189+
*
190+
* <pre>
191+
* {@code
192+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
193+
* @Override
194+
* public void onResult(final UserStateDetails details) {
195+
* AmazonMachineLearningClient client = new AmazonMachineLearningClient(AWSMobileClient.getInstance());
196+
* }
197+
*
198+
* @Override
199+
* public void onError(final Exception e) {
200+
* e.printStackTrace();
201+
* }
202+
* });
203+
* }
204+
* </pre>
166205
* <p>
167206
* All service calls made using this new client object are blocking, and
168207
* will not return until the service call completes.
@@ -180,16 +219,29 @@ public AmazonMachineLearningClient(AWSCredentialsProvider awsCredentialsProvider
180219
* AmazonMachineLearning using the specified AWS account credentials
181220
* provider and client configuration options.
182221
* <p>
183-
* If AWS session credentials are passed in, then those credentials will be
184-
* used to authenticate requests. Otherwise, if AWS long-term credentials
185-
* are passed in, then session management will be handled automatically by
186-
* the SDK. Callers are encouraged to use long-term credentials and let the
187-
* SDK handle starting and renewing sessions.
188-
* <p>
189-
* Automatically managed sessions will be shared among all clients that use
190-
* the same credentials and service endpoint. To opt out of this behavior,
191-
* explicitly provide an instance of {@link AWSCredentialsProvider} that
192-
* returns {@link AWSSessionCredentials}.
222+
* The client requests are authenticated using the {@link AWSCredentials}
223+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
224+
* be passed for quick testing. However, it is strongly recommended to use
225+
* Amazon Cognito vended temporary credentials for use in production. This
226+
* can be achieved by using {@link AWSMobileClient}. Please see
227+
* https://aws-amplify.github.io/docs/android/authentication for
228+
* instructions on how to enable {@link AWSMobileClient}.
229+
*
230+
* <pre>
231+
* {@code
232+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
233+
* @Override
234+
* public void onResult(final UserStateDetails details) {
235+
* AmazonMachineLearningClient client = new AmazonMachineLearningClient(AWSMobileClient.getInstance());
236+
* }
237+
*
238+
* @Override
239+
* public void onError(final Exception e) {
240+
* e.printStackTrace();
241+
* }
242+
* });
243+
* }
244+
* </pre>
193245
* <p>
194246
* All service calls made using this new client object are blocking, and
195247
* will not return until the service call completes.
@@ -238,6 +290,30 @@ public AmazonMachineLearningClient(AWSCredentialsProvider awsCredentialsProvider
238290
* AmazonMachineLearning using the specified AWS account credentials
239291
* provider, client configuration options and request metric collector.
240292
* <p>
293+
* The client requests are authenticated using the {@link AWSCredentials}
294+
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
295+
* be passed for quick testing. However, it is strongly recommended to use
296+
* Amazon Cognito vended temporary credentials for use in production. This
297+
* can be achieved by using {@link AWSMobileClient}. Please see
298+
* https://aws-amplify.github.io/docs/android/authentication for
299+
* instructions on how to enable {@link AWSMobileClient}.
300+
*
301+
* <pre>
302+
* {@code
303+
* AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback<UserStateDetails>() {
304+
* @Override
305+
* public void onResult(final UserStateDetails details) {
306+
* AmazonMachineLearningClient client = new AmazonMachineLearningClient(AWSMobileClient.getInstance());
307+
* }
308+
*
309+
* @Override
310+
* public void onError(final Exception e) {
311+
* e.printStackTrace();
312+
* }
313+
* });
314+
* }
315+
* </pre>
316+
* <p>
241317
* All service calls made using this new client object are blocking, and
242318
* will not return until the service call completes.
243319
*

0 commit comments

Comments
 (0)