using System;
namespace ProtoBuf
{
    /// 
    /// Used to define protocol-buffer specific behavior for
    /// enumerated values.
    /// 
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
    public sealed class ProtoEnumAttribute : Attribute
    {
        /// 
        /// Gets or sets the specific value to use for this enum during serialization.
        /// 
        public int Value
        {
            get { return enumValue; }
            set { this.enumValue = value; hasValue = true; }
        }
        /// 
        /// Indicates whether this instance has a customised value mapping
        /// 
        /// true if a specific value is set
        public bool HasValue() => hasValue;
        private bool hasValue;
        private int enumValue;
        /// 
        /// Gets or sets the defined name of the enum, as used in .proto
        /// (this name is not used during serialization).
        /// 
        public string Name { get; set; }
    }
}