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

package tsptest.response.models;

/**
 * Defines values for GetUnionResponseContentType.
 */
public enum GetUnionResponseContentType {
    /**
     * Enum value application/json.
     */
    APPLICATION_JSON("application/json"),

    /**
     * Enum value application/json.
     */
    APPLICATION_JSON_1("application/json");

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

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

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

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