class Attachment {

        public static final String LOCATION_KEY = "location";

        private String name;

        private String location;

        public static String locationKey(int index) {
            return "_attach_location_" + index;
        }
    }


    @Nonnull
    @Override
    protected List<VariableDefinition> getEmbeddedVariables() {<FILL_FUNCTION_BODY>

        List<VariableDefinition> variables = new ArrayList<>();
        if (CollectionUtils.isEmpty(sendTo)) {
            variables.add(
                VariableDefinition
                    .builder()
                    .id(SEND_TO_KEY)
                    .name("收件人")
                    .expand(NotifyVariableBusinessConstant.businessId,
                            NotifyVariableBusinessConstant.NotifyVariableBusinessTypes.userType)
                    .required(true)
                    .type(ArrayType.ID)
                    .build()
            );
        }

        List<Attachment> attachments = getAttachments();
        if (!CollectionUtils.isEmpty(attachments)) {
            int index = 0;
            for (Attachment attachment : attachments) {
                index++;
                if (StringUtils.isNotEmpty(attachment.getName())
                    && StringUtils.isEmpty(attachment.getLocation())) {
                    variables.add(
                        VariableDefinition
                            .builder()
                            .id(locationKey(index))
                            .name(attachment.getName())
                            .type(FileType.ID)
                            .description(attachment.getName())
                            .format(Variable.FileFormat.any)
                            .required(true)
                            .build()
                    );
                }
            }
        }
        return variables;
    
<methods>public void <init>() ,public final Optional<org.jetlinks.community.notify.template.VariableDefinition> getVariable(java.lang.String) ,public final Map<java.lang.String,org.jetlinks.community.notify.template.VariableDefinition> getVariables() ,public Map<java.lang.String,java.lang.Object> toMap() ,public org.jetlinks.community.notify.email.embedded.EmailTemplate validate() ,public org.jetlinks.community.notify.email.embedded.EmailTemplate with(org.jetlinks.community.notify.template.TemplateProperties) <variables>private java.lang.String configId,private Map<java.lang.String,org.jetlinks.community.notify.template.VariableDefinition> variables