All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bandwidth.sdk.model.DiversionTreatment Maven / Gradle / Ivy

Go to download

The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs

The newest version!
package com.bandwidth.sdk.model;

import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toMap;

import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
import java.util.Map;
import lombok.Getter;

@Getter
public enum DiversionTreatment {
    none("none"),
    propagate("propagate"),
    stack("stack"),
    ;

    private static final Map DESERIALIZATION_MAP =
            Arrays.stream(values())
                    .collect(toMap(v -> v.name, identity()));

    private final String name;

    DiversionTreatment(String name) {
        this.name = name;
    }

    @JsonCreator
    public static DiversionTreatment resolve(String name) {
        return DESERIALIZATION_MAP.get(name.toLowerCase());
    }

    @Override
    public String toString() {
        return name;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy