private static void configureAttributeNameFormat(final Attribute attribute, final String nameFormat) {
        LOGGER.trace("Configuring Attribute's: [{}] nameFormat: [{}]", attribute, nameFormat);
        if (StringUtils.isBlank(nameFormat)) {
            return;
        }

        val compareFormat = nameFormat.trim().toLowerCase(Locale.ENGLISH);
        switch (compareFormat) {
            case "basic", Attribute.BASIC -> attribute.setNameFormat(Attribute.BASIC);
            case "uri", Attribute.URI_REFERENCE -> attribute.setNameFormat(Attribute.URI_REFERENCE);
            case "unspecified", Attribute.UNSPECIFIED -> attribute.setNameFormat(Attribute.UNSPECIFIED);
            default -> attribute.setNameFormat(nameFormat);
        }
    }
This is {@link AbstractSaml20ObjectBuilder}.
to build saml2 objects.

@author Misagh Moayyed
@since 4.1
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/AbstractSaml20ObjectBuilder.java