code: protected Attribute newAttribute(final String attributeFriendlyName,
                                       final String attributeName,
                                       final Object attributeValue,
                                       final Map<String, String> configuredNameFormats,
                                       final String defaultNameFormat,
                                       final Map<String, String> attributeValueTypes) {
          val attribute = newSamlObject(Attribute.class);
          attribute.setName(attributeName);
  
          if (StringUtils.isNotBlank(attributeFriendlyName)) {
              attribute.setFriendlyName(attributeFriendlyName);
          } else {
              attribute.setFriendlyName(attributeName);
          }
  
          val valueType = attributeValueTypes.get(attributeName);
          addAttributeValuesToSaml2Attribute(attributeName, attributeValue, valueType, attribute.getAttributeValues());
  
          if (!configuredNameFormats.isEmpty() && configuredNameFormats.containsKey(attribute.getName())) {
              val nameFormat = configuredNameFormats.get(attribute.getName());
              LOGGER.debug("Found name format [{}] for attribute [{}]", nameFormat, attribute.getName());
              configureAttributeNameFormat(attribute, nameFormat);
              LOGGER.debug("Attribute [{}] is assigned the name format of [{}]", attribute.getName(), attribute.getNameFormat());
          } else {
              LOGGER.debug("Skipped name format, as no name formats are defined or none is found for attribute [{}]", attribute.getName());
              configureAttributeNameFormat(attribute, defaultNameFormat);
          }
  
          LOGGER.debug("Attribute [{}] has [{}] value(s)", attribute.getName(), attribute.getAttributeValues().size());
          return attribute;
      }
docs: New attribute.
  
  @param attributeFriendlyName the attribute friendly name
  @param attributeName         the attribute name
  @param attributeValue        the attribute value
  @param configuredNameFormats the configured name formats. If an attribute is found in this collection, the linked name format will be used.
  @param defaultNameFormat     the default name format
  @param attributeValueTypes   the attribute value types
  @return the attribute