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

package type.union.models;

/**
 * Defines values for GetResponseProp.
 */
public enum GetResponseProp {
    /**
     * Enum value a.
     */
    A("a"),

    /**
     * Enum value b.
     */
    B("b"),

    /**
     * Enum value c.
     */
    C("c");

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

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

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

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