code: @Override
    public GeneratedCode generate(ClassTemplateSpec templateSpec) {
  
      String code;
      SwiftProperties swiftProperties = globalConfig.lookupSwiftProperties(templateSpec);
      if (swiftProperties.omit) return null;
  
      SwiftSyntax syntax = new SwiftSyntax(templateSpec, swiftProperties, globalConfig);
      SwiftyJSON swifty = new SwiftyJSON(syntax);
  
      try {
        if (templateSpec instanceof RecordTemplateSpec) {
          code = engine.render("rythm-swift/record.txt", templateSpec, syntax, swifty);
        } else if (templateSpec instanceof EnumTemplateSpec) {
          code = engine.render("rythm-swift/enum.txt", templateSpec);
        } else if (templateSpec instanceof UnionTemplateSpec) {
          code = engine.render("rythm-swift/union.txt", templateSpec, syntax, swifty);
        } else {
          return null; // Indicates that we are declining to generate code for the type (e.g. map or array)
        }
      } catch (RythmException e) {
        throw new RuntimeException(
          "Internal error in generator while processing " + templateSpec.getFullName(), e);
      }
      SwiftCompilationUnit compilationUnit =
          new SwiftCompilationUnit(
              templateSpec.getClassName(), "");
      code = formatter.format(code);
      return new GeneratedCode(compilationUnit, code);
    }
docs: See {@link org.coursera.courier.swift.SwiftProperties} for customization options.