class KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer {

  @Override
  public Map<String, Object> toMap() {
    Map<String, Object> map = super.toMap();

    if (components != null) {
      List<Map<String, Object>> list = new ArrayList<>();
      for (KerberosComponentDescriptor component : components.values()) {
        list.add(component.toMap());
      }
      map.put(KEY_COMPONENTS, list);
    }

    if (preconfigure != null) {
      map.put(KEY_PRECONFIGURE, preconfigure.toString());
    }

    return map;
  }

    KerberosServiceDescriptor(Map<?, ?> data);
    KerberosServiceDescriptor(String name, Map<?, ?> data);

}