public static List <AllocatedIpAddressAllocationType> Values()
        {
            AllocatedIpAddressAllocationType        addressAllocationType     = new AllocatedIpAddressAllocationType();
            List <AllocatedIpAddressAllocationType> addressAllocationTypeList = new List <AllocatedIpAddressAllocationType>();

            foreach (FieldInfo field in addressAllocationType.GetType().GetFields())
            {
                addressAllocationTypeList.Add((AllocatedIpAddressAllocationType)field.GetValue((object)addressAllocationType));
            }
            return(addressAllocationTypeList);
        }
 public static AllocatedIpAddressAllocationType FromValue(
     string value)
 {
     foreach (AllocatedIpAddressAllocationType addressAllocationType in AllocatedIpAddressAllocationType.Values())
     {
         if (addressAllocationType.Value().Equals(value))
         {
             return(addressAllocationType);
         }
     }
     throw new ArgumentException(value.ToString());
 }