/** * Creates an immutable copy of a {@link SMFSchemaNameType} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable SMFSchemaName instance */ public static SMFSchemaName copyOf(SMFSchemaNameType instance) { if (instance instanceof SMFSchemaName) { return (SMFSchemaName) instance; } return SMFSchemaName.builder() .from(instance) .build(); }