tsp-output/@azure-tools/typespec-java/src/main/java/com/notificationhubs/models/JsonPatchOperation.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.notificationhubs.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Represents a JSON Patch operation type. */
public final class JsonPatchOperation extends ExpandableStringEnum<JsonPatchOperation> {
    /** The add JSON patch operation type. */
    public static final JsonPatchOperation ADD = fromString("add");

    /** The remove JSON patch operation type. */
    public static final JsonPatchOperation REMOVE = fromString("remove");

    /** The replace JSON patch operation type. */
    public static final JsonPatchOperation REPLACE = fromString("replace");

    /**
     * Creates a new instance of JsonPatchOperation value.
     *
     * @deprecated Use the {@link #fromString(String)} factory method.
     */
    @Deprecated
    public JsonPatchOperation() {}

    /**
     * Creates or finds a JsonPatchOperation from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding JsonPatchOperation.
     */
    @JsonCreator
    public static JsonPatchOperation fromString(String name) {
        return fromString(name, JsonPatchOperation.class);
    }

    /**
     * Gets known JsonPatchOperation values.
     *
     * @return known JsonPatchOperation values.
     */
    public static Collection<JsonPatchOperation> values() {
        return values(JsonPatchOperation.class);
    }
}
