Skip to content

Commit

Permalink
Merge pull request #3519 from aws/staging/4dd720f1-8e2c-4099-82bd-de1…
Browse files Browse the repository at this point in the history
…05e4d3d67

Pull request: release <- staging/4dd720f1-8e2c-4099-82bd-de105e4d3d67
  • Loading branch information
aws-sdk-java-automation authored Dec 12, 2024
2 parents d6f2fa1 + b982d70 commit f93d8de
Show file tree
Hide file tree
Showing 554 changed files with 4,905 additions and 3,914 deletions.
42 changes: 42 additions & 0 deletions .changes/2.29.33.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.29.33",
"date": "2024-12-12",
"entries": [
{
"type": "feature",
"category": "AWS Database Migration Service",
"contributor": "",
"description": "Add parameters to support for kerberos authentication. Add parameter for disabling the Unicode source filter with PostgreSQL settings. Add parameter to use large integer value with Kinesis/Kafka settings."
},
{
"type": "feature",
"category": "AWS Glue",
"contributor": "",
"description": "To support customer-managed encryption in Data Quality to allow customers encrypt data with their own KMS key, we will add a DataQualityEncryption field to the SecurityConfiguration API where customers can provide their KMS keys."
},
{
"type": "feature",
"category": "Amazon Connect Service",
"contributor": "",
"description": "Configure holidays and other overrides to hours of operation in advance. During contact handling, Amazon Connect automatically checks for overrides and provides customers with an appropriate flow path. After an override period passes call center automatically reverts to standard hours of operation."
},
{
"type": "feature",
"category": "Amazon GuardDuty",
"contributor": "",
"description": "Improved descriptions for certain APIs."
},
{
"type": "feature",
"category": "Amazon Route 53 Domains",
"contributor": "",
"description": "This release includes the following API updates: added the enumeration type RESTORE_DOMAIN to the OperationType; constrained the Price attribute to non-negative values; updated the LangCode to allow 2 or 3 alphabetical characters."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.29.33__ __2024-12-12__
## __AWS Database Migration Service__
- ### Features
- Add parameters to support for kerberos authentication. Add parameter for disabling the Unicode source filter with PostgreSQL settings. Add parameter to use large integer value with Kinesis/Kafka settings.

## __AWS Glue__
- ### Features
- To support customer-managed encryption in Data Quality to allow customers encrypt data with their own KMS key, we will add a DataQualityEncryption field to the SecurityConfiguration API where customers can provide their KMS keys.

## __AWS SDK for Java v2__
- ### Features
- Updated endpoint and partition metadata.

## __Amazon Connect Service__
- ### Features
- Configure holidays and other overrides to hours of operation in advance. During contact handling, Amazon Connect automatically checks for overrides and provides customers with an appropriate flow path. After an override period passes call center automatically reverts to standard hours of operation.

## __Amazon GuardDuty__
- ### Features
- Improved descriptions for certain APIs.

## __Amazon Route 53 Domains__
- ### Features
- This release includes the following API updates: added the enumeration type RESTORE_DOMAIN to the OperationType; constrained the Price attribute to non-negative values; updated the LangCode to allow 2 or 3 alphabetical characters.

# __2.29.32__ __2024-12-11__
## __AWS Artifact__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -85,12 +85,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</dependency>
```

Expand All @@ -102,7 +102,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-app-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle-logging-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<artifactId>bundle-logging-bridge</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<artifactId>bundle-sdk</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.29.32</version>
<version>2.29.33</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ public TypeSpec poetSpec() {
.addMethod(addModifier(sdkFieldNameToFieldMethod(), FINAL))
.addTypes(nestedModelClassTypes());

shapeModelSpec.additionalMethods().forEach(specBuilder::addMethod);

if (shapeModel.isUnion()) {
specBuilder.addField(unionTypeField());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.WildcardTypeName;
import java.util.ArrayList;
Expand Down Expand Up @@ -128,7 +129,7 @@ public Iterable<FieldSpec> staticFields(Modifier... modifiers) {
sdkFieldType),
"SDK_NAME_TO_FIELD",
Modifier.PRIVATE, Modifier.STATIC, Modifier.FINAL)
.initializer(memberNameToFieldInitializer(nameToField))
.initializer(memberNameToFieldInitializer())
.build());
return fields;
}
Expand All @@ -150,6 +151,22 @@ private CodeBlock sdkFieldInitializer(MemberModel m) {
.build();
}

public List<MethodSpec> additionalMethods() {
return Collections.singletonList(memberNameToFieldInitializerMethod(nameToField()));
}

public Map<String, String> nameToField() {
Map<String, String> nameToField = new LinkedHashMap<>();
shapeModel.getNonStreamingMembers().stream()
.filter(m -> m.getShape() == null || m.getShape().getShapeType() != ShapeType.Exception)
.filter(m -> !m.isSynthetic())
.forEach(m -> {
String name = m.getHttp().getMarshallLocationName();
nameToField.put(name, namingStrategy.getSdkFieldFieldName(m));
});
return nameToField;
}

private CodeBlock containerSdkFieldInitializer(MemberModel m) {
ClassName sdkFieldType = ClassName.get(SdkField.class);
return CodeBlock.builder()
Expand Down Expand Up @@ -392,18 +409,29 @@ private CodeBlock sdkFieldsInitializer(List<FieldSpec> fields) {
return builder.build();
}

private CodeBlock memberNameToFieldInitializer(Map<String, String> nameToField) {
CodeBlock.Builder builder = CodeBlock.builder();
private CodeBlock memberNameToFieldInitializer() {
return CodeBlock.builder()
.add("memberNameToFieldInitializer()")
.build();
}

private MethodSpec memberNameToFieldInitializerMethod(Map<String, String> nameToField) {
ParameterizedTypeName sdkFieldT = ParameterizedTypeName.get(ClassName.get(SdkField.class),
WildcardTypeName.subtypeOf(Object.class));
ParameterizedTypeName mapT = ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class),
sdkFieldT);
MethodSpec.Builder builder = MethodSpec.methodBuilder("memberNameToFieldInitializer")
.addModifiers(Modifier.PRIVATE, Modifier.STATIC)
.returns(mapT);

if (nameToField.isEmpty()) {
builder.add("$T.emptyMap()", Collections.class);
return builder.build();
builder.addStatement("return $T.emptyMap()", Collections.class);
} else {
builder.addStatement("$T map = new $T<>()", mapT, HashMap.class);
nameToField.forEach((name, field) -> builder.addStatement("map.put($S, $L)", name, field));
builder.addStatement("return $T.unmodifiableMap(map)", Collections.class);
}
builder.add("$T.unmodifiableMap(", Collections.class);
builder.add("new $T<$T, $T<?>>() {{\n", HashMap.class, String.class, SdkField.class);
nameToField.forEach((name, field) -> builder.add("put($S, $L);\n", name, field));
builder.add("}}");
builder.add(")");

return builder.build();
}

}
Loading

0 comments on commit f93d8de

Please sign in to comment.