{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Mls (
CommitBundle(), GroupInfoBundle(), GroupInfoType(..),
GroupInfoType(), RatchetTreeType(..), RatchetTreeType()
) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
data CommitBundle
= CommitBundle'_constructor {CommitBundle -> ByteString
_CommitBundle'commit :: !Data.ByteString.ByteString,
CommitBundle -> Maybe ByteString
_CommitBundle'welcome :: !(Prelude.Maybe Data.ByteString.ByteString),
CommitBundle -> GroupInfoBundle
_CommitBundle'groupInfoBundle :: !GroupInfoBundle,
CommitBundle -> FieldSet
_CommitBundle'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (CommitBundle -> CommitBundle -> Bool
(CommitBundle -> CommitBundle -> Bool)
-> (CommitBundle -> CommitBundle -> Bool) -> Eq CommitBundle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CommitBundle -> CommitBundle -> Bool
== :: CommitBundle -> CommitBundle -> Bool
$c/= :: CommitBundle -> CommitBundle -> Bool
/= :: CommitBundle -> CommitBundle -> Bool
Prelude.Eq, Eq CommitBundle
Eq CommitBundle =>
(CommitBundle -> CommitBundle -> Ordering)
-> (CommitBundle -> CommitBundle -> Bool)
-> (CommitBundle -> CommitBundle -> Bool)
-> (CommitBundle -> CommitBundle -> Bool)
-> (CommitBundle -> CommitBundle -> Bool)
-> (CommitBundle -> CommitBundle -> CommitBundle)
-> (CommitBundle -> CommitBundle -> CommitBundle)
-> Ord CommitBundle
CommitBundle -> CommitBundle -> Bool
CommitBundle -> CommitBundle -> Ordering
CommitBundle -> CommitBundle -> CommitBundle
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
$ccompare :: CommitBundle -> CommitBundle -> Ordering
compare :: CommitBundle -> CommitBundle -> Ordering
$c< :: CommitBundle -> CommitBundle -> Bool
< :: CommitBundle -> CommitBundle -> Bool
$c<= :: CommitBundle -> CommitBundle -> Bool
<= :: CommitBundle -> CommitBundle -> Bool
$c> :: CommitBundle -> CommitBundle -> Bool
> :: CommitBundle -> CommitBundle -> Bool
$c>= :: CommitBundle -> CommitBundle -> Bool
>= :: CommitBundle -> CommitBundle -> Bool
$cmax :: CommitBundle -> CommitBundle -> CommitBundle
max :: CommitBundle -> CommitBundle -> CommitBundle
$cmin :: CommitBundle -> CommitBundle -> CommitBundle
min :: CommitBundle -> CommitBundle -> CommitBundle
Prelude.Ord)
instance Prelude.Show CommitBundle where
showsPrec :: Int -> CommitBundle -> ShowS
showsPrec Int
_ CommitBundle
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(CommitBundle -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort CommitBundle
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField CommitBundle "commit" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "commit"
-> (ByteString -> f ByteString) -> CommitBundle -> f CommitBundle
fieldOf Proxy# "commit"
_
= ((ByteString -> f ByteString) -> CommitBundle -> f CommitBundle)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> CommitBundle
-> f CommitBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((CommitBundle -> ByteString)
-> (CommitBundle -> ByteString -> CommitBundle)
-> Lens CommitBundle CommitBundle ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
CommitBundle -> ByteString
_CommitBundle'commit
(\ CommitBundle
x__ ByteString
y__ -> CommitBundle
x__ {_CommitBundle'commit = y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField CommitBundle "welcome" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "welcome"
-> (ByteString -> f ByteString) -> CommitBundle -> f CommitBundle
fieldOf Proxy# "welcome"
_
= ((Maybe ByteString -> f (Maybe ByteString))
-> CommitBundle -> f CommitBundle)
-> ((ByteString -> f ByteString)
-> Maybe ByteString -> f (Maybe ByteString))
-> (ByteString -> f ByteString)
-> CommitBundle
-> f CommitBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((CommitBundle -> Maybe ByteString)
-> (CommitBundle -> Maybe ByteString -> CommitBundle)
-> Lens
CommitBundle CommitBundle (Maybe ByteString) (Maybe ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
CommitBundle -> Maybe ByteString
_CommitBundle'welcome
(\ CommitBundle
x__ Maybe ByteString
y__ -> CommitBundle
x__ {_CommitBundle'welcome = y__}))
(ByteString -> Lens' (Maybe ByteString) ByteString
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault)
instance Data.ProtoLens.Field.HasField CommitBundle "maybe'welcome" (Prelude.Maybe Data.ByteString.ByteString) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'welcome"
-> (Maybe ByteString -> f (Maybe ByteString))
-> CommitBundle
-> f CommitBundle
fieldOf Proxy# "maybe'welcome"
_
= ((Maybe ByteString -> f (Maybe ByteString))
-> CommitBundle -> f CommitBundle)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe ByteString -> f (Maybe ByteString))
-> (Maybe ByteString -> f (Maybe ByteString))
-> CommitBundle
-> f CommitBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((CommitBundle -> Maybe ByteString)
-> (CommitBundle -> Maybe ByteString -> CommitBundle)
-> Lens
CommitBundle CommitBundle (Maybe ByteString) (Maybe ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
CommitBundle -> Maybe ByteString
_CommitBundle'welcome
(\ CommitBundle
x__ Maybe ByteString
y__ -> CommitBundle
x__ {_CommitBundle'welcome = y__}))
(Maybe ByteString -> f (Maybe ByteString))
-> Maybe ByteString -> f (Maybe ByteString)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField CommitBundle "groupInfoBundle" GroupInfoBundle where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "groupInfoBundle"
-> (GroupInfoBundle -> f GroupInfoBundle)
-> CommitBundle
-> f CommitBundle
fieldOf Proxy# "groupInfoBundle"
_
= ((GroupInfoBundle -> f GroupInfoBundle)
-> CommitBundle -> f CommitBundle)
-> ((GroupInfoBundle -> f GroupInfoBundle)
-> GroupInfoBundle -> f GroupInfoBundle)
-> (GroupInfoBundle -> f GroupInfoBundle)
-> CommitBundle
-> f CommitBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((CommitBundle -> GroupInfoBundle)
-> (CommitBundle -> GroupInfoBundle -> CommitBundle)
-> Lens CommitBundle CommitBundle GroupInfoBundle GroupInfoBundle
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
CommitBundle -> GroupInfoBundle
_CommitBundle'groupInfoBundle
(\ CommitBundle
x__ GroupInfoBundle
y__ -> CommitBundle
x__ {_CommitBundle'groupInfoBundle = y__}))
(GroupInfoBundle -> f GroupInfoBundle)
-> GroupInfoBundle -> f GroupInfoBundle
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message CommitBundle where
messageName :: Proxy CommitBundle -> Text
messageName Proxy CommitBundle
_ = String -> Text
Data.Text.pack String
"mls.CommitBundle"
packedMessageDescriptor :: Proxy CommitBundle -> ByteString
packedMessageDescriptor Proxy CommitBundle
_
= ByteString
"\n\
\\fCommitBundle\DC2\SYN\n\
\\ACKcommit\CAN\SOH \STX(\fR\ACKcommit\DC2\CAN\n\
\\awelcome\CAN\STX \SOH(\fR\awelcome\DC2@\n\
\\DC1group_info_bundle\CAN\ETX \STX(\v2\DC4.mls.GroupInfoBundleR\SIgroupInfoBundle"
packedFileDescriptor :: Proxy CommitBundle -> ByteString
packedFileDescriptor Proxy CommitBundle
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor CommitBundle)
fieldsByTag
= let
commit__field_descriptor :: FieldDescriptor CommitBundle
commit__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor CommitBundle ByteString
-> FieldDescriptor CommitBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"commit"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens CommitBundle CommitBundle ByteString ByteString
-> FieldAccessor CommitBundle ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. WireDefault value
Data.ProtoLens.Required (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"commit")) ::
Data.ProtoLens.FieldDescriptor CommitBundle
welcome__field_descriptor :: FieldDescriptor CommitBundle
welcome__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor CommitBundle ByteString
-> FieldDescriptor CommitBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"welcome"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(Lens
CommitBundle CommitBundle (Maybe ByteString) (Maybe ByteString)
-> FieldAccessor CommitBundle ByteString
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'welcome")) ::
Data.ProtoLens.FieldDescriptor CommitBundle
groupInfoBundle__field_descriptor :: FieldDescriptor CommitBundle
groupInfoBundle__field_descriptor
= String
-> FieldTypeDescriptor GroupInfoBundle
-> FieldAccessor CommitBundle GroupInfoBundle
-> FieldDescriptor CommitBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"group_info_bundle"
(MessageOrGroup -> FieldTypeDescriptor GroupInfoBundle
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor GroupInfoBundle)
(WireDefault GroupInfoBundle
-> Lens CommitBundle CommitBundle GroupInfoBundle GroupInfoBundle
-> FieldAccessor CommitBundle GroupInfoBundle
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault GroupInfoBundle
forall value. WireDefault value
Data.ProtoLens.Required
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoBundle")) ::
Data.ProtoLens.FieldDescriptor CommitBundle
in
[(Tag, FieldDescriptor CommitBundle)]
-> Map Tag (FieldDescriptor CommitBundle)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor CommitBundle
commit__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor CommitBundle
welcome__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor CommitBundle
groupInfoBundle__field_descriptor)]
unknownFields :: Lens' CommitBundle FieldSet
unknownFields
= (CommitBundle -> FieldSet)
-> (CommitBundle -> FieldSet -> CommitBundle)
-> Lens' CommitBundle FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
CommitBundle -> FieldSet
_CommitBundle'_unknownFields
(\ CommitBundle
x__ FieldSet
y__ -> CommitBundle
x__ {_CommitBundle'_unknownFields = y__})
defMessage :: CommitBundle
defMessage
= CommitBundle'_constructor
{$sel:_CommitBundle'commit:CommitBundle'_constructor :: ByteString
_CommitBundle'commit = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
$sel:_CommitBundle'welcome:CommitBundle'_constructor :: Maybe ByteString
_CommitBundle'welcome = Maybe ByteString
forall a. Maybe a
Prelude.Nothing,
$sel:_CommitBundle'groupInfoBundle:CommitBundle'_constructor :: GroupInfoBundle
_CommitBundle'groupInfoBundle = GroupInfoBundle
forall msg. Message msg => msg
Data.ProtoLens.defMessage,
$sel:_CommitBundle'_unknownFields:CommitBundle'_constructor :: FieldSet
_CommitBundle'_unknownFields = []}
parseMessage :: Parser CommitBundle
parseMessage
= let
loop ::
CommitBundle
-> Prelude.Bool
-> Prelude.Bool
-> Data.ProtoLens.Encoding.Bytes.Parser CommitBundle
loop :: CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop CommitBundle
x Bool
required'commit Bool
required'groupInfoBundle
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do (let
missing :: [String]
missing
= (if Bool
required'commit then (:) String
"commit" else [String] -> [String]
forall a. a -> a
Prelude.id)
((if Bool
required'groupInfoBundle then
(:) String
"group_info_bundle"
else
[String] -> [String]
forall a. a -> a
Prelude.id)
[])
in
if [String] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [String]
missing then
() -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
else
String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
String
"Missing required fields: "
([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
missing :: [Prelude.String]))))
CommitBundle -> Parser CommitBundle
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter CommitBundle CommitBundle FieldSet FieldSet
-> (FieldSet -> FieldSet) -> CommitBundle -> CommitBundle
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
LensLike' f CommitBundle FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' CommitBundle FieldSet
Setter CommitBundle CommitBundle FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) CommitBundle
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
Word64
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
String
"commit"
CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop
(Setter CommitBundle CommitBundle ByteString ByteString
-> ByteString -> CommitBundle -> CommitBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"commit") ByteString
y CommitBundle
x)
Bool
Prelude.False Bool
required'groupInfoBundle
Word64
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
String
"welcome"
CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop
(Setter CommitBundle CommitBundle ByteString ByteString
-> ByteString -> CommitBundle -> CommitBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"welcome") ByteString
y CommitBundle
x)
Bool
required'commit Bool
required'groupInfoBundle
Word64
26
-> do GroupInfoBundle
y <- Parser GroupInfoBundle -> String -> Parser GroupInfoBundle
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser GroupInfoBundle -> Parser GroupInfoBundle
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser GroupInfoBundle
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
String
"group_info_bundle"
CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop
(Setter CommitBundle CommitBundle GroupInfoBundle GroupInfoBundle
-> GroupInfoBundle -> CommitBundle -> CommitBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoBundle") GroupInfoBundle
y CommitBundle
x)
Bool
required'commit Bool
Prelude.False
Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop
(Setter CommitBundle CommitBundle FieldSet FieldSet
-> (FieldSet -> FieldSet) -> CommitBundle -> CommitBundle
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
LensLike' f CommitBundle FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' CommitBundle FieldSet
Setter CommitBundle CommitBundle FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) CommitBundle
x)
Bool
required'commit Bool
required'groupInfoBundle
in
Parser CommitBundle -> String -> Parser CommitBundle
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do CommitBundle -> Bool -> Bool -> Parser CommitBundle
loop CommitBundle
forall msg. Message msg => msg
Data.ProtoLens.defMessage Bool
Prelude.True Bool
Prelude.True)
String
"CommitBundle"
buildMessage :: CommitBundle -> Builder
buildMessage
= \ CommitBundle
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((\ ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
(FoldLike ByteString CommitBundle CommitBundle ByteString ByteString
-> CommitBundle -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"commit") CommitBundle
_x)))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ByteString)
CommitBundle
CommitBundle
(Maybe ByteString)
(Maybe ByteString)
-> CommitBundle -> Maybe ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'welcome") CommitBundle
_x
of
Maybe ByteString
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just ByteString
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
((\ ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
((ByteString -> Builder)
-> (GroupInfoBundle -> ByteString) -> GroupInfoBundle -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
GroupInfoBundle -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(FoldLike
GroupInfoBundle
CommitBundle
CommitBundle
GroupInfoBundle
GroupInfoBundle
-> CommitBundle -> GroupInfoBundle
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoBundle") CommitBundle
_x)))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet CommitBundle CommitBundle FieldSet FieldSet
-> CommitBundle -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet CommitBundle CommitBundle FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' CommitBundle FieldSet
Data.ProtoLens.unknownFields CommitBundle
_x))))
instance Control.DeepSeq.NFData CommitBundle where
rnf :: CommitBundle -> ()
rnf
= \ CommitBundle
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(CommitBundle -> FieldSet
_CommitBundle'_unknownFields CommitBundle
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(CommitBundle -> ByteString
_CommitBundle'commit CommitBundle
x__)
(Maybe ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(CommitBundle -> Maybe ByteString
_CommitBundle'welcome CommitBundle
x__)
(GroupInfoBundle -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (CommitBundle -> GroupInfoBundle
_CommitBundle'groupInfoBundle CommitBundle
x__) ())))
data GroupInfoBundle
= GroupInfoBundle'_constructor {GroupInfoBundle -> GroupInfoType
_GroupInfoBundle'groupInfoType :: !GroupInfoType,
GroupInfoBundle -> RatchetTreeType
_GroupInfoBundle'ratchetTreeType :: !RatchetTreeType,
GroupInfoBundle -> ByteString
_GroupInfoBundle'groupInfo :: !Data.ByteString.ByteString,
GroupInfoBundle -> FieldSet
_GroupInfoBundle'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (GroupInfoBundle -> GroupInfoBundle -> Bool
(GroupInfoBundle -> GroupInfoBundle -> Bool)
-> (GroupInfoBundle -> GroupInfoBundle -> Bool)
-> Eq GroupInfoBundle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GroupInfoBundle -> GroupInfoBundle -> Bool
== :: GroupInfoBundle -> GroupInfoBundle -> Bool
$c/= :: GroupInfoBundle -> GroupInfoBundle -> Bool
/= :: GroupInfoBundle -> GroupInfoBundle -> Bool
Prelude.Eq, Eq GroupInfoBundle
Eq GroupInfoBundle =>
(GroupInfoBundle -> GroupInfoBundle -> Ordering)
-> (GroupInfoBundle -> GroupInfoBundle -> Bool)
-> (GroupInfoBundle -> GroupInfoBundle -> Bool)
-> (GroupInfoBundle -> GroupInfoBundle -> Bool)
-> (GroupInfoBundle -> GroupInfoBundle -> Bool)
-> (GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle)
-> (GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle)
-> Ord GroupInfoBundle
GroupInfoBundle -> GroupInfoBundle -> Bool
GroupInfoBundle -> GroupInfoBundle -> Ordering
GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle
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
$ccompare :: GroupInfoBundle -> GroupInfoBundle -> Ordering
compare :: GroupInfoBundle -> GroupInfoBundle -> Ordering
$c< :: GroupInfoBundle -> GroupInfoBundle -> Bool
< :: GroupInfoBundle -> GroupInfoBundle -> Bool
$c<= :: GroupInfoBundle -> GroupInfoBundle -> Bool
<= :: GroupInfoBundle -> GroupInfoBundle -> Bool
$c> :: GroupInfoBundle -> GroupInfoBundle -> Bool
> :: GroupInfoBundle -> GroupInfoBundle -> Bool
$c>= :: GroupInfoBundle -> GroupInfoBundle -> Bool
>= :: GroupInfoBundle -> GroupInfoBundle -> Bool
$cmax :: GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle
max :: GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle
$cmin :: GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle
min :: GroupInfoBundle -> GroupInfoBundle -> GroupInfoBundle
Prelude.Ord)
instance Prelude.Show GroupInfoBundle where
showsPrec :: Int -> GroupInfoBundle -> ShowS
showsPrec Int
_ GroupInfoBundle
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(GroupInfoBundle -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GroupInfoBundle
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField GroupInfoBundle "groupInfoType" GroupInfoType where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "groupInfoType"
-> (GroupInfoType -> f GroupInfoType)
-> GroupInfoBundle
-> f GroupInfoBundle
fieldOf Proxy# "groupInfoType"
_
= ((GroupInfoType -> f GroupInfoType)
-> GroupInfoBundle -> f GroupInfoBundle)
-> ((GroupInfoType -> f GroupInfoType)
-> GroupInfoType -> f GroupInfoType)
-> (GroupInfoType -> f GroupInfoType)
-> GroupInfoBundle
-> f GroupInfoBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((GroupInfoBundle -> GroupInfoType)
-> (GroupInfoBundle -> GroupInfoType -> GroupInfoBundle)
-> Lens GroupInfoBundle GroupInfoBundle GroupInfoType GroupInfoType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GroupInfoBundle -> GroupInfoType
_GroupInfoBundle'groupInfoType
(\ GroupInfoBundle
x__ GroupInfoType
y__ -> GroupInfoBundle
x__ {_GroupInfoBundle'groupInfoType = y__}))
(GroupInfoType -> f GroupInfoType)
-> GroupInfoType -> f GroupInfoType
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GroupInfoBundle "ratchetTreeType" RatchetTreeType where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "ratchetTreeType"
-> (RatchetTreeType -> f RatchetTreeType)
-> GroupInfoBundle
-> f GroupInfoBundle
fieldOf Proxy# "ratchetTreeType"
_
= ((RatchetTreeType -> f RatchetTreeType)
-> GroupInfoBundle -> f GroupInfoBundle)
-> ((RatchetTreeType -> f RatchetTreeType)
-> RatchetTreeType -> f RatchetTreeType)
-> (RatchetTreeType -> f RatchetTreeType)
-> GroupInfoBundle
-> f GroupInfoBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((GroupInfoBundle -> RatchetTreeType)
-> (GroupInfoBundle -> RatchetTreeType -> GroupInfoBundle)
-> Lens
GroupInfoBundle GroupInfoBundle RatchetTreeType RatchetTreeType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GroupInfoBundle -> RatchetTreeType
_GroupInfoBundle'ratchetTreeType
(\ GroupInfoBundle
x__ RatchetTreeType
y__ -> GroupInfoBundle
x__ {_GroupInfoBundle'ratchetTreeType = y__}))
(RatchetTreeType -> f RatchetTreeType)
-> RatchetTreeType -> f RatchetTreeType
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GroupInfoBundle "groupInfo" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "groupInfo"
-> (ByteString -> f ByteString)
-> GroupInfoBundle
-> f GroupInfoBundle
fieldOf Proxy# "groupInfo"
_
= ((ByteString -> f ByteString)
-> GroupInfoBundle -> f GroupInfoBundle)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> GroupInfoBundle
-> f GroupInfoBundle
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((GroupInfoBundle -> ByteString)
-> (GroupInfoBundle -> ByteString -> GroupInfoBundle)
-> Lens GroupInfoBundle GroupInfoBundle ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GroupInfoBundle -> ByteString
_GroupInfoBundle'groupInfo
(\ GroupInfoBundle
x__ ByteString
y__ -> GroupInfoBundle
x__ {_GroupInfoBundle'groupInfo = y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GroupInfoBundle where
messageName :: Proxy GroupInfoBundle -> Text
messageName Proxy GroupInfoBundle
_ = String -> Text
Data.Text.pack String
"mls.GroupInfoBundle"
packedMessageDescriptor :: Proxy GroupInfoBundle -> ByteString
packedMessageDescriptor Proxy GroupInfoBundle
_
= ByteString
"\n\
\\SIGroupInfoBundle\DC2:\n\
\\SIgroup_info_type\CAN\SOH \STX(\SO2\DC2.mls.GroupInfoTypeR\rgroupInfoType\DC2@\n\
\\DC1ratchet_tree_type\CAN\STX \STX(\SO2\DC4.mls.RatchetTreeTypeR\SIratchetTreeType\DC2\GS\n\
\\n\
\group_info\CAN\ETX \STX(\fR\tgroupInfo"
packedFileDescriptor :: Proxy GroupInfoBundle -> ByteString
packedFileDescriptor Proxy GroupInfoBundle
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor GroupInfoBundle)
fieldsByTag
= let
groupInfoType__field_descriptor :: FieldDescriptor GroupInfoBundle
groupInfoType__field_descriptor
= String
-> FieldTypeDescriptor GroupInfoType
-> FieldAccessor GroupInfoBundle GroupInfoType
-> FieldDescriptor GroupInfoBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"group_info_type"
(ScalarField GroupInfoType -> FieldTypeDescriptor GroupInfoType
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField GroupInfoType
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
Data.ProtoLens.FieldTypeDescriptor GroupInfoType)
(WireDefault GroupInfoType
-> Lens GroupInfoBundle GroupInfoBundle GroupInfoType GroupInfoType
-> FieldAccessor GroupInfoBundle GroupInfoType
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault GroupInfoType
forall value. WireDefault value
Data.ProtoLens.Required
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoType")) ::
Data.ProtoLens.FieldDescriptor GroupInfoBundle
ratchetTreeType__field_descriptor :: FieldDescriptor GroupInfoBundle
ratchetTreeType__field_descriptor
= String
-> FieldTypeDescriptor RatchetTreeType
-> FieldAccessor GroupInfoBundle RatchetTreeType
-> FieldDescriptor GroupInfoBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"ratchet_tree_type"
(ScalarField RatchetTreeType -> FieldTypeDescriptor RatchetTreeType
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField RatchetTreeType
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
Data.ProtoLens.FieldTypeDescriptor RatchetTreeType)
(WireDefault RatchetTreeType
-> Lens
GroupInfoBundle GroupInfoBundle RatchetTreeType RatchetTreeType
-> FieldAccessor GroupInfoBundle RatchetTreeType
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault RatchetTreeType
forall value. WireDefault value
Data.ProtoLens.Required
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"ratchetTreeType")) ::
Data.ProtoLens.FieldDescriptor GroupInfoBundle
groupInfo__field_descriptor :: FieldDescriptor GroupInfoBundle
groupInfo__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor GroupInfoBundle ByteString
-> FieldDescriptor GroupInfoBundle
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"group_info"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens GroupInfoBundle GroupInfoBundle ByteString ByteString
-> FieldAccessor GroupInfoBundle ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. WireDefault value
Data.ProtoLens.Required
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfo")) ::
Data.ProtoLens.FieldDescriptor GroupInfoBundle
in
[(Tag, FieldDescriptor GroupInfoBundle)]
-> Map Tag (FieldDescriptor GroupInfoBundle)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor GroupInfoBundle
groupInfoType__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor GroupInfoBundle
ratchetTreeType__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor GroupInfoBundle
groupInfo__field_descriptor)]
unknownFields :: Lens' GroupInfoBundle FieldSet
unknownFields
= (GroupInfoBundle -> FieldSet)
-> (GroupInfoBundle -> FieldSet -> GroupInfoBundle)
-> Lens' GroupInfoBundle FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GroupInfoBundle -> FieldSet
_GroupInfoBundle'_unknownFields
(\ GroupInfoBundle
x__ FieldSet
y__ -> GroupInfoBundle
x__ {_GroupInfoBundle'_unknownFields = y__})
defMessage :: GroupInfoBundle
defMessage
= GroupInfoBundle'_constructor
{$sel:_GroupInfoBundle'groupInfoType:GroupInfoBundle'_constructor :: GroupInfoType
_GroupInfoBundle'groupInfoType = GroupInfoType
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
$sel:_GroupInfoBundle'ratchetTreeType:GroupInfoBundle'_constructor :: RatchetTreeType
_GroupInfoBundle'ratchetTreeType = RatchetTreeType
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
$sel:_GroupInfoBundle'groupInfo:GroupInfoBundle'_constructor :: ByteString
_GroupInfoBundle'groupInfo = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
$sel:_GroupInfoBundle'_unknownFields:GroupInfoBundle'_constructor :: FieldSet
_GroupInfoBundle'_unknownFields = []}
parseMessage :: Parser GroupInfoBundle
parseMessage
= let
loop ::
GroupInfoBundle
-> Prelude.Bool
-> Prelude.Bool
-> Prelude.Bool
-> Data.ProtoLens.Encoding.Bytes.Parser GroupInfoBundle
loop :: GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
GroupInfoBundle
x
Bool
required'groupInfo
Bool
required'groupInfoType
Bool
required'ratchetTreeType
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do (let
missing :: [String]
missing
= (if Bool
required'groupInfo then (:) String
"group_info" else [String] -> [String]
forall a. a -> a
Prelude.id)
((if Bool
required'groupInfoType then
(:) String
"group_info_type"
else
[String] -> [String]
forall a. a -> a
Prelude.id)
((if Bool
required'ratchetTreeType then
(:) String
"ratchet_tree_type"
else
[String] -> [String]
forall a. a -> a
Prelude.id)
[]))
in
if [String] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [String]
missing then
() -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
else
String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
String
"Missing required fields: "
([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
missing :: [Prelude.String]))))
GroupInfoBundle -> Parser GroupInfoBundle
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter GroupInfoBundle GroupInfoBundle FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GroupInfoBundle -> GroupInfoBundle
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
LensLike' f GroupInfoBundle FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' GroupInfoBundle FieldSet
Setter GroupInfoBundle GroupInfoBundle FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GroupInfoBundle
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
Word64
8 -> do GroupInfoType
y <- Parser GroupInfoType -> String -> Parser GroupInfoType
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Int -> GroupInfoType) -> Parser Int -> Parser GroupInfoType
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Int -> GroupInfoType
forall a. Enum a => Int -> a
Prelude.toEnum
((Word64 -> Int) -> Parser Word64 -> Parser Int
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
String
"group_info_type"
GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
(Setter GroupInfoBundle GroupInfoBundle GroupInfoType GroupInfoType
-> GroupInfoType -> GroupInfoBundle -> GroupInfoBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoType") GroupInfoType
y GroupInfoBundle
x)
Bool
required'groupInfo Bool
Prelude.False Bool
required'ratchetTreeType
Word64
16
-> do RatchetTreeType
y <- Parser RatchetTreeType -> String -> Parser RatchetTreeType
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Int -> RatchetTreeType) -> Parser Int -> Parser RatchetTreeType
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Int -> RatchetTreeType
forall a. Enum a => Int -> a
Prelude.toEnum
((Word64 -> Int) -> Parser Word64 -> Parser Int
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
String
"ratchet_tree_type"
GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
(Setter
GroupInfoBundle GroupInfoBundle RatchetTreeType RatchetTreeType
-> RatchetTreeType -> GroupInfoBundle -> GroupInfoBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"ratchetTreeType") RatchetTreeType
y GroupInfoBundle
x)
Bool
required'groupInfo Bool
required'groupInfoType Bool
Prelude.False
Word64
26
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
String
"group_info"
GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
(Setter GroupInfoBundle GroupInfoBundle ByteString ByteString
-> ByteString -> GroupInfoBundle -> GroupInfoBundle
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfo") ByteString
y GroupInfoBundle
x)
Bool
Prelude.False Bool
required'groupInfoType Bool
required'ratchetTreeType
Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
(Setter GroupInfoBundle GroupInfoBundle FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GroupInfoBundle -> GroupInfoBundle
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
LensLike' f GroupInfoBundle FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' GroupInfoBundle FieldSet
Setter GroupInfoBundle GroupInfoBundle FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GroupInfoBundle
x)
Bool
required'groupInfo Bool
required'groupInfoType Bool
required'ratchetTreeType
in
Parser GroupInfoBundle -> String -> Parser GroupInfoBundle
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do GroupInfoBundle -> Bool -> Bool -> Bool -> Parser GroupInfoBundle
loop
GroupInfoBundle
forall msg. Message msg => msg
Data.ProtoLens.defMessage Bool
Prelude.True Bool
Prelude.True Bool
Prelude.True)
String
"GroupInfoBundle"
buildMessage :: GroupInfoBundle -> Builder
buildMessage
= \ GroupInfoBundle
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
8)
((Int -> Builder)
-> (GroupInfoType -> Int) -> GroupInfoType -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Word64 -> Builder) -> (Int -> Word64) -> Int -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
GroupInfoType -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum
(FoldLike
GroupInfoType
GroupInfoBundle
GroupInfoBundle
GroupInfoType
GroupInfoType
-> GroupInfoBundle -> GroupInfoType
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfoType") GroupInfoBundle
_x)))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
16)
((Int -> Builder)
-> (RatchetTreeType -> Int) -> RatchetTreeType -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Word64 -> Builder) -> (Int -> Word64) -> Int -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
RatchetTreeType -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum
(FoldLike
RatchetTreeType
GroupInfoBundle
GroupInfoBundle
RatchetTreeType
RatchetTreeType
-> GroupInfoBundle -> RatchetTreeType
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"ratchetTreeType") GroupInfoBundle
_x)))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
((\ ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
(FoldLike
ByteString GroupInfoBundle GroupInfoBundle ByteString ByteString
-> GroupInfoBundle -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"groupInfo") GroupInfoBundle
_x)))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet GroupInfoBundle GroupInfoBundle FieldSet FieldSet
-> GroupInfoBundle -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet GroupInfoBundle GroupInfoBundle FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' GroupInfoBundle FieldSet
Data.ProtoLens.unknownFields GroupInfoBundle
_x))))
instance Control.DeepSeq.NFData GroupInfoBundle where
rnf :: GroupInfoBundle -> ()
rnf
= \ GroupInfoBundle
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(GroupInfoBundle -> FieldSet
_GroupInfoBundle'_unknownFields GroupInfoBundle
x__)
(GroupInfoType -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(GroupInfoBundle -> GroupInfoType
_GroupInfoBundle'groupInfoType GroupInfoBundle
x__)
(RatchetTreeType -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(GroupInfoBundle -> RatchetTreeType
_GroupInfoBundle'ratchetTreeType GroupInfoBundle
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GroupInfoBundle -> ByteString
_GroupInfoBundle'groupInfo GroupInfoBundle
x__) ())))
data GroupInfoType
= PUBLIC_GROUP_STATE | GROUP_INFO | GROUP_INFO_JWE
deriving stock (Int -> GroupInfoType -> ShowS
[GroupInfoType] -> ShowS
GroupInfoType -> String
(Int -> GroupInfoType -> ShowS)
-> (GroupInfoType -> String)
-> ([GroupInfoType] -> ShowS)
-> Show GroupInfoType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GroupInfoType -> ShowS
showsPrec :: Int -> GroupInfoType -> ShowS
$cshow :: GroupInfoType -> String
show :: GroupInfoType -> String
$cshowList :: [GroupInfoType] -> ShowS
showList :: [GroupInfoType] -> ShowS
Prelude.Show, GroupInfoType -> GroupInfoType -> Bool
(GroupInfoType -> GroupInfoType -> Bool)
-> (GroupInfoType -> GroupInfoType -> Bool) -> Eq GroupInfoType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GroupInfoType -> GroupInfoType -> Bool
== :: GroupInfoType -> GroupInfoType -> Bool
$c/= :: GroupInfoType -> GroupInfoType -> Bool
/= :: GroupInfoType -> GroupInfoType -> Bool
Prelude.Eq, Eq GroupInfoType
Eq GroupInfoType =>
(GroupInfoType -> GroupInfoType -> Ordering)
-> (GroupInfoType -> GroupInfoType -> Bool)
-> (GroupInfoType -> GroupInfoType -> Bool)
-> (GroupInfoType -> GroupInfoType -> Bool)
-> (GroupInfoType -> GroupInfoType -> Bool)
-> (GroupInfoType -> GroupInfoType -> GroupInfoType)
-> (GroupInfoType -> GroupInfoType -> GroupInfoType)
-> Ord GroupInfoType
GroupInfoType -> GroupInfoType -> Bool
GroupInfoType -> GroupInfoType -> Ordering
GroupInfoType -> GroupInfoType -> GroupInfoType
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
$ccompare :: GroupInfoType -> GroupInfoType -> Ordering
compare :: GroupInfoType -> GroupInfoType -> Ordering
$c< :: GroupInfoType -> GroupInfoType -> Bool
< :: GroupInfoType -> GroupInfoType -> Bool
$c<= :: GroupInfoType -> GroupInfoType -> Bool
<= :: GroupInfoType -> GroupInfoType -> Bool
$c> :: GroupInfoType -> GroupInfoType -> Bool
> :: GroupInfoType -> GroupInfoType -> Bool
$c>= :: GroupInfoType -> GroupInfoType -> Bool
>= :: GroupInfoType -> GroupInfoType -> Bool
$cmax :: GroupInfoType -> GroupInfoType -> GroupInfoType
max :: GroupInfoType -> GroupInfoType -> GroupInfoType
$cmin :: GroupInfoType -> GroupInfoType -> GroupInfoType
min :: GroupInfoType -> GroupInfoType -> GroupInfoType
Prelude.Ord)
instance Data.ProtoLens.MessageEnum GroupInfoType where
maybeToEnum :: Int -> Maybe GroupInfoType
maybeToEnum Int
1 = GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
PUBLIC_GROUP_STATE
maybeToEnum Int
2 = GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
GROUP_INFO
maybeToEnum Int
3 = GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
GROUP_INFO_JWE
maybeToEnum Int
_ = Maybe GroupInfoType
forall a. Maybe a
Prelude.Nothing
showEnum :: GroupInfoType -> String
showEnum GroupInfoType
PUBLIC_GROUP_STATE = String
"PUBLIC_GROUP_STATE"
showEnum GroupInfoType
GROUP_INFO = String
"GROUP_INFO"
showEnum GroupInfoType
GROUP_INFO_JWE = String
"GROUP_INFO_JWE"
readEnum :: String -> Maybe GroupInfoType
readEnum String
k
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"PUBLIC_GROUP_STATE"
= GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
PUBLIC_GROUP_STATE
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"GROUP_INFO" = GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
GROUP_INFO
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"GROUP_INFO_JWE" = GroupInfoType -> Maybe GroupInfoType
forall a. a -> Maybe a
Prelude.Just GroupInfoType
GROUP_INFO_JWE
| Bool
Prelude.otherwise
= Maybe Int -> (Int -> Maybe GroupInfoType) -> Maybe GroupInfoType
forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(Prelude.>>=) (String -> Maybe Int
forall a. Read a => String -> Maybe a
Text.Read.readMaybe String
k) Int -> Maybe GroupInfoType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum
instance Prelude.Bounded GroupInfoType where
minBound :: GroupInfoType
minBound = GroupInfoType
PUBLIC_GROUP_STATE
maxBound :: GroupInfoType
maxBound = GroupInfoType
GROUP_INFO_JWE
instance Prelude.Enum GroupInfoType where
toEnum :: Int -> GroupInfoType
toEnum Int
k__
= GroupInfoType
-> (GroupInfoType -> GroupInfoType)
-> Maybe GroupInfoType
-> GroupInfoType
forall b a. b -> (a -> b) -> Maybe a -> b
Prelude.maybe
(String -> GroupInfoType
forall a. HasCallStack => String -> a
Prelude.error
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
String
"toEnum: unknown value for enum GroupInfoType: "
(Int -> String
forall a. Show a => a -> String
Prelude.show Int
k__)))
GroupInfoType -> GroupInfoType
forall a. a -> a
Prelude.id (Int -> Maybe GroupInfoType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum Int
k__)
fromEnum :: GroupInfoType -> Int
fromEnum GroupInfoType
PUBLIC_GROUP_STATE = Int
1
fromEnum GroupInfoType
GROUP_INFO = Int
2
fromEnum GroupInfoType
GROUP_INFO_JWE = Int
3
succ :: GroupInfoType -> GroupInfoType
succ GroupInfoType
GROUP_INFO_JWE
= String -> GroupInfoType
forall a. HasCallStack => String -> a
Prelude.error
String
"GroupInfoType.succ: bad argument GROUP_INFO_JWE. This value would be out of bounds."
succ GroupInfoType
PUBLIC_GROUP_STATE = GroupInfoType
GROUP_INFO
succ GroupInfoType
GROUP_INFO = GroupInfoType
GROUP_INFO_JWE
pred :: GroupInfoType -> GroupInfoType
pred GroupInfoType
PUBLIC_GROUP_STATE
= String -> GroupInfoType
forall a. HasCallStack => String -> a
Prelude.error
String
"GroupInfoType.pred: bad argument PUBLIC_GROUP_STATE. This value would be out of bounds."
pred GroupInfoType
GROUP_INFO = GroupInfoType
PUBLIC_GROUP_STATE
pred GroupInfoType
GROUP_INFO_JWE = GroupInfoType
GROUP_INFO
enumFrom :: GroupInfoType -> [GroupInfoType]
enumFrom = GroupInfoType -> [GroupInfoType]
forall a. (Enum a, Bounded a) => a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFrom
enumFromTo :: GroupInfoType -> GroupInfoType -> [GroupInfoType]
enumFromTo = GroupInfoType -> GroupInfoType -> [GroupInfoType]
forall a. Enum a => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromTo
enumFromThen :: GroupInfoType -> GroupInfoType -> [GroupInfoType]
enumFromThen = GroupInfoType -> GroupInfoType -> [GroupInfoType]
forall a. (Enum a, Bounded a) => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThen
enumFromThenTo :: GroupInfoType -> GroupInfoType -> GroupInfoType -> [GroupInfoType]
enumFromThenTo = GroupInfoType -> GroupInfoType -> GroupInfoType -> [GroupInfoType]
forall a. Enum a => a -> a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault GroupInfoType where
fieldDefault :: GroupInfoType
fieldDefault = GroupInfoType
PUBLIC_GROUP_STATE
instance Control.DeepSeq.NFData GroupInfoType where
rnf :: GroupInfoType -> ()
rnf GroupInfoType
x__ = GroupInfoType -> () -> ()
forall a b. a -> b -> b
Prelude.seq GroupInfoType
x__ ()
data RatchetTreeType
= FULL | DELTA | REFERENCE
deriving stock (Int -> RatchetTreeType -> ShowS
[RatchetTreeType] -> ShowS
RatchetTreeType -> String
(Int -> RatchetTreeType -> ShowS)
-> (RatchetTreeType -> String)
-> ([RatchetTreeType] -> ShowS)
-> Show RatchetTreeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RatchetTreeType -> ShowS
showsPrec :: Int -> RatchetTreeType -> ShowS
$cshow :: RatchetTreeType -> String
show :: RatchetTreeType -> String
$cshowList :: [RatchetTreeType] -> ShowS
showList :: [RatchetTreeType] -> ShowS
Prelude.Show, RatchetTreeType -> RatchetTreeType -> Bool
(RatchetTreeType -> RatchetTreeType -> Bool)
-> (RatchetTreeType -> RatchetTreeType -> Bool)
-> Eq RatchetTreeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RatchetTreeType -> RatchetTreeType -> Bool
== :: RatchetTreeType -> RatchetTreeType -> Bool
$c/= :: RatchetTreeType -> RatchetTreeType -> Bool
/= :: RatchetTreeType -> RatchetTreeType -> Bool
Prelude.Eq, Eq RatchetTreeType
Eq RatchetTreeType =>
(RatchetTreeType -> RatchetTreeType -> Ordering)
-> (RatchetTreeType -> RatchetTreeType -> Bool)
-> (RatchetTreeType -> RatchetTreeType -> Bool)
-> (RatchetTreeType -> RatchetTreeType -> Bool)
-> (RatchetTreeType -> RatchetTreeType -> Bool)
-> (RatchetTreeType -> RatchetTreeType -> RatchetTreeType)
-> (RatchetTreeType -> RatchetTreeType -> RatchetTreeType)
-> Ord RatchetTreeType
RatchetTreeType -> RatchetTreeType -> Bool
RatchetTreeType -> RatchetTreeType -> Ordering
RatchetTreeType -> RatchetTreeType -> RatchetTreeType
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
$ccompare :: RatchetTreeType -> RatchetTreeType -> Ordering
compare :: RatchetTreeType -> RatchetTreeType -> Ordering
$c< :: RatchetTreeType -> RatchetTreeType -> Bool
< :: RatchetTreeType -> RatchetTreeType -> Bool
$c<= :: RatchetTreeType -> RatchetTreeType -> Bool
<= :: RatchetTreeType -> RatchetTreeType -> Bool
$c> :: RatchetTreeType -> RatchetTreeType -> Bool
> :: RatchetTreeType -> RatchetTreeType -> Bool
$c>= :: RatchetTreeType -> RatchetTreeType -> Bool
>= :: RatchetTreeType -> RatchetTreeType -> Bool
$cmax :: RatchetTreeType -> RatchetTreeType -> RatchetTreeType
max :: RatchetTreeType -> RatchetTreeType -> RatchetTreeType
$cmin :: RatchetTreeType -> RatchetTreeType -> RatchetTreeType
min :: RatchetTreeType -> RatchetTreeType -> RatchetTreeType
Prelude.Ord)
instance Data.ProtoLens.MessageEnum RatchetTreeType where
maybeToEnum :: Int -> Maybe RatchetTreeType
maybeToEnum Int
1 = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
FULL
maybeToEnum Int
2 = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
DELTA
maybeToEnum Int
3 = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
REFERENCE
maybeToEnum Int
_ = Maybe RatchetTreeType
forall a. Maybe a
Prelude.Nothing
showEnum :: RatchetTreeType -> String
showEnum RatchetTreeType
FULL = String
"FULL"
showEnum RatchetTreeType
DELTA = String
"DELTA"
showEnum RatchetTreeType
REFERENCE = String
"REFERENCE"
readEnum :: String -> Maybe RatchetTreeType
readEnum String
k
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"FULL" = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
FULL
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"DELTA" = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
DELTA
| String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"REFERENCE" = RatchetTreeType -> Maybe RatchetTreeType
forall a. a -> Maybe a
Prelude.Just RatchetTreeType
REFERENCE
| Bool
Prelude.otherwise
= Maybe Int
-> (Int -> Maybe RatchetTreeType) -> Maybe RatchetTreeType
forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(Prelude.>>=) (String -> Maybe Int
forall a. Read a => String -> Maybe a
Text.Read.readMaybe String
k) Int -> Maybe RatchetTreeType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum
instance Prelude.Bounded RatchetTreeType where
minBound :: RatchetTreeType
minBound = RatchetTreeType
FULL
maxBound :: RatchetTreeType
maxBound = RatchetTreeType
REFERENCE
instance Prelude.Enum RatchetTreeType where
toEnum :: Int -> RatchetTreeType
toEnum Int
k__
= RatchetTreeType
-> (RatchetTreeType -> RatchetTreeType)
-> Maybe RatchetTreeType
-> RatchetTreeType
forall b a. b -> (a -> b) -> Maybe a -> b
Prelude.maybe
(String -> RatchetTreeType
forall a. HasCallStack => String -> a
Prelude.error
(String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
String
"toEnum: unknown value for enum RatchetTreeType: "
(Int -> String
forall a. Show a => a -> String
Prelude.show Int
k__)))
RatchetTreeType -> RatchetTreeType
forall a. a -> a
Prelude.id (Int -> Maybe RatchetTreeType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum Int
k__)
fromEnum :: RatchetTreeType -> Int
fromEnum RatchetTreeType
FULL = Int
1
fromEnum RatchetTreeType
DELTA = Int
2
fromEnum RatchetTreeType
REFERENCE = Int
3
succ :: RatchetTreeType -> RatchetTreeType
succ RatchetTreeType
REFERENCE
= String -> RatchetTreeType
forall a. HasCallStack => String -> a
Prelude.error
String
"RatchetTreeType.succ: bad argument REFERENCE. This value would be out of bounds."
succ RatchetTreeType
FULL = RatchetTreeType
DELTA
succ RatchetTreeType
DELTA = RatchetTreeType
REFERENCE
pred :: RatchetTreeType -> RatchetTreeType
pred RatchetTreeType
FULL
= String -> RatchetTreeType
forall a. HasCallStack => String -> a
Prelude.error
String
"RatchetTreeType.pred: bad argument FULL. This value would be out of bounds."
pred RatchetTreeType
DELTA = RatchetTreeType
FULL
pred RatchetTreeType
REFERENCE = RatchetTreeType
DELTA
enumFrom :: RatchetTreeType -> [RatchetTreeType]
enumFrom = RatchetTreeType -> [RatchetTreeType]
forall a. (Enum a, Bounded a) => a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFrom
enumFromTo :: RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
enumFromTo = RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
forall a. Enum a => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromTo
enumFromThen :: RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
enumFromThen = RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
forall a. (Enum a, Bounded a) => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThen
enumFromThenTo :: RatchetTreeType
-> RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
enumFromThenTo = RatchetTreeType
-> RatchetTreeType -> RatchetTreeType -> [RatchetTreeType]
forall a. Enum a => a -> a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault RatchetTreeType where
fieldDefault :: RatchetTreeType
fieldDefault = RatchetTreeType
FULL
instance Control.DeepSeq.NFData RatchetTreeType where
rnf :: RatchetTreeType -> ()
rnf RatchetTreeType
x__ = RatchetTreeType -> () -> ()
forall a b. a -> b -> b
Prelude.seq RatchetTreeType
x__ ()
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= ByteString
"\n\
\\tmls.proto\DC2\ETXmls\"\174\SOH\n\
\\SIGroupInfoBundle\DC2:\n\
\\SIgroup_info_type\CAN\SOH \STX(\SO2\DC2.mls.GroupInfoTypeR\rgroupInfoType\DC2@\n\
\\DC1ratchet_tree_type\CAN\STX \STX(\SO2\DC4.mls.RatchetTreeTypeR\SIratchetTreeType\DC2\GS\n\
\\n\
\group_info\CAN\ETX \STX(\fR\tgroupInfo\"\130\SOH\n\
\\fCommitBundle\DC2\SYN\n\
\\ACKcommit\CAN\SOH \STX(\fR\ACKcommit\DC2\CAN\n\
\\awelcome\CAN\STX \SOH(\fR\awelcome\DC2@\n\
\\DC1group_info_bundle\CAN\ETX \STX(\v2\DC4.mls.GroupInfoBundleR\SIgroupInfoBundle*K\n\
\\rGroupInfoType\DC2\SYN\n\
\\DC2PUBLIC_GROUP_STATE\DLE\SOH\DC2\SO\n\
\\n\
\GROUP_INFO\DLE\STX\DC2\DC2\n\
\\SOGROUP_INFO_JWE\DLE\ETX*5\n\
\\SIRatchetTreeType\DC2\b\n\
\\EOTFULL\DLE\SOH\DC2\t\n\
\\ENQDELTA\DLE\STX\DC2\r\n\
\\tREFERENCE\DLE\ETXB\SUB\n\
\\DC1com.wire.messagesB\ETXMlsH\ETXJ\189\f\n\
\\ACK\DC2\EOT\DC3\NUL1\SOH\n\
\\162\ENQ\n\
\\SOH\f\DC2\ETX\DC3\NUL\DC22\151\ENQ\n\
\ Wire\n\
\ Copyright (C) 2021 Wire Swiss GmbH\n\
\\n\
\ This program is free software: you can redistribute it and/or modify\n\
\ it under the terms of the GNU General Public License as published by\n\
\ the Free Software Foundation, either version 3 of the License, or\n\
\ (at your option) any later version.\n\
\\n\
\ This program is distributed in the hope that it will be useful,\n\
\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
\ GNU General Public License for more details.\n\
\\n\
\ You should have received a copy of the GNU General Public License\n\
\ along with this program. If not, see http://www.gnu.org/licenses/.\n\
\\n\
\\n\
\\b\n\
\\SOH\STX\DC2\ETX\NAK\NUL\f\n\
\\b\n\
\\SOH\b\DC2\ETX\ETB\NUL*\n\
\\t\n\
\\STX\b\SOH\DC2\ETX\ETB\NUL*\n\
\\b\n\
\\SOH\b\DC2\ETX\CAN\NUL$\n\
\\t\n\
\\STX\b\b\DC2\ETX\CAN\NUL$\n\
\\b\n\
\\SOH\b\DC2\ETX\EM\NUL#\n\
\\t\n\
\\STX\b\t\DC2\ETX\EM\NUL#\n\
\\n\
\\n\
\\STX\ENQ\NUL\DC2\EOT\ESC\NUL\US\SOH\n\
\\n\
\\n\
\\ETX\ENQ\NUL\SOH\DC2\ETX\ESC\ENQ\DC2\n\
\\v\n\
\\EOT\ENQ\NUL\STX\NUL\DC2\ETX\FS\EOT\ESC\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\ETX\FS\EOT\SYN\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\NUL\STX\DC2\ETX\FS\EM\SUB\n\
\\v\n\
\\EOT\ENQ\NUL\STX\SOH\DC2\ETX\GS\EOT\ESC\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\ETX\GS\EOT\SO\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\SOH\STX\DC2\ETX\GS\EM\SUB\n\
\\v\n\
\\EOT\ENQ\NUL\STX\STX\DC2\ETX\RS\EOT\ESC\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\STX\SOH\DC2\ETX\RS\EOT\DC2\n\
\\f\n\
\\ENQ\ENQ\NUL\STX\STX\STX\DC2\ETX\RS\EM\SUB\n\
\\n\
\\n\
\\STX\ENQ\SOH\DC2\EOT!\NUL%\SOH\n\
\\n\
\\n\
\\ETX\ENQ\SOH\SOH\DC2\ETX!\ENQ\DC4\n\
\\v\n\
\\EOT\ENQ\SOH\STX\NUL\DC2\ETX\"\EOT\DC2\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\NUL\SOH\DC2\ETX\"\EOT\b\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\NUL\STX\DC2\ETX\"\DLE\DC1\n\
\\v\n\
\\EOT\ENQ\SOH\STX\SOH\DC2\ETX#\EOT\DC2\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\SOH\SOH\DC2\ETX#\EOT\t\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\SOH\STX\DC2\ETX#\DLE\DC1\n\
\\v\n\
\\EOT\ENQ\SOH\STX\STX\DC2\ETX$\EOT\DC2\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\STX\SOH\DC2\ETX$\EOT\r\n\
\\f\n\
\\ENQ\ENQ\SOH\STX\STX\STX\DC2\ETX$\DLE\DC1\n\
\\n\
\\n\
\\STX\EOT\NUL\DC2\EOT'\NUL+\SOH\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX'\b\ETB\n\
\\v\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX(\EOT9\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETX(\EOT\f\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX(\r\SUB\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX(\ESC*\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX(78\n\
\\v\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX)\EOT9\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\EOT\DC2\ETX)\EOT\f\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX)\r\FS\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX)\GS.\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX)78\n\
\\v\n\
\\EOT\EOT\NUL\STX\STX\DC2\ETX*\EOT9\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\EOT\DC2\ETX*\EOT\f\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX*\r\DC2\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX*\DC3\GS\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX*78\n\
\\n\
\\n\
\\STX\EOT\SOH\DC2\EOT-\NUL1\SOH\n\
\\n\
\\n\
\\ETX\EOT\SOH\SOH\DC2\ETX-\b\DC4\n\
\;\n\
\\EOT\EOT\SOH\STX\NUL\DC2\ETX.\EOT3\". MlsMessage containing an MlsPlaintext Commit\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\EOT\DC2\ETX.\EOT\f\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX.\r\DC2\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX.\DC3\EM\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX.12\n\
\.\n\
\\EOT\EOT\SOH\STX\SOH\DC2\ETX/\EOT3\"! MlsMessage containing a Welcome\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\EOT\DC2\ETX/\EOT\f\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX/\r\DC2\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX/\DC3\SUB\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX/12\n\
\\v\n\
\\EOT\EOT\SOH\STX\STX\DC2\ETX0\EOT3\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\EOT\DC2\ETX0\EOT\f\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\ACK\DC2\ETX0\r\FS\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX0\GS.\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX012"