packages feed

proto-lens-combinators-0.1.0.0: dist/build/autogen/Proto/Combinators.hs

{- This file was auto-generated from combinators.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
  MultiParamTypeClasses, FlexibleContexts, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
module Proto.Combinators where
import qualified Prelude
import qualified Data.ProtoLens
import qualified Data.ProtoLens.Message.Enum
import qualified Lens.Family2
import qualified Lens.Family2.Unchecked
import qualified Data.Default.Class
import qualified Data.Text
import qualified Data.Int
import qualified Data.Word
import qualified Data.Map
import qualified Data.ByteString

data Foo = Foo{_Foo'quux :: Prelude.Maybe Data.Int.Int32,
               _Foo'foo :: Prelude.Maybe Foo'Bar,
               _Foo'bar :: Prelude.Maybe Foo'Bar,
               _Foo'baz :: Prelude.Maybe Foo'Bar}
         deriving (Prelude.Show, Prelude.Eq)

type instance Data.ProtoLens.Field "quux" Foo = Data.Int.Int32

instance Data.ProtoLens.HasField "quux" Foo Foo where
        field _
          = (Prelude..) maybe'quux
              (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)

type instance Data.ProtoLens.Field "maybe'quux" Foo =
     Prelude.Maybe Data.Int.Int32

instance Data.ProtoLens.HasField "maybe'quux" Foo Foo where
        field _
          = Lens.Family2.Unchecked.lens _Foo'quux
              (\ x__ y__ -> x__{_Foo'quux = y__})

type instance Data.ProtoLens.Field "foo" Foo = Foo'Bar

instance Data.ProtoLens.HasField "foo" Foo Foo where
        field _
          = (Prelude..) maybe'foo
              (Data.ProtoLens.maybeLens Data.Default.Class.def)

type instance Data.ProtoLens.Field "maybe'foo" Foo =
     Prelude.Maybe Foo'Bar

instance Data.ProtoLens.HasField "maybe'foo" Foo Foo where
        field _
          = Lens.Family2.Unchecked.lens _Foo'foo
              (\ x__ y__ -> x__{_Foo'foo = y__})

type instance Data.ProtoLens.Field "bar" Foo = Foo'Bar

instance Data.ProtoLens.HasField "bar" Foo Foo where
        field _
          = (Prelude..) maybe'bar
              (Data.ProtoLens.maybeLens Data.Default.Class.def)

type instance Data.ProtoLens.Field "maybe'bar" Foo =
     Prelude.Maybe Foo'Bar

instance Data.ProtoLens.HasField "maybe'bar" Foo Foo where
        field _
          = Lens.Family2.Unchecked.lens _Foo'bar
              (\ x__ y__ -> x__{_Foo'bar = y__})

type instance Data.ProtoLens.Field "baz" Foo = Foo'Bar

instance Data.ProtoLens.HasField "baz" Foo Foo where
        field _
          = (Prelude..) maybe'baz
              (Data.ProtoLens.maybeLens Data.Default.Class.def)

type instance Data.ProtoLens.Field "maybe'baz" Foo =
     Prelude.Maybe Foo'Bar

instance Data.ProtoLens.HasField "maybe'baz" Foo Foo where
        field _
          = Lens.Family2.Unchecked.lens _Foo'baz
              (\ x__ y__ -> x__{_Foo'baz = y__})

instance Data.Default.Class.Default Foo where
        def
          = Foo{_Foo'quux = Prelude.Nothing, _Foo'foo = Prelude.Nothing,
                _Foo'bar = Prelude.Nothing, _Foo'baz = Prelude.Nothing}

instance Data.ProtoLens.Message Foo where
        descriptor
          = let quux__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "quux"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.OptionalField maybe'quux)
                foo__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "foo"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor Foo'Bar)
                      (Data.ProtoLens.OptionalField maybe'foo)
                bar__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "bar"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor Foo'Bar)
                      (Data.ProtoLens.OptionalField maybe'bar)
                baz__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "baz"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor Foo'Bar)
                      (Data.ProtoLens.OptionalField maybe'baz)
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, quux__field_descriptor),
                    (Data.ProtoLens.Tag 2, foo__field_descriptor),
                    (Data.ProtoLens.Tag 3, bar__field_descriptor),
                    (Data.ProtoLens.Tag 4, baz__field_descriptor)])
                (Data.Map.fromList
                   [("quux", quux__field_descriptor), ("foo", foo__field_descriptor),
                    ("bar", bar__field_descriptor), ("baz", baz__field_descriptor)])

data Foo'Bar = Foo'Bar{_Foo'Bar'fizz ::
                       Prelude.Maybe Data.Int.Int32,
                       _Foo'Bar'buzz :: Prelude.Maybe Data.Text.Text}
             deriving (Prelude.Show, Prelude.Eq)

type instance Data.ProtoLens.Field "fizz" Foo'Bar = Data.Int.Int32

instance Data.ProtoLens.HasField "fizz" Foo'Bar Foo'Bar where
        field _
          = (Prelude..) maybe'fizz
              (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)

type instance Data.ProtoLens.Field "maybe'fizz" Foo'Bar =
     Prelude.Maybe Data.Int.Int32

instance Data.ProtoLens.HasField "maybe'fizz" Foo'Bar Foo'Bar where
        field _
          = Lens.Family2.Unchecked.lens _Foo'Bar'fizz
              (\ x__ y__ -> x__{_Foo'Bar'fizz = y__})

type instance Data.ProtoLens.Field "buzz" Foo'Bar = Data.Text.Text

instance Data.ProtoLens.HasField "buzz" Foo'Bar Foo'Bar where
        field _
          = (Prelude..) maybe'buzz
              (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault)

type instance Data.ProtoLens.Field "maybe'buzz" Foo'Bar =
     Prelude.Maybe Data.Text.Text

instance Data.ProtoLens.HasField "maybe'buzz" Foo'Bar Foo'Bar where
        field _
          = Lens.Family2.Unchecked.lens _Foo'Bar'buzz
              (\ x__ y__ -> x__{_Foo'Bar'buzz = y__})

instance Data.Default.Class.Default Foo'Bar where
        def
          = Foo'Bar{_Foo'Bar'fizz = Prelude.Nothing,
                    _Foo'Bar'buzz = Prelude.Nothing}

instance Data.ProtoLens.Message Foo'Bar where
        descriptor
          = let fizz__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "fizz"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.OptionalField maybe'fizz)
                buzz__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "buzz"
                      (Data.ProtoLens.StringField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
                      (Data.ProtoLens.OptionalField maybe'buzz)
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, fizz__field_descriptor),
                    (Data.ProtoLens.Tag 2, buzz__field_descriptor)])
                (Data.Map.fromList
                   [("fizz", fizz__field_descriptor),
                    ("buzz", buzz__field_descriptor)])

bar ::
    forall msg msg' . Data.ProtoLens.HasField "bar" msg msg' =>
      Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "bar" msg)
        (Data.ProtoLens.Field "bar" msg')
bar
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "bar")

baz ::
    forall msg msg' . Data.ProtoLens.HasField "baz" msg msg' =>
      Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "baz" msg)
        (Data.ProtoLens.Field "baz" msg')
baz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "baz")

buzz ::
     forall msg msg' . Data.ProtoLens.HasField "buzz" msg msg' =>
       Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "buzz" msg)
         (Data.ProtoLens.Field "buzz" msg')
buzz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "buzz")

fizz ::
     forall msg msg' . Data.ProtoLens.HasField "fizz" msg msg' =>
       Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "fizz" msg)
         (Data.ProtoLens.Field "fizz" msg')
fizz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "fizz")

foo ::
    forall msg msg' . Data.ProtoLens.HasField "foo" msg msg' =>
      Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "foo" msg)
        (Data.ProtoLens.Field "foo" msg')
foo
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "foo")

maybe'bar ::
          forall msg msg' . Data.ProtoLens.HasField "maybe'bar" msg msg' =>
            Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'bar" msg)
              (Data.ProtoLens.Field "maybe'bar" msg')
maybe'bar
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'bar")

maybe'baz ::
          forall msg msg' . Data.ProtoLens.HasField "maybe'baz" msg msg' =>
            Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'baz" msg)
              (Data.ProtoLens.Field "maybe'baz" msg')
maybe'baz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'baz")

maybe'buzz ::
           forall msg msg' . Data.ProtoLens.HasField "maybe'buzz" msg msg' =>
             Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'buzz" msg)
               (Data.ProtoLens.Field "maybe'buzz" msg')
maybe'buzz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'buzz")

maybe'fizz ::
           forall msg msg' . Data.ProtoLens.HasField "maybe'fizz" msg msg' =>
             Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'fizz" msg)
               (Data.ProtoLens.Field "maybe'fizz" msg')
maybe'fizz
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'fizz")

maybe'foo ::
          forall msg msg' . Data.ProtoLens.HasField "maybe'foo" msg msg' =>
            Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'foo" msg)
              (Data.ProtoLens.Field "maybe'foo" msg')
maybe'foo
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'foo")

maybe'quux ::
           forall msg msg' . Data.ProtoLens.HasField "maybe'quux" msg msg' =>
             Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "maybe'quux" msg)
               (Data.ProtoLens.Field "maybe'quux" msg')
maybe'quux
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "maybe'quux")

quux ::
     forall msg msg' . Data.ProtoLens.HasField "quux" msg msg' =>
       Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "quux" msg)
         (Data.ProtoLens.Field "quux" msg')
quux
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "quux")