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

package com.azure.resourcemanager.databox.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/** Identifies the type of validation request. */
public enum ValidationInputDiscriminator {
    /** Enum value ValidateAddress. */
    VALIDATE_ADDRESS("ValidateAddress"),

    /** Enum value ValidateSubscriptionIsAllowedToCreateJob. */
    VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB("ValidateSubscriptionIsAllowedToCreateJob"),

    /** Enum value ValidatePreferences. */
    VALIDATE_PREFERENCES("ValidatePreferences"),

    /** Enum value ValidateCreateOrderLimit. */
    VALIDATE_CREATE_ORDER_LIMIT("ValidateCreateOrderLimit"),

    /** Enum value ValidateSkuAvailability. */
    VALIDATE_SKU_AVAILABILITY("ValidateSkuAvailability"),

    /** Enum value ValidateDataTransferDetails. */
    VALIDATE_DATA_TRANSFER_DETAILS("ValidateDataTransferDetails");

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

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

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

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