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

package com.azure.resourcemanager.alertsmanagement.models;

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

/** Reason for the modification. */
public enum SmartGroupModificationEvent {
    /** Enum value SmartGroupCreated. */
    SMART_GROUP_CREATED("SmartGroupCreated"),

    /** Enum value StateChange. */
    STATE_CHANGE("StateChange"),

    /** Enum value AlertAdded. */
    ALERT_ADDED("AlertAdded"),

    /** Enum value AlertRemoved. */
    ALERT_REMOVED("AlertRemoved");

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

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

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

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