forked from aws/aws-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-add sqs customization that was dropped in json migration
- Loading branch information
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...a/com/amazonaws/util/awsclientgenerator/generators/cpp/sqs/SQSJsonCppClientGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.amazonaws.util.awsclientgenerator.generators.cpp.sqs; | ||
|
||
import com.amazonaws.util.awsclientgenerator.domainmodels.SdkFileEntry; | ||
import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.ServiceModel; | ||
import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.Shape; | ||
import com.amazonaws.util.awsclientgenerator.generators.cpp.JsonCppClientGenerator; | ||
|
||
public class SQSJsonCppClientGenerator extends JsonCppClientGenerator { | ||
|
||
public SQSJsonCppClientGenerator() throws Exception { | ||
super(); | ||
} | ||
|
||
@Override | ||
public SdkFileEntry[] generateSourceFiles(ServiceModel serviceModel) throws Exception { | ||
Shape queueAttributeNameShape = serviceModel.getShapes().get("QueueAttributeName"); | ||
|
||
/* | ||
* Add missing unmodeled queue attribute shapes that were already present | ||
* in a customization for the QueryXML client generation. | ||
*/ | ||
if(queueAttributeNameShape != null) { | ||
queueAttributeNameShape.getEnumValues().add("SentTimestamp"); | ||
queueAttributeNameShape.getEnumValues().add("ApproximateFirstReceiveTimestamp"); | ||
queueAttributeNameShape.getEnumValues().add("ApproximateReceiveCount"); | ||
queueAttributeNameShape.getEnumValues().add("SenderId"); | ||
} | ||
|
||
return super.generateSourceFiles(serviceModel); | ||
} | ||
} |