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

templates.common.model-class.ftl Maven / Gradle / Ivy

${fileHeader}
package ${metadata.packageName}.model;

import java.io.Serializable;
import javax.annotation.Generated;
<#if shouldEmitStructuredPojoInterface>
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;


<#if shape.documentation?has_content || awsDocsUrl?has_content>
/**
<#if shape.documentation?has_content> * ${shape.documentation}
<#if awsDocsUrl?has_content> * ${awsDocsUrl}
 */

<#if shape.deprecated>
@Deprecated

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ${shape.shapeName} <#if baseClassFqcn??>extends ${baseClassFqcn}
    implements Serializable, Cloneable<#if shouldEmitStructuredPojoInterface>, StructuredPojo {

    <@VariableDeclarationMacro.content shape/>

    <#if shape.additionalConstructors?has_content>
        <@ConstructorDefinitionMacro.content shape/>
    

    <@MethodDefinitionMacro.content customConfig shape shape.shapeName/>

    <#-- Injection point for adding custom code to model classes -->
    <#if CustomModelClassMethodsMacro??>
        <@CustomModelClassMethodsMacro.content shape/>
    

    <@OverrideMethodsMacro.content shape/>

    @Override
    public ${shape.shapeName} clone() {
        try {
            return (${shape.shapeName}) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
    }

    <#if shouldEmitStructuredPojoInterface>
    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
       ${transformPackage}.${shape.shapeName}Marshaller.getInstance().marshall(this, protocolMarshaller);
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy