{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-}
{-# OPTIONS_GHC  -w #-}
module Text.DescriptorProtos.EnumDescriptorProto (EnumDescriptorProto(..)) where
import Prelude ((+), (/), (++), (.))
import qualified Prelude as Prelude'
import qualified Data.List as Prelude'
import qualified Data.Typeable as Prelude'
import qualified GHC.Generics as Prelude'
import qualified Data.Data as Prelude'
import qualified Text.ProtocolBuffers.Header as P'
import qualified Text.DescriptorProtos.EnumOptions as DescriptorProtos (EnumOptions)
import qualified Text.DescriptorProtos.EnumValueDescriptorProto as DescriptorProtos (EnumValueDescriptorProto)

data EnumDescriptorProto = EnumDescriptorProto{EnumDescriptorProto -> Maybe Utf8
name :: !(P'.Maybe P'.Utf8),
                                               EnumDescriptorProto -> Seq EnumValueDescriptorProto
value :: !(P'.Seq DescriptorProtos.EnumValueDescriptorProto),
                                               EnumDescriptorProto -> Maybe EnumOptions
options :: !(P'.Maybe DescriptorProtos.EnumOptions),
                                               EnumDescriptorProto -> UnknownField
unknown'field :: !(P'.UnknownField)}
                           deriving (Int -> EnumDescriptorProto -> ShowS
[EnumDescriptorProto] -> ShowS
EnumDescriptorProto -> String
(Int -> EnumDescriptorProto -> ShowS)
-> (EnumDescriptorProto -> String)
-> ([EnumDescriptorProto] -> ShowS)
-> Show EnumDescriptorProto
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnumDescriptorProto] -> ShowS
$cshowList :: [EnumDescriptorProto] -> ShowS
show :: EnumDescriptorProto -> String
$cshow :: EnumDescriptorProto -> String
showsPrec :: Int -> EnumDescriptorProto -> ShowS
$cshowsPrec :: Int -> EnumDescriptorProto -> ShowS
Prelude'.Show, EnumDescriptorProto -> EnumDescriptorProto -> Bool
(EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> (EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> Eq EnumDescriptorProto
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c/= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
== :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c== :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
Prelude'.Eq, Eq EnumDescriptorProto
Eq EnumDescriptorProto
-> (EnumDescriptorProto -> EnumDescriptorProto -> Ordering)
-> (EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> (EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> (EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> (EnumDescriptorProto -> EnumDescriptorProto -> Bool)
-> (EnumDescriptorProto
    -> EnumDescriptorProto -> EnumDescriptorProto)
-> (EnumDescriptorProto
    -> EnumDescriptorProto -> EnumDescriptorProto)
-> Ord EnumDescriptorProto
EnumDescriptorProto -> EnumDescriptorProto -> Bool
EnumDescriptorProto -> EnumDescriptorProto -> Ordering
EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
$cmin :: EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
max :: EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
$cmax :: EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
>= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c>= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
> :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c> :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
<= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c<= :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
< :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
$c< :: EnumDescriptorProto -> EnumDescriptorProto -> Bool
compare :: EnumDescriptorProto -> EnumDescriptorProto -> Ordering
$ccompare :: EnumDescriptorProto -> EnumDescriptorProto -> Ordering
$cp1Ord :: Eq EnumDescriptorProto
Prelude'.Ord, Prelude'.Typeable, Typeable EnumDescriptorProto
DataType
Constr
Typeable EnumDescriptorProto
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> EnumDescriptorProto
    -> c EnumDescriptorProto)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c EnumDescriptorProto)
-> (EnumDescriptorProto -> Constr)
-> (EnumDescriptorProto -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c EnumDescriptorProto))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c EnumDescriptorProto))
-> ((forall b. Data b => b -> b)
    -> EnumDescriptorProto -> EnumDescriptorProto)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> EnumDescriptorProto -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> EnumDescriptorProto -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> EnumDescriptorProto -> m EnumDescriptorProto)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> EnumDescriptorProto -> m EnumDescriptorProto)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> EnumDescriptorProto -> m EnumDescriptorProto)
-> Data EnumDescriptorProto
EnumDescriptorProto -> DataType
EnumDescriptorProto -> Constr
(forall b. Data b => b -> b)
-> EnumDescriptorProto -> EnumDescriptorProto
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> EnumDescriptorProto
-> c EnumDescriptorProto
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EnumDescriptorProto
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> EnumDescriptorProto -> u
forall u.
(forall d. Data d => d -> u) -> EnumDescriptorProto -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EnumDescriptorProto
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> EnumDescriptorProto
-> c EnumDescriptorProto
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EnumDescriptorProto)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EnumDescriptorProto)
$cEnumDescriptorProto :: Constr
$tEnumDescriptorProto :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
gmapMp :: (forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
gmapM :: (forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> EnumDescriptorProto -> m EnumDescriptorProto
gmapQi :: Int -> (forall d. Data d => d -> u) -> EnumDescriptorProto -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> EnumDescriptorProto -> u
gmapQ :: (forall d. Data d => d -> u) -> EnumDescriptorProto -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> EnumDescriptorProto -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> EnumDescriptorProto -> r
gmapT :: (forall b. Data b => b -> b)
-> EnumDescriptorProto -> EnumDescriptorProto
$cgmapT :: (forall b. Data b => b -> b)
-> EnumDescriptorProto -> EnumDescriptorProto
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EnumDescriptorProto)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c EnumDescriptorProto)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c EnumDescriptorProto)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c EnumDescriptorProto)
dataTypeOf :: EnumDescriptorProto -> DataType
$cdataTypeOf :: EnumDescriptorProto -> DataType
toConstr :: EnumDescriptorProto -> Constr
$ctoConstr :: EnumDescriptorProto -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EnumDescriptorProto
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c EnumDescriptorProto
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> EnumDescriptorProto
-> c EnumDescriptorProto
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> EnumDescriptorProto
-> c EnumDescriptorProto
$cp1Data :: Typeable EnumDescriptorProto
Prelude'.Data, (forall x. EnumDescriptorProto -> Rep EnumDescriptorProto x)
-> (forall x. Rep EnumDescriptorProto x -> EnumDescriptorProto)
-> Generic EnumDescriptorProto
forall x. Rep EnumDescriptorProto x -> EnumDescriptorProto
forall x. EnumDescriptorProto -> Rep EnumDescriptorProto x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnumDescriptorProto x -> EnumDescriptorProto
$cfrom :: forall x. EnumDescriptorProto -> Rep EnumDescriptorProto x
Prelude'.Generic)

instance P'.UnknownMessage EnumDescriptorProto where
  getUnknownField :: EnumDescriptorProto -> UnknownField
getUnknownField = EnumDescriptorProto -> UnknownField
unknown'field
  putUnknownField :: UnknownField -> EnumDescriptorProto -> EnumDescriptorProto
putUnknownField UnknownField
u'f EnumDescriptorProto
msg = EnumDescriptorProto
msg{unknown'field :: UnknownField
unknown'field = UnknownField
u'f}

instance P'.Mergeable EnumDescriptorProto where
  mergeAppend :: EnumDescriptorProto -> EnumDescriptorProto -> EnumDescriptorProto
mergeAppend (EnumDescriptorProto Maybe Utf8
x'1 Seq EnumValueDescriptorProto
x'2 Maybe EnumOptions
x'3 UnknownField
x'4) (EnumDescriptorProto Maybe Utf8
y'1 Seq EnumValueDescriptorProto
y'2 Maybe EnumOptions
y'3 UnknownField
y'4)
   = let !z'1 :: Maybe Utf8
z'1 = Maybe Utf8 -> Maybe Utf8 -> Maybe Utf8
forall a. Mergeable a => a -> a -> a
P'.mergeAppend Maybe Utf8
x'1 Maybe Utf8
y'1
         !z'2 :: Seq EnumValueDescriptorProto
z'2 = Seq EnumValueDescriptorProto
-> Seq EnumValueDescriptorProto -> Seq EnumValueDescriptorProto
forall a. Mergeable a => a -> a -> a
P'.mergeAppend Seq EnumValueDescriptorProto
x'2 Seq EnumValueDescriptorProto
y'2
         !z'3 :: Maybe EnumOptions
z'3 = Maybe EnumOptions -> Maybe EnumOptions -> Maybe EnumOptions
forall a. Mergeable a => a -> a -> a
P'.mergeAppend Maybe EnumOptions
x'3 Maybe EnumOptions
y'3
         !z'4 :: UnknownField
z'4 = UnknownField -> UnknownField -> UnknownField
forall a. Mergeable a => a -> a -> a
P'.mergeAppend UnknownField
x'4 UnknownField
y'4
      in Maybe Utf8
-> Seq EnumValueDescriptorProto
-> Maybe EnumOptions
-> UnknownField
-> EnumDescriptorProto
EnumDescriptorProto Maybe Utf8
z'1 Seq EnumValueDescriptorProto
z'2 Maybe EnumOptions
z'3 UnknownField
z'4

instance P'.Default EnumDescriptorProto where
  defaultValue :: EnumDescriptorProto
defaultValue = Maybe Utf8
-> Seq EnumValueDescriptorProto
-> Maybe EnumOptions
-> UnknownField
-> EnumDescriptorProto
EnumDescriptorProto Maybe Utf8
forall a. Default a => a
P'.defaultValue Seq EnumValueDescriptorProto
forall a. Default a => a
P'.defaultValue Maybe EnumOptions
forall a. Default a => a
P'.defaultValue UnknownField
forall a. Default a => a
P'.defaultValue

instance P'.Wire EnumDescriptorProto where
  wireSize :: FieldType -> EnumDescriptorProto -> WireSize
wireSize FieldType
ft' self' :: EnumDescriptorProto
self'@(EnumDescriptorProto Maybe Utf8
x'1 Seq EnumValueDescriptorProto
x'2 Maybe EnumOptions
x'3 UnknownField
x'4)
   = case FieldType
ft' of
       FieldType
10 -> WireSize
calc'Size
       FieldType
11 -> WireSize -> WireSize
P'.prependMessageSize WireSize
calc'Size
       FieldType
_ -> FieldType -> EnumDescriptorProto -> WireSize
forall a. Typeable a => FieldType -> a -> WireSize
P'.wireSizeErr FieldType
ft' EnumDescriptorProto
self'
    where
        calc'Size :: WireSize
calc'Size = (WireSize -> FieldType -> Maybe Utf8 -> WireSize
forall v. Wire v => WireSize -> FieldType -> Maybe v -> WireSize
P'.wireSizeOpt WireSize
1 FieldType
9 Maybe Utf8
x'1 WireSize -> WireSize -> WireSize
forall a. Num a => a -> a -> a
+ WireSize -> FieldType -> Seq EnumValueDescriptorProto -> WireSize
forall v. Wire v => WireSize -> FieldType -> Seq v -> WireSize
P'.wireSizeRep WireSize
1 FieldType
11 Seq EnumValueDescriptorProto
x'2 WireSize -> WireSize -> WireSize
forall a. Num a => a -> a -> a
+ WireSize -> FieldType -> Maybe EnumOptions -> WireSize
forall v. Wire v => WireSize -> FieldType -> Maybe v -> WireSize
P'.wireSizeOpt WireSize
1 FieldType
11 Maybe EnumOptions
x'3 WireSize -> WireSize -> WireSize
forall a. Num a => a -> a -> a
+ UnknownField -> WireSize
P'.wireSizeUnknownField UnknownField
x'4)
  wirePutWithSize :: FieldType -> EnumDescriptorProto -> PutM WireSize
wirePutWithSize FieldType
ft' self' :: EnumDescriptorProto
self'@(EnumDescriptorProto Maybe Utf8
x'1 Seq EnumValueDescriptorProto
x'2 Maybe EnumOptions
x'3 UnknownField
x'4)
   = case FieldType
ft' of
       FieldType
10 -> PutM WireSize
put'Fields
       FieldType
11 -> PutM WireSize
put'FieldsSized
       FieldType
_ -> FieldType -> EnumDescriptorProto -> PutM WireSize
forall a b. Typeable a => FieldType -> a -> PutM b
P'.wirePutErr FieldType
ft' EnumDescriptorProto
self'
    where
        put'Fields :: PutM WireSize
put'Fields
         = [PutM WireSize] -> PutM WireSize
forall (f :: * -> *).
Foldable f =>
f (PutM WireSize) -> PutM WireSize
P'.sequencePutWithSize
            [WireTag -> FieldType -> Maybe Utf8 -> PutM WireSize
forall v.
Wire v =>
WireTag -> FieldType -> Maybe v -> PutM WireSize
P'.wirePutOptWithSize WireTag
10 FieldType
9 Maybe Utf8
x'1, WireTag
-> FieldType -> Seq EnumValueDescriptorProto -> PutM WireSize
forall v. Wire v => WireTag -> FieldType -> Seq v -> PutM WireSize
P'.wirePutRepWithSize WireTag
18 FieldType
11 Seq EnumValueDescriptorProto
x'2, WireTag -> FieldType -> Maybe EnumOptions -> PutM WireSize
forall v.
Wire v =>
WireTag -> FieldType -> Maybe v -> PutM WireSize
P'.wirePutOptWithSize WireTag
26 FieldType
11 Maybe EnumOptions
x'3,
             UnknownField -> PutM WireSize
P'.wirePutUnknownFieldWithSize UnknownField
x'4]
        put'FieldsSized :: PutM WireSize
put'FieldsSized
         = let size' :: WireSize
size' = (WireSize, ByteString) -> WireSize
forall a b. (a, b) -> a
Prelude'.fst (PutM WireSize -> (WireSize, ByteString)
forall a. PutM a -> (a, ByteString)
P'.runPutM PutM WireSize
put'Fields)
               put'Size :: PutM WireSize
put'Size
                = do
                    WireSize -> Put
P'.putSize WireSize
size'
                    WireSize -> PutM WireSize
forall (m :: * -> *) a. Monad m => a -> m a
Prelude'.return (WireSize -> WireSize
P'.size'WireSize WireSize
size')
            in [PutM WireSize] -> PutM WireSize
forall (f :: * -> *).
Foldable f =>
f (PutM WireSize) -> PutM WireSize
P'.sequencePutWithSize [PutM WireSize
put'Size, PutM WireSize
put'Fields]
  wireGet :: FieldType -> Get EnumDescriptorProto
wireGet FieldType
ft'
   = case FieldType
ft' of
       FieldType
10 -> (WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> Get EnumDescriptorProto
forall message.
(Default message, ReflectDescriptor message) =>
(WireTag -> message -> Get message) -> Get message
P'.getBareMessageWith ((WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> (WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> WireTag
-> EnumDescriptorProto
-> Get EnumDescriptorProto
forall a.
(WireTag -> a -> Get a)
-> (WireTag -> a -> Get a) -> WireTag -> a -> Get a
P'.catch'Unknown' WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto
forall a. UnknownMessage a => WireTag -> a -> Get a
P'.loadUnknown WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto
update'Self)
       FieldType
11 -> (WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> Get EnumDescriptorProto
forall message.
(Default message, ReflectDescriptor message) =>
(WireTag -> message -> Get message) -> Get message
P'.getMessageWith ((WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> (WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto)
-> WireTag
-> EnumDescriptorProto
-> Get EnumDescriptorProto
forall a.
(WireTag -> a -> Get a)
-> (WireTag -> a -> Get a) -> WireTag -> a -> Get a
P'.catch'Unknown' WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto
forall a. UnknownMessage a => WireTag -> a -> Get a
P'.loadUnknown WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto
update'Self)
       FieldType
_ -> FieldType -> Get EnumDescriptorProto
forall a. Typeable a => FieldType -> Get a
P'.wireGetErr FieldType
ft'
    where
        update'Self :: WireTag -> EnumDescriptorProto -> Get EnumDescriptorProto
update'Self WireTag
wire'Tag EnumDescriptorProto
old'Self
         = case WireTag
wire'Tag of
             WireTag
10 -> (Utf8 -> EnumDescriptorProto)
-> Get Utf8 -> Get EnumDescriptorProto
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ !Utf8
new'Field -> EnumDescriptorProto
old'Self{name :: Maybe Utf8
name = Utf8 -> Maybe Utf8
forall a. a -> Maybe a
Prelude'.Just Utf8
new'Field}) (FieldType -> Get Utf8
forall b. Wire b => FieldType -> Get b
P'.wireGet FieldType
9)
             WireTag
18 -> (EnumValueDescriptorProto -> EnumDescriptorProto)
-> Get EnumValueDescriptorProto -> Get EnumDescriptorProto
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ !EnumValueDescriptorProto
new'Field -> EnumDescriptorProto
old'Self{value :: Seq EnumValueDescriptorProto
value = Seq EnumValueDescriptorProto
-> EnumValueDescriptorProto -> Seq EnumValueDescriptorProto
forall a. Seq a -> a -> Seq a
P'.append (EnumDescriptorProto -> Seq EnumValueDescriptorProto
value EnumDescriptorProto
old'Self) EnumValueDescriptorProto
new'Field}) (FieldType -> Get EnumValueDescriptorProto
forall b. Wire b => FieldType -> Get b
P'.wireGet FieldType
11)
             WireTag
26 -> (EnumOptions -> EnumDescriptorProto)
-> Get EnumOptions -> Get EnumDescriptorProto
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ !EnumOptions
new'Field -> EnumDescriptorProto
old'Self{options :: Maybe EnumOptions
options = Maybe EnumOptions -> Maybe EnumOptions -> Maybe EnumOptions
forall a. Mergeable a => a -> a -> a
P'.mergeAppend (EnumDescriptorProto -> Maybe EnumOptions
options EnumDescriptorProto
old'Self) (EnumOptions -> Maybe EnumOptions
forall a. a -> Maybe a
Prelude'.Just EnumOptions
new'Field)})
                    (FieldType -> Get EnumOptions
forall b. Wire b => FieldType -> Get b
P'.wireGet FieldType
11)
             WireTag
_ -> let (FieldId
field'Number, WireType
wire'Type) = WireTag -> (FieldId, WireType)
P'.splitWireTag WireTag
wire'Tag in FieldId
-> WireType -> EnumDescriptorProto -> Get EnumDescriptorProto
forall a.
(Typeable a, ReflectDescriptor a) =>
FieldId -> WireType -> a -> Get a
P'.unknown FieldId
field'Number WireType
wire'Type EnumDescriptorProto
old'Self

instance P'.MessageAPI msg' (msg' -> EnumDescriptorProto) EnumDescriptorProto where
  getVal :: msg' -> (msg' -> EnumDescriptorProto) -> EnumDescriptorProto
getVal msg'
m' msg' -> EnumDescriptorProto
f' = msg' -> EnumDescriptorProto
f' msg'
m'

instance P'.GPB EnumDescriptorProto

instance P'.ReflectDescriptor EnumDescriptorProto where
  getMessageInfo :: EnumDescriptorProto -> GetMessageInfo
getMessageInfo EnumDescriptorProto
_ = Set WireTag -> Set WireTag -> GetMessageInfo
P'.GetMessageInfo ([WireTag] -> Set WireTag
forall a. [a] -> Set a
P'.fromDistinctAscList []) ([WireTag] -> Set WireTag
forall a. [a] -> Set a
P'.fromDistinctAscList [WireTag
10, WireTag
18, WireTag
26])
  reflectDescriptorInfo :: EnumDescriptorProto -> DescriptorInfo
reflectDescriptorInfo EnumDescriptorProto
_
   = String -> DescriptorInfo
forall a. Read a => String -> a
Prelude'.read
      String
"DescriptorInfo {descName = ProtoName {protobufName = FIName \".google.protobuf.EnumDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumDescriptorProto\"}, descFilePath = [\"Text\",\"DescriptorProtos\",\"EnumDescriptorProto.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.name\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"name\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 9}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.value\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"value\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumValueDescriptorProto\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumValueDescriptorProto\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".google.protobuf.EnumDescriptorProto.options\", haskellPrefix' = [MName \"Text\"], parentModule' = [MName \"DescriptorProtos\",MName \"EnumDescriptorProto\"], baseName' = FName \"options\", baseNamePrefix' = \"\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".google.protobuf.EnumOptions\", haskellPrefix = [MName \"Text\"], parentModule = [MName \"DescriptorProtos\"], baseName = MName \"EnumOptions\"}), hsRawDefault = Nothing, hsDefault = Nothing}], descOneofs = fromList [], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = True, lazyFields = False, makeLenses = False, jsonInstances = False}"

instance P'.TextType EnumDescriptorProto where
  tellT :: String -> EnumDescriptorProto -> Output
tellT = String -> EnumDescriptorProto -> Output
forall a. TextMsg a => String -> a -> Output
P'.tellSubMessage
  getT :: String -> Parsec s () EnumDescriptorProto
getT = String -> Parsec s () EnumDescriptorProto
forall s a.
(Stream s Identity Char, TextMsg a) =>
String -> Parsec s () a
P'.getSubMessage

instance P'.TextMsg EnumDescriptorProto where
  textPut :: EnumDescriptorProto -> Output
textPut EnumDescriptorProto
msg
   = do
       String -> Maybe Utf8 -> Output
forall a. TextType a => String -> a -> Output
P'.tellT String
"name" (EnumDescriptorProto -> Maybe Utf8
name EnumDescriptorProto
msg)
       String -> Seq EnumValueDescriptorProto -> Output
forall a. TextType a => String -> a -> Output
P'.tellT String
"value" (EnumDescriptorProto -> Seq EnumValueDescriptorProto
value EnumDescriptorProto
msg)
       String -> Maybe EnumOptions -> Output
forall a. TextType a => String -> a -> Output
P'.tellT String
"options" (EnumDescriptorProto -> Maybe EnumOptions
options EnumDescriptorProto
msg)
  textGet :: Parsec s () EnumDescriptorProto
textGet
   = do
       [EnumDescriptorProto -> EnumDescriptorProto]
mods <- ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
-> ParsecT s () Identity ()
-> ParsecT
     s () Identity [EnumDescriptorProto -> EnumDescriptorProto]
forall s (m :: * -> *) t u a sep.
Stream s m t =>
ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]
P'.sepEndBy ([ParsecT
   s () Identity (EnumDescriptorProto -> EnumDescriptorProto)]
-> ParsecT
     s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
forall s (m :: * -> *) t u a.
Stream s m t =>
[ParsecT s u m a] -> ParsecT s u m a
P'.choice [ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'name, ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'value, ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'options]) ParsecT s () Identity ()
forall s (m :: * -> *) u. Stream s m Char => ParsecT s u m ()
P'.spaces
       EnumDescriptorProto -> Parsec s () EnumDescriptorProto
forall (m :: * -> *) a. Monad m => a -> m a
Prelude'.return ((EnumDescriptorProto
 -> (EnumDescriptorProto -> EnumDescriptorProto)
 -> EnumDescriptorProto)
-> EnumDescriptorProto
-> [EnumDescriptorProto -> EnumDescriptorProto]
-> EnumDescriptorProto
forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
Prelude'.foldl' (\ EnumDescriptorProto
v EnumDescriptorProto -> EnumDescriptorProto
f -> EnumDescriptorProto -> EnumDescriptorProto
f EnumDescriptorProto
v) EnumDescriptorProto
forall a. Default a => a
P'.defaultValue [EnumDescriptorProto -> EnumDescriptorProto]
mods)
    where
        parse'name :: ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'name = (Maybe Utf8 -> EnumDescriptorProto -> EnumDescriptorProto)
-> ParsecT s () Identity (Maybe Utf8)
-> ParsecT
     s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ Maybe Utf8
v EnumDescriptorProto
o -> EnumDescriptorProto
o{name :: Maybe Utf8
name = Maybe Utf8
v}) (ParsecT s () Identity (Maybe Utf8)
-> ParsecT s () Identity (Maybe Utf8)
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
P'.try (String -> ParsecT s () Identity (Maybe Utf8)
forall a s.
(TextType a, Stream s Identity Char) =>
String -> Parsec s () a
P'.getT String
"name"))
        parse'value :: ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'value = (EnumValueDescriptorProto
 -> EnumDescriptorProto -> EnumDescriptorProto)
-> ParsecT s () Identity EnumValueDescriptorProto
-> ParsecT
     s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ EnumValueDescriptorProto
v EnumDescriptorProto
o -> EnumDescriptorProto
o{value :: Seq EnumValueDescriptorProto
value = Seq EnumValueDescriptorProto
-> EnumValueDescriptorProto -> Seq EnumValueDescriptorProto
forall a. Seq a -> a -> Seq a
P'.append (EnumDescriptorProto -> Seq EnumValueDescriptorProto
value EnumDescriptorProto
o) EnumValueDescriptorProto
v}) (ParsecT s () Identity EnumValueDescriptorProto
-> ParsecT s () Identity EnumValueDescriptorProto
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
P'.try (String -> ParsecT s () Identity EnumValueDescriptorProto
forall a s.
(TextType a, Stream s Identity Char) =>
String -> Parsec s () a
P'.getT String
"value"))
        parse'options :: ParsecT s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
parse'options = (Maybe EnumOptions -> EnumDescriptorProto -> EnumDescriptorProto)
-> ParsecT s () Identity (Maybe EnumOptions)
-> ParsecT
     s () Identity (EnumDescriptorProto -> EnumDescriptorProto)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude'.fmap (\ Maybe EnumOptions
v EnumDescriptorProto
o -> EnumDescriptorProto
o{options :: Maybe EnumOptions
options = Maybe EnumOptions
v}) (ParsecT s () Identity (Maybe EnumOptions)
-> ParsecT s () Identity (Maybe EnumOptions)
forall s u (m :: * -> *) a. ParsecT s u m a -> ParsecT s u m a
P'.try (String -> ParsecT s () Identity (Maybe EnumOptions)
forall a s.
(TextType a, Stream s Identity Char) =>
String -> Parsec s () a
P'.getT String
"options"))