Skip to content

Commit 755b796

Browse files
author
AWS
committed
AWS SDK for Android 2.2.20
1 parent 66e5a23 commit 755b796

File tree

1,625 files changed

+176898
-104114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,625 files changed

+176898
-104114
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Change Log - AWS SDK for Android
22

3+
## [Release 2.2.20](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.2.20) (06/27/2016)
4+
5+
### New Features
6+
- **Amazon Web Services**: Introducing new AWS region Asia Pacific (Mumbai) region, endpoint ap-south-1.
7+
8+
### Improvements
9+
- **Amazon Web Services**: General service updates and documentation improvements.
10+
- **API Gateway**: Expose client configuration through ApiFactory. [#158](https://github.com/aws/aws-sdk-android/issues/158)
11+
- **Amazon Web Services**: Service clients are now generated with a new code gen system. Some trivial changes are listed below
12+
- List members in POJO are defaulted to null instead of an empty list to align with map members. Please perform null check to avoid NPE. When marshalling a list member, a null list will be omitted and an empty list will result in an empty array.
13+
- In `ListRecordsRequest` of Cognito Sync, the data type of `lastSyncCount` is changed from String to Long and that of `maxResult` from String to Integer.
14+
- In DynamoDB, the method `setKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey)` is removed from `GetItemRequest`, `UpdateItemRequest`, `DeleteItemRequest`, and `DeleteRequest`. Use `addKeyEntry(String key, AttributeValue value)` instead. `setExclusiveStartKey(java.util.Map.Entry<String, AttributeValue> hashKey, java.util.Map.Entry<String, AttributeValue> rangeKey)` is also removed from `QueryRequest` and `ScanRequest`. The alternative is `addExclusiveStartKeyEntry(String key, AttributeValue value)`.
15+
16+
### Bug Fixes
17+
- **API Gateway**: Fixed a bug where user agent is overwritten by `ApiHandler`. [#159](https://github.com/aws/aws-sdk-android/issues/159)
18+
19+
320
## [Release 2.2.19](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.2.19) (06/23/2016)
421

522
### New Features

aws-android-sdk-apigateway-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.2.19</version>
15+
<version>2.2.20</version>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-android-sdk-core</artifactId>
2222
<optional>false</optional>
23-
<version>2.2.19</version>
23+
<version>2.2.20</version>
2424
</dependency>
2525
</dependencies>
2626

aws-android-sdk-apigateway-core/src/main/java/com/amazonaws/mobileconnectors/apigateway/ApiClientHandler.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,32 @@ class ApiClientHandler implements InvocationHandler {
8282
@Override
8383
public Object invoke(Object proxy, Method method, Object[] args)
8484
throws Throwable {
85-
Request<?> request = buildRequest(method, args);
86-
87-
ExecutionContext context = new ExecutionContext();
88-
context.setContextUserAgent(apiName);
89-
HttpRequest httpRequest = requestFactory.createHttpRequest(request, clientConfiguration,
90-
context);
85+
HttpRequest httpRequest = createHttpRequest(method, args);
9186
HttpResponse response = client.execute(httpRequest);
9287

9388
return handleResponse(response, method);
9489
}
9590

91+
/**
92+
* Build a {@link HttpRequest} object for the given method.
93+
*
94+
* @param method method that annotated with {@link Operation}
95+
* @param args arguments of the method
96+
* @return a {@link HttpRequest} object
97+
*/
98+
HttpRequest createHttpRequest(Method method, Object[] args) {
99+
Request<?> request = buildRequest(method, args);
100+
101+
ExecutionContext context = new ExecutionContext();
102+
String userAgent = apiName;
103+
if (request.getHeaders().containsKey("User-Agent")) {
104+
// append it to execution context
105+
userAgent += " " + request.getHeaders().get("User-Agent");
106+
}
107+
context.setContextUserAgent(userAgent);
108+
return requestFactory.createHttpRequest(request, clientConfiguration, context);
109+
}
110+
96111
/**
97112
* Build a {@link Request} object for the given method.
98113
*

aws-android-sdk-autoscaling/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<parent>
1313
<groupId>com.amazonaws</groupId>
1414
<artifactId>aws-android-sdk-pom</artifactId>
15-
<version>2.2.19</version>
15+
<version>2.2.20</version>
1616
</parent>
1717

1818
<dependencies>
1919
<dependency>
2020
<groupId>com.amazonaws</groupId>
2121
<artifactId>aws-android-sdk-core</artifactId>
2222
<optional>false</optional>
23-
<version>2.2.19</version>
23+
<version>2.2.20</version>
2424
</dependency>
2525
</dependencies>
2626

aws-android-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/AmazonAutoScaling.java

Lines changed: 131 additions & 122 deletions
Large diffs are not rendered by default.

aws-android-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/AmazonAutoScalingAsync.java

Lines changed: 277 additions & 126 deletions
Large diffs are not rendered by default.

aws-android-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/AmazonAutoScalingAsyncClient.java

Lines changed: 352 additions & 138 deletions
Large diffs are not rendered by default.

aws-android-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/AmazonAutoScalingClient.java

Lines changed: 173 additions & 126 deletions
Large diffs are not rendered by default.

aws-android-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/model/AttachInstancesRequest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
public class AttachInstancesRequest extends AmazonWebServiceRequest implements Serializable {
4242

4343
/**
44-
* One or more EC2 instance IDs.
44+
* One or more instance IDs.
4545
*/
4646
private com.amazonaws.internal.ListWithAutoConstructFlag<String> instanceIds;
4747

@@ -55,9 +55,9 @@ public class AttachInstancesRequest extends AmazonWebServiceRequest implements S
5555
private String autoScalingGroupName;
5656

5757
/**
58-
* One or more EC2 instance IDs.
58+
* One or more instance IDs.
5959
*
60-
* @return One or more EC2 instance IDs.
60+
* @return One or more instance IDs.
6161
*/
6262
public java.util.List<String> getInstanceIds() {
6363
if (instanceIds == null) {
@@ -68,9 +68,9 @@ public java.util.List<String> getInstanceIds() {
6868
}
6969

7070
/**
71-
* One or more EC2 instance IDs.
71+
* One or more instance IDs.
7272
*
73-
* @param instanceIds One or more EC2 instance IDs.
73+
* @param instanceIds One or more instance IDs.
7474
*/
7575
public void setInstanceIds(java.util.Collection<String> instanceIds) {
7676
if (instanceIds == null) {
@@ -83,11 +83,11 @@ public void setInstanceIds(java.util.Collection<String> instanceIds) {
8383
}
8484

8585
/**
86-
* One or more EC2 instance IDs.
86+
* One or more instance IDs.
8787
* <p>
8888
* Returns a reference to this object so that method calls can be chained together.
8989
*
90-
* @param instanceIds One or more EC2 instance IDs.
90+
* @param instanceIds One or more instance IDs.
9191
*
9292
* @return A reference to this updated object so that method calls can be chained
9393
* together.
@@ -101,11 +101,11 @@ public AttachInstancesRequest withInstanceIds(String... instanceIds) {
101101
}
102102

103103
/**
104-
* One or more EC2 instance IDs.
104+
* One or more instance IDs.
105105
* <p>
106106
* Returns a reference to this object so that method calls can be chained together.
107107
*
108-
* @param instanceIds One or more EC2 instance IDs.
108+
* @param instanceIds One or more instance IDs.
109109
*
110110
* @return A reference to this updated object so that method calls can be chained
111111
* together.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
/*
2+
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package com.amazonaws.services.autoscaling.model;
16+
17+
import java.io.Serializable;
18+
19+
import com.amazonaws.AmazonWebServiceRequest;
20+
21+
/**
22+
* Container for the parameters to the {@link com.amazonaws.services.autoscaling.AmazonAutoScaling#attachLoadBalancerTargetGroups(AttachLoadBalancerTargetGroupsRequest) AttachLoadBalancerTargetGroups operation}.
23+
*
24+
*
25+
* @see com.amazonaws.services.autoscaling.AmazonAutoScaling#attachLoadBalancerTargetGroups(AttachLoadBalancerTargetGroupsRequest)
26+
*/
27+
public class AttachLoadBalancerTargetGroupsRequest extends AmazonWebServiceRequest implements Serializable {
28+
29+
private String autoScalingGroupName;
30+
31+
private com.amazonaws.internal.ListWithAutoConstructFlag<String> targetGroupARNs;
32+
33+
/**
34+
* Returns the value of the AutoScalingGroupName property for this
35+
* object.
36+
* <p>
37+
* <b>Constraints:</b><br/>
38+
* <b>Length: </b>1 - 1600<br/>
39+
* <b>Pattern: </b>[&#92;u0020-&#92;uD7FF&#92;uE000-&#92;uFFFD&#92;uD800&#92;uDC00-&#92;uDBFF&#92;uDFFF\r\n\t]*<br/>
40+
*
41+
* @return The value of the AutoScalingGroupName property for this object.
42+
*/
43+
public String getAutoScalingGroupName() {
44+
return autoScalingGroupName;
45+
}
46+
47+
/**
48+
* Sets the value of the AutoScalingGroupName property for this object.
49+
* <p>
50+
* <b>Constraints:</b><br/>
51+
* <b>Length: </b>1 - 1600<br/>
52+
* <b>Pattern: </b>[&#92;u0020-&#92;uD7FF&#92;uE000-&#92;uFFFD&#92;uD800&#92;uDC00-&#92;uDBFF&#92;uDFFF\r\n\t]*<br/>
53+
*
54+
* @param autoScalingGroupName The new value for the AutoScalingGroupName property for this object.
55+
*/
56+
public void setAutoScalingGroupName(String autoScalingGroupName) {
57+
this.autoScalingGroupName = autoScalingGroupName;
58+
}
59+
60+
/**
61+
* Sets the value of the AutoScalingGroupName property for this object.
62+
* <p>
63+
* Returns a reference to this object so that method calls can be chained together.
64+
* <p>
65+
* <b>Constraints:</b><br/>
66+
* <b>Length: </b>1 - 1600<br/>
67+
* <b>Pattern: </b>[&#92;u0020-&#92;uD7FF&#92;uE000-&#92;uFFFD&#92;uD800&#92;uDC00-&#92;uDBFF&#92;uDFFF\r\n\t]*<br/>
68+
*
69+
* @param autoScalingGroupName The new value for the AutoScalingGroupName property for this object.
70+
*
71+
* @return A reference to this updated object so that method calls can be chained
72+
* together.
73+
*/
74+
public AttachLoadBalancerTargetGroupsRequest withAutoScalingGroupName(String autoScalingGroupName) {
75+
this.autoScalingGroupName = autoScalingGroupName;
76+
return this;
77+
}
78+
79+
/**
80+
* Returns the value of the TargetGroupARNs property for this object.
81+
*
82+
* @return The value of the TargetGroupARNs property for this object.
83+
*/
84+
public java.util.List<String> getTargetGroupARNs() {
85+
if (targetGroupARNs == null) {
86+
targetGroupARNs = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
87+
targetGroupARNs.setAutoConstruct(true);
88+
}
89+
return targetGroupARNs;
90+
}
91+
92+
/**
93+
* Sets the value of the TargetGroupARNs property for this object.
94+
*
95+
* @param targetGroupARNs The new value for the TargetGroupARNs property for this object.
96+
*/
97+
public void setTargetGroupARNs(java.util.Collection<String> targetGroupARNs) {
98+
if (targetGroupARNs == null) {
99+
this.targetGroupARNs = null;
100+
return;
101+
}
102+
com.amazonaws.internal.ListWithAutoConstructFlag<String> targetGroupARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(targetGroupARNs.size());
103+
targetGroupARNsCopy.addAll(targetGroupARNs);
104+
this.targetGroupARNs = targetGroupARNsCopy;
105+
}
106+
107+
/**
108+
* Sets the value of the TargetGroupARNs property for this object.
109+
* <p>
110+
* Returns a reference to this object so that method calls can be chained together.
111+
*
112+
* @param targetGroupARNs The new value for the TargetGroupARNs property for this object.
113+
*
114+
* @return A reference to this updated object so that method calls can be chained
115+
* together.
116+
*/
117+
public AttachLoadBalancerTargetGroupsRequest withTargetGroupARNs(String... targetGroupARNs) {
118+
if (getTargetGroupARNs() == null) setTargetGroupARNs(new java.util.ArrayList<String>(targetGroupARNs.length));
119+
for (String value : targetGroupARNs) {
120+
getTargetGroupARNs().add(value);
121+
}
122+
return this;
123+
}
124+
125+
/**
126+
* Sets the value of the TargetGroupARNs property for this object.
127+
* <p>
128+
* Returns a reference to this object so that method calls can be chained together.
129+
*
130+
* @param targetGroupARNs The new value for the TargetGroupARNs property for this object.
131+
*
132+
* @return A reference to this updated object so that method calls can be chained
133+
* together.
134+
*/
135+
public AttachLoadBalancerTargetGroupsRequest withTargetGroupARNs(java.util.Collection<String> targetGroupARNs) {
136+
if (targetGroupARNs == null) {
137+
this.targetGroupARNs = null;
138+
} else {
139+
com.amazonaws.internal.ListWithAutoConstructFlag<String> targetGroupARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(targetGroupARNs.size());
140+
targetGroupARNsCopy.addAll(targetGroupARNs);
141+
this.targetGroupARNs = targetGroupARNsCopy;
142+
}
143+
144+
return this;
145+
}
146+
147+
/**
148+
* Returns a string representation of this object; useful for testing and
149+
* debugging.
150+
*
151+
* @return A string representation of this object.
152+
*
153+
* @see java.lang.Object#toString()
154+
*/
155+
@Override
156+
public String toString() {
157+
StringBuilder sb = new StringBuilder();
158+
sb.append("{");
159+
if (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: " + getAutoScalingGroupName() + ",");
160+
if (getTargetGroupARNs() != null) sb.append("TargetGroupARNs: " + getTargetGroupARNs() );
161+
sb.append("}");
162+
return sb.toString();
163+
}
164+
165+
@Override
166+
public int hashCode() {
167+
final int prime = 31;
168+
int hashCode = 1;
169+
170+
hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode());
171+
hashCode = prime * hashCode + ((getTargetGroupARNs() == null) ? 0 : getTargetGroupARNs().hashCode());
172+
return hashCode;
173+
}
174+
175+
@Override
176+
public boolean equals(Object obj) {
177+
if (this == obj) return true;
178+
if (obj == null) return false;
179+
180+
if (obj instanceof AttachLoadBalancerTargetGroupsRequest == false) return false;
181+
AttachLoadBalancerTargetGroupsRequest other = (AttachLoadBalancerTargetGroupsRequest)obj;
182+
183+
if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false;
184+
if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false;
185+
if (other.getTargetGroupARNs() == null ^ this.getTargetGroupARNs() == null) return false;
186+
if (other.getTargetGroupARNs() != null && other.getTargetGroupARNs().equals(this.getTargetGroupARNs()) == false) return false;
187+
return true;
188+
}
189+
190+
}
191+

0 commit comments

Comments
 (0)