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

package com.azure.resourcemanager.customerinsights.models;

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

/** State of connector mapping. */
public enum ConnectorMappingStates {
    /** Enum value Creating. */
    CREATING("Creating"),

    /** Enum value Created. */
    CREATED("Created"),

    /** Enum value Failed. */
    FAILED("Failed"),

    /** Enum value Ready. */
    READY("Ready"),

    /** Enum value Running. */
    RUNNING("Running"),

    /** Enum value Stopped. */
    STOPPED("Stopped"),

    /** Enum value Expiring. */
    EXPIRING("Expiring");

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

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

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

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