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

templates.common.model-class.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
${fileHeader}
package ${metadata.packageName}.model;

import java.io.Serializable;

/**
 * <#if shape.documentation?has_content>${shape.documentation}
 */
<#if shape.deprecated>
@Deprecated

public class ${shape.shapeName} <#if baseClassFqcn??>extends ${baseClassFqcn}
    implements Serializable, Cloneable {

    <@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);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy