docs: public static XContentBuilder marshall(PolicyDefinitionBean bean) throws StorageException {
          try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
              preMarshall(bean);
              builder
                  .startObject()
                      .field("id", bean.getId())
                      .field("name", bean.getName())
                      .field("description", bean.getDescription())
                      .field("form", bean.getForm())
                      .field("formType", bean.getFormType())
                      .field("icon", bean.getIcon())
                      .field("pluginId", bean.getPluginId())
                      .field("policyImpl", bean.getPolicyImpl())
                      .field("deleted", bean.isDeleted());
  
              Set<PolicyDefinitionTemplateBean> templates = bean.getTemplates();
              if (templates != null) {
                  builder.field("templates").startArray();
                  for (PolicyDefinitionTemplateBean template : templates) {
                      builder.startObject();
                      builder.field("language", template.getLanguage());
                      builder.field("template", template.getTemplate());
                      builder.endObject();
                  }
                  builder.endArray();
              }
  
              builder.endObject();
              postMarshall(bean);
              return builder;
          } catch (IOException e) {
              throw new StorageException(e);
          }
      }