// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package azure.core.page.models;

/**
 * An extensible enum input parameter.
 */
public enum ListItemInputExtensibleEnum {
    /**
     * The first enum value.
     */
    FIRST("First"),

    /**
     * The second enum value.
     */
    SECOND("Second");

    /**
     * The actual serialized value for a ListItemInputExtensibleEnum instance.
     */
    private final String value;

    ListItemInputExtensibleEnum(String value) {
        this.value = value;
    }

    /**
     * Parses a serialized value to a ListItemInputExtensibleEnum instance.
     * 
     * @param value the serialized value to parse.
     * @return the parsed ListItemInputExtensibleEnum object, or null if unable to parse.
     */
    public static ListItemInputExtensibleEnum fromString(String value) {
        if (value == null) {
            return null;
        }
        ListItemInputExtensibleEnum[] items = ListItemInputExtensibleEnum.values();
        for (ListItemInputExtensibleEnum item : items) {
            if (item.toString().equalsIgnoreCase(value)) {
                return item;
            }
        }
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return this.value;
    }
}
