// 
// Decompiled by Procyon v0.6.0
// 

package com.google.crypto.tink.proto;

import com.google.protobuf.RuntimeVersion;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Internal;
import com.google.protobuf.ProtocolMessageEnum;

public enum OutputPrefixType implements ProtocolMessageEnum
{
    UNKNOWN_PREFIX(0), 
    TINK(1), 
    LEGACY(2), 
    RAW(3), 
    CRUNCHY(4), 
    WITH_ID_REQUIREMENT(5), 
    UNRECOGNIZED(-1);
    
    public static final int UNKNOWN_PREFIX_VALUE = 0;
    public static final int TINK_VALUE = 1;
    public static final int LEGACY_VALUE = 2;
    public static final int RAW_VALUE = 3;
    public static final int CRUNCHY_VALUE = 4;
    public static final int WITH_ID_REQUIREMENT_VALUE = 5;
    private static final Internal.EnumLiteMap<OutputPrefixType> internalValueMap;
    private static final OutputPrefixType[] VALUES;
    private final int value;
    
    @Override
    public final int getNumber() {
        if (this == OutputPrefixType.UNRECOGNIZED) {
            throw new IllegalArgumentException("Can't get the number of an unknown enum value.");
        }
        return this.value;
    }
    
    @Deprecated
    public static OutputPrefixType valueOf(final int value) {
        return forNumber(value);
    }
    
    public static OutputPrefixType forNumber(final int value) {
        switch (value) {
            case 0: {
                return OutputPrefixType.UNKNOWN_PREFIX;
            }
            case 1: {
                return OutputPrefixType.TINK;
            }
            case 2: {
                return OutputPrefixType.LEGACY;
            }
            case 3: {
                return OutputPrefixType.RAW;
            }
            case 4: {
                return OutputPrefixType.CRUNCHY;
            }
            case 5: {
                return OutputPrefixType.WITH_ID_REQUIREMENT;
            }
            default: {
                return null;
            }
        }
    }
    
    public static Internal.EnumLiteMap<OutputPrefixType> internalGetValueMap() {
        return OutputPrefixType.internalValueMap;
    }
    
    @Override
    public final Descriptors.EnumValueDescriptor getValueDescriptor() {
        if (this == OutputPrefixType.UNRECOGNIZED) {
            throw new IllegalStateException("Can't get the descriptor of an unrecognized enum value.");
        }
        return getDescriptor().getValues().get(this.ordinal());
    }
    
    @Override
    public final Descriptors.EnumDescriptor getDescriptorForType() {
        return getDescriptor();
    }
    
    public static Descriptors.EnumDescriptor getDescriptor() {
        return Tink.getDescriptor().getEnumTypes().get(1);
    }
    
    public static OutputPrefixType valueOf(final Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
            throw new IllegalArgumentException("EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
            return OutputPrefixType.UNRECOGNIZED;
        }
        return OutputPrefixType.VALUES[desc.getIndex()];
    }
    
    private OutputPrefixType(final int value) {
        this.value = value;
    }
    
    static {
        RuntimeVersion.validateProtobufGencodeVersion(RuntimeVersion.RuntimeDomain.PUBLIC, 4, 32, 1, "", OutputPrefixType.class.getName());
        internalValueMap = new Internal.EnumLiteMap<OutputPrefixType>() {
            @Override
            public OutputPrefixType findValueByNumber(final int number) {
                return OutputPrefixType.forNumber(number);
            }
        };
        VALUES = values();
    }
}
