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

com.spotinst.sdkjava.client.http.AgentTypeEnum Maven / Gradle / Ivy

There is a newer version: 1.0.121
Show newest version
package com.spotinst.sdkjava.client.http;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by yossi.elman on 04/05/2020.
 */
public enum AgentTypeEnum {

    SPINNAKER("Spinnaker"),
    CFN_PUBLIC_REGISTRY("CloudFormationPublicRegistry");

    private static final Logger LOGGER = LoggerFactory.getLogger(AgentTypeEnum.class);
    private              String name;

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

    public static AgentTypeEnum fromName(String name) {
        AgentTypeEnum retVal = null;

        for (AgentTypeEnum agentTypeEnum : AgentTypeEnum.values()) {
            if (name.equals(agentTypeEnum.name)) {
                retVal = agentTypeEnum;
                break;
            }
        }

        if (retVal == null) {
            LOGGER.error("Tried to create agent type enum for: " + name + ", but we don't support such type ");
        }

        return retVal;
    }

    public String getName() {
        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy