-- Generated by protobuf-simple. DO NOT EDIT!
module Types.Int64ListPacked where

import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB

newtype Int64ListPacked = Int64ListPacked
  { value :: PB.Seq PB.Int64
  } deriving (PB.Show, PB.Eq, PB.Ord)

instance PB.Default Int64ListPacked where
  defaultVal = Int64ListPacked
    { value = PB.defaultVal
    }

instance PB.Mergeable Int64ListPacked where
  merge a b = Int64ListPacked
    { value = PB.merge (value a) (value b)
    }

instance PB.Required Int64ListPacked where
  reqTags _ = PB.fromList []

instance PB.WireMessage Int64ListPacked where
  fieldToValue (PB.WireTag 1 PB.LenDelim) self = (\v -> self{value = PB.merge (value self) v}) <$> PB.getInt64Packed
  fieldToValue (PB.WireTag 1 PB.VarInt) self = (\v -> self{value = PB.append (value self) v}) <$> PB.getInt64
  fieldToValue tag self = PB.getUnknown tag self

  messageToFields self = do
    PB.putInt64Packed (PB.WireTag 1 PB.LenDelim) (value self)


