// 
// 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 EcPointFormat implements ProtocolMessageEnum
{
    UNKNOWN_FORMAT(0), 
    UNCOMPRESSED(1), 
    COMPRESSED(2), 
    DO_NOT_USE_CRUNCHY_UNCOMPRESSED(3), 
    UNRECOGNIZED(-1);
    
    public static final int UNKNOWN_FORMAT_VALUE = 0;
    public static final int UNCOMPRESSED_VALUE = 1;
    public static final int COMPRESSED_VALUE = 2;
    public static final int DO_NOT_USE_CRUNCHY_UNCOMPRESSED_VALUE = 3;
    private static final Internal.EnumLiteMap<EcPointFormat> internalValueMap;
    private static final EcPointFormat[] VALUES;
    private final int value;
    
    @Override
    public final int getNumber() {
        if (this == EcPointFormat.UNRECOGNIZED) {
            throw new IllegalArgumentException("Can't get the number of an unknown enum value.");
        }
        return this.value;
    }
    
    @Deprecated
    public static EcPointFormat valueOf(final int value) {
        return forNumber(value);
    }
    
    public static EcPointFormat forNumber(final int value) {
        switch (value) {
            case 0: {
                return EcPointFormat.UNKNOWN_FORMAT;
            }
            case 1: {
                return EcPointFormat.UNCOMPRESSED;
            }
            case 2: {
                return EcPointFormat.COMPRESSED;
            }
            case 3: {
                return EcPointFormat.DO_NOT_USE_CRUNCHY_UNCOMPRESSED;
            }
            default: {
                return null;
            }
        }
    }
    
    public static Internal.EnumLiteMap<EcPointFormat> internalGetValueMap() {
        return EcPointFormat.internalValueMap;
    }
    
    @Override
    public final Descriptors.EnumValueDescriptor getValueDescriptor() {
        if (this == EcPointFormat.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 Common.getDescriptor().getEnumTypes().get(1);
    }
    
    public static EcPointFormat valueOf(final Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
            throw new IllegalArgumentException("EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
            return EcPointFormat.UNRECOGNIZED;
        }
        return EcPointFormat.VALUES[desc.getIndex()];
    }
    
    private EcPointFormat(final int value) {
        this.value = value;
    }
    
    static {
        RuntimeVersion.validateProtobufGencodeVersion(RuntimeVersion.RuntimeDomain.PUBLIC, 4, 32, 1, "", EcPointFormat.class.getName());
        internalValueMap = new Internal.EnumLiteMap<EcPointFormat>() {
            @Override
            public EcPointFormat findValueByNumber(final int number) {
                return EcPointFormat.forNumber(number);
            }
        };
        VALUES = values();
    }
}
