All Downloads are FREE. Search and download functionalities are using the official Maven repository.

macros.unmarshaller.awsquery.MemberUnmarshallerInvocation.ftl Maven / Gradle / Ivy

Go to download

The AWS SDK for Java - Code Generator module holds the classes and templates required to generate the AWS Java SDK clients for AWS services.

There is a newer version: 1.11.8
Show newest version
<#macro content shapeVarName memberModel >

<#local unmarshallerLocationName = memberModel.http.unmarshallLocationName />
<#if memberModel.http.additionalUnmarshallingPath?has_content>
    <#local unmarshallerLocationName = unmarshallerLocationName + "/" + memberModel.http.additionalUnmarshallingPath />


<#if memberModel.list>
    <#if memberModel.http.flattened>
        <#local listMemberPath = memberModel.listModel.memberLocationName!memberModel.name />
    <#else>
        <#local listMemberPath = unmarshallerLocationName + "/" + memberModel.listModel.memberLocationName!"member" />
    

    <#if memberModel.listModel.memberAdditionalUnmarshallingPath?has_content>
        <#local listMemberPath = listMemberPath + "/" + memberModel.listModel.memberAdditionalUnmarshallingPath />
    
                if (context.testExpression("${listMemberPath}", targetDepth)) {
                    ${shapeVarName}.with${memberModel.name}(${memberModel.listModel.simpleType}StaxUnmarshaller.getInstance().unmarshall(context));
                    continue;
                }

<#elseif memberModel.map>
    <#local mapEntryPath = unmarshallerLocationName />

    <#if !memberModel.http.flattened>
        <#local mapEntryPath = "${unmarshallerLocationName}/entry" />
    
                if (context.testExpression("${mapEntryPath}", targetDepth)) {
                    Entry<${memberModel.mapModel.keyType}, ${memberModel.mapModel.valueType}> entry = ${memberModel.name}MapEntryUnmarshaller.getInstance().unmarshall(context);
                    ${shapeVarName}.add${memberModel.name}Entry(entry.getKey(), entry.getValue());
                    continue;
                }

<#else>
                if (context.testExpression("${unmarshallerLocationName}", targetDepth)) {
                    ${shapeVarName}.set${memberModel.name}(${memberModel.variable.simpleType}StaxUnmarshaller.getInstance().unmarshall(context));
                    continue;
                }






© 2015 - 2025 Weber Informatics LLC | Privacy Policy