-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async S3 Client Presigned Url Download API #5587
base: feature/master/presigned-url-download
Are you sure you want to change the base?
Changes from all commits
047ec98
3f0e4a1
1dca813
031cc68
6997cb3
efd0ca7
f755670
c63c597
cb22c3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.codegen.customization.processors; | ||
|
||
import java.util.Map; | ||
import software.amazon.awssdk.codegen.customization.CodegenCustomizationProcessor; | ||
import software.amazon.awssdk.codegen.model.config.customization.CustomSdkOperations; | ||
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel; | ||
import software.amazon.awssdk.codegen.model.service.Operation; | ||
import software.amazon.awssdk.codegen.model.service.ServiceModel; | ||
|
||
public class CustomSdkOperationsProcessor implements CodegenCustomizationProcessor { | ||
|
||
private final CustomSdkOperations customSdkOperations; | ||
|
||
CustomSdkOperationsProcessor(CustomSdkOperations customSdkOperations) { | ||
this.customSdkOperations = customSdkOperations; | ||
} | ||
|
||
@Override | ||
public void preprocess(ServiceModel serviceModel) { | ||
Map<String, Operation> operations = serviceModel.getOperations(); | ||
|
||
if (customSdkOperations != null) { | ||
operations.putAll(customSdkOperations.getOperations()); | ||
serviceModel.setOperations(operations); | ||
} | ||
} | ||
|
||
@Override | ||
public void postprocess(IntermediateModel intermediateModel) { | ||
// added custom operations in service model instead of intermediate model | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.codegen.model.config.customization; | ||
|
||
import java.util.Collections; | ||
import java.util.Map; | ||
import software.amazon.awssdk.codegen.model.service.Operation; | ||
|
||
public class CustomSdkOperations { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please mention the Json in Java doc of how this class looks like |
||
private Map<String, Operation> operations; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. operations more sounds like List , can we rename it to something that conveys its a Map |
||
|
||
public Map<String, Operation> getOperations() { | ||
return operations; | ||
} | ||
|
||
public void setOperations(Map<String, Operation> operations) { | ||
this.operations = operations != null ? Collections.unmodifiableMap(operations) : Collections.emptyMap(); | ||
} | ||
|
||
public Operation getOperation(String operationName) { | ||
return operations.get(operationName); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,8 @@ public class ShapeModel extends DocumentationModel implements HasDeprecation { | |
private String c2jName; | ||
// shapeName might be later modified by the customization. | ||
private String shapeName; | ||
private String fqcn; | ||
private String marshallerFqcn; | ||
// the local variable name inside marshaller/unmarshaller implementation | ||
private boolean deprecated; | ||
private String deprecatedMessage; | ||
|
@@ -93,6 +95,22 @@ public void setShapeName(String shapeName) { | |
this.shapeName = shapeName; | ||
} | ||
|
||
public String getFqcn() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I donot think we should directly gives Fqcn for operations , We already have "customSdkShapes": {
"shapes":{
"SdkPartType":{
"type":"string",
"enum":[
"DEFAULT",
"LAST"
]
}
}
} Can we use it and pass the input and outputs as modeled structures ? |
||
return fqcn; | ||
} | ||
|
||
public void setFqcn(String fqcn) { | ||
this.fqcn = fqcn; | ||
} | ||
|
||
public String getMarshallerFqcn() { | ||
return marshallerFqcn; | ||
} | ||
|
||
public void setMarshallerFqcn(String marshallerFqcn) { | ||
this.marshallerFqcn = marshallerFqcn; | ||
} | ||
|
||
@Override | ||
public boolean isDeprecated() { | ||
return deprecated; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do
shapeC2jName.equals
to avoid additional null check as below