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

macros.marshaller.common.RequiredParameterValidationFunctionMacro.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 customConfig shape>

<#if customConfig.requiredParamValidationEnabled && shape.required?has_content>
  <#local requiredParams = shape.required/>

  private static void validateRequiredParams(${shape.variable.variableType} ${shape.variable.variableName}) {
  <#if shape.members?has_content>
    <#list shape.members as member>
      <#local c2jName = member.c2jName/>
      <#if requiredParams?seq_contains(c2jName)>
        if (${shape.variable.variableName}.get${member.name}() == null) {
          throw new IllegalArgumentException("Required Parameter ${member.name} missing in structure ${shape.variable.variableType}");
        }
      
    
  
  }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy