proto-lens-protobuf-types 0.2.2.0 → 0.3.0.0
raw patch · 15 files changed
+1037/−534 lines, 15 filesdep ~proto-lensdep ~proto-lens-protoc
Dependency ranges changed: proto-lens, proto-lens-protoc
Files
- Changelog.md +7/−1
- dist/build/autogen/Proto/Google/Protobuf/Any.hs +0/−93
- dist/build/autogen/Proto/Google/Protobuf/Duration.hs +0/−93
- dist/build/autogen/Proto/Google/Protobuf/Wrappers.hs +0/−316
- dist/build/global-autogen/Proto/Google/Protobuf/Any.hs +96/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Any_Fields.hs +46/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Duration.hs +96/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Duration_Fields.hs +46/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Timestamp.hs +96/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Timestamp_Fields.hs +46/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Wrappers.hs +397/−0
- dist/build/global-autogen/Proto/Google/Protobuf/Wrappers_Fields.hs +40/−0
- proto-lens-protobuf-types.cabal +51/−28
- proto-src/google/protobuf/timestamp.proto +111/−0
- src/Data/ProtoLens/Any.hs +5/−3
Changelog.md view
@@ -1,6 +1,12 @@ # Changelog for `proto-lens-protobuf-types` -## Unreleased changes+## v0.3.0.0+- Remove support for `ghc-7.10`. (#136)+- Use a `.cabal` file that's auto-generated from `hpack`. (#138)+- Separate types into their own module, apart from field lenses. (#100)+- Track `proto-lens` change: split the `Message` class into+ separate methods. (#139)+ ## v0.2.2.0 - Add the `Data.ProtoLens.Any` module for storing arbitrary Messages (#88).
− dist/build/autogen/Proto/Google/Protobuf/Any.hs
@@ -1,93 +0,0 @@-{- This file was auto-generated from google/protobuf/any.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,- FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude- #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-module Proto.Google.Protobuf.Any where-import qualified Data.ProtoLens.Reexport.Prelude as Prelude-import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int-import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word-import qualified Data.ProtoLens.Reexport.Data.ProtoLens- as Data.ProtoLens-import qualified- Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum- as Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Reexport.Lens.Family2- as Lens.Family2-import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked- as Lens.Family2.Unchecked-import qualified Data.ProtoLens.Reexport.Data.Default.Class- as Data.Default.Class-import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text-import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map-import qualified Data.ProtoLens.Reexport.Data.ByteString- as Data.ByteString-import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels--data Any = Any{_Any'typeUrl :: !Data.Text.Text,- _Any'value :: !Data.ByteString.ByteString}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Text.Text, b ~ Data.Text.Text,- Prelude.Functor f) =>- Lens.Labels.HasLens "typeUrl" f Any Any a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Any'typeUrl- (\ x__ y__ -> x__{_Any'typeUrl = y__}))- Prelude.id--instance (a ~ Data.ByteString.ByteString,- b ~ Data.ByteString.ByteString, Prelude.Functor f) =>- Lens.Labels.HasLens "value" f Any Any a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Any'value- (\ x__ y__ -> x__{_Any'value = y__}))- Prelude.id--instance Data.Default.Class.Default Any where- def- = Any{_Any'typeUrl = Data.ProtoLens.fieldDefault,- _Any'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Any where- descriptor- = let typeUrl__field_descriptor- = Data.ProtoLens.FieldDescriptor "type_url"- (Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional typeUrl)- :: Data.ProtoLens.FieldDescriptor Any- value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.BytesField ::- Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor Any- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.Any")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, typeUrl__field_descriptor),- (Data.ProtoLens.Tag 2, value__field_descriptor)])- (Data.Map.fromList- [("type_url", typeUrl__field_descriptor),- ("value", value__field_descriptor)])--typeUrl ::- forall f s t a b . (Lens.Labels.HasLens "typeUrl" f s t a b) =>- Lens.Family2.LensLike f s t a b-typeUrl- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "typeUrl")--value ::- forall f s t a b . (Lens.Labels.HasLens "value" f s t a b) =>- Lens.Family2.LensLike f s t a b-value- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")
− dist/build/autogen/Proto/Google/Protobuf/Duration.hs
@@ -1,93 +0,0 @@-{- This file was auto-generated from google/protobuf/duration.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,- FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude- #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-module Proto.Google.Protobuf.Duration where-import qualified Data.ProtoLens.Reexport.Prelude as Prelude-import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int-import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word-import qualified Data.ProtoLens.Reexport.Data.ProtoLens- as Data.ProtoLens-import qualified- Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum- as Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Reexport.Lens.Family2- as Lens.Family2-import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked- as Lens.Family2.Unchecked-import qualified Data.ProtoLens.Reexport.Data.Default.Class- as Data.Default.Class-import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text-import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map-import qualified Data.ProtoLens.Reexport.Data.ByteString- as Data.ByteString-import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels--data Duration = Duration{_Duration'seconds :: !Data.Int.Int64,- _Duration'nanos :: !Data.Int.Int32}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,- Prelude.Functor f) =>- Lens.Labels.HasLens "seconds" f Duration Duration a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Duration'seconds- (\ x__ y__ -> x__{_Duration'seconds = y__}))- Prelude.id--instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,- Prelude.Functor f) =>- Lens.Labels.HasLens "nanos" f Duration Duration a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Duration'nanos- (\ x__ y__ -> x__{_Duration'nanos = y__}))- Prelude.id--instance Data.Default.Class.Default Duration where- def- = Duration{_Duration'seconds = Data.ProtoLens.fieldDefault,- _Duration'nanos = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Duration where- descriptor- = let seconds__field_descriptor- = Data.ProtoLens.FieldDescriptor "seconds"- (Data.ProtoLens.Int64Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional seconds)- :: Data.ProtoLens.FieldDescriptor Duration- nanos__field_descriptor- = Data.ProtoLens.FieldDescriptor "nanos"- (Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional nanos)- :: Data.ProtoLens.FieldDescriptor Duration- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.Duration")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, seconds__field_descriptor),- (Data.ProtoLens.Tag 2, nanos__field_descriptor)])- (Data.Map.fromList- [("seconds", seconds__field_descriptor),- ("nanos", nanos__field_descriptor)])--nanos ::- forall f s t a b . (Lens.Labels.HasLens "nanos" f s t a b) =>- Lens.Family2.LensLike f s t a b-nanos- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nanos")--seconds ::- forall f s t a b . (Lens.Labels.HasLens "seconds" f s t a b) =>- Lens.Family2.LensLike f s t a b-seconds- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "seconds")
− dist/build/autogen/Proto/Google/Protobuf/Wrappers.hs
@@ -1,316 +0,0 @@-{- This file was auto-generated from google/protobuf/wrappers.proto by the proto-lens-protoc program. -}-{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,- UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,- FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude- #-}-{-# OPTIONS_GHC -fno-warn-unused-imports#-}-module Proto.Google.Protobuf.Wrappers where-import qualified Data.ProtoLens.Reexport.Prelude as Prelude-import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int-import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word-import qualified Data.ProtoLens.Reexport.Data.ProtoLens- as Data.ProtoLens-import qualified- Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum- as Data.ProtoLens.Message.Enum-import qualified Data.ProtoLens.Reexport.Lens.Family2- as Lens.Family2-import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked- as Lens.Family2.Unchecked-import qualified Data.ProtoLens.Reexport.Data.Default.Class- as Data.Default.Class-import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text-import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map-import qualified Data.ProtoLens.Reexport.Data.ByteString- as Data.ByteString-import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels--data BoolValue = BoolValue{_BoolValue'value :: !Prelude.Bool}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Prelude.Bool, b ~ Prelude.Bool, Prelude.Functor f) =>- Lens.Labels.HasLens "value" f BoolValue BoolValue a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _BoolValue'value- (\ x__ y__ -> x__{_BoolValue'value = y__}))- Prelude.id--instance Data.Default.Class.Default BoolValue where- def = BoolValue{_BoolValue'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message BoolValue where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.BoolField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor BoolValue- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.BoolValue")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data BytesValue = BytesValue{_BytesValue'value ::- !Data.ByteString.ByteString}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.ByteString.ByteString,- b ~ Data.ByteString.ByteString, Prelude.Functor f) =>- Lens.Labels.HasLens "value" f BytesValue BytesValue a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _BytesValue'value- (\ x__ y__ -> x__{_BytesValue'value = y__}))- Prelude.id--instance Data.Default.Class.Default BytesValue where- def = BytesValue{_BytesValue'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message BytesValue where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.BytesField ::- Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor BytesValue- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.BytesValue")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data DoubleValue = DoubleValue{_DoubleValue'value ::- !Prelude.Double}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Prelude.Double, b ~ Prelude.Double,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f DoubleValue DoubleValue a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _DoubleValue'value- (\ x__ y__ -> x__{_DoubleValue'value = y__}))- Prelude.id--instance Data.Default.Class.Default DoubleValue where- def = DoubleValue{_DoubleValue'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message DoubleValue where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.DoubleField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Double)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor DoubleValue- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.DoubleValue")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data FloatValue = FloatValue{_FloatValue'value :: !Prelude.Float}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Prelude.Float, b ~ Prelude.Float,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f FloatValue FloatValue a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _FloatValue'value- (\ x__ y__ -> x__{_FloatValue'value = y__}))- Prelude.id--instance Data.Default.Class.Default FloatValue where- def = FloatValue{_FloatValue'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message FloatValue where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.FloatField ::- Data.ProtoLens.FieldTypeDescriptor Prelude.Float)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor FloatValue- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.FloatValue")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data Int32Value = Int32Value{_Int32Value'value :: !Data.Int.Int32}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f Int32Value Int32Value a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Int32Value'value- (\ x__ y__ -> x__{_Int32Value'value = y__}))- Prelude.id--instance Data.Default.Class.Default Int32Value where- def = Int32Value{_Int32Value'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Int32Value where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.Int32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor Int32Value- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.Int32Value")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data Int64Value = Int64Value{_Int64Value'value :: !Data.Int.Int64}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f Int64Value Int64Value a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Int64Value'value- (\ x__ y__ -> x__{_Int64Value'value = y__}))- Prelude.id--instance Data.Default.Class.Default Int64Value where- def = Int64Value{_Int64Value'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Int64Value where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.Int64Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor Int64Value- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.Int64Value")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data StringValue = StringValue{_StringValue'value ::- !Data.Text.Text}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Text.Text, b ~ Data.Text.Text,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f StringValue StringValue a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _StringValue'value- (\ x__ y__ -> x__{_StringValue'value = y__}))- Prelude.id--instance Data.Default.Class.Default StringValue where- def = StringValue{_StringValue'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message StringValue where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.StringField ::- Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor StringValue- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.StringValue")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data Uint32Value = Uint32Value{_Uint32Value'value ::- !Data.Word.Word32}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Word.Word32, b ~ Data.Word.Word32,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f Uint32Value Uint32Value a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Uint32Value'value- (\ x__ y__ -> x__{_Uint32Value'value = y__}))- Prelude.id--instance Data.Default.Class.Default Uint32Value where- def = Uint32Value{_Uint32Value'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Uint32Value where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.UInt32Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor Uint32Value- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.UInt32Value")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--data Uint64Value = Uint64Value{_Uint64Value'value ::- !Data.Word.Word64}- deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)--instance (a ~ Data.Word.Word64, b ~ Data.Word.Word64,- Prelude.Functor f) =>- Lens.Labels.HasLens "value" f Uint64Value Uint64Value a b- where- lensOf _- = (Prelude..)- (Lens.Family2.Unchecked.lens _Uint64Value'value- (\ x__ y__ -> x__{_Uint64Value'value = y__}))- Prelude.id--instance Data.Default.Class.Default Uint64Value where- def = Uint64Value{_Uint64Value'value = Data.ProtoLens.fieldDefault}--instance Data.ProtoLens.Message Uint64Value where- descriptor- = let value__field_descriptor- = Data.ProtoLens.FieldDescriptor "value"- (Data.ProtoLens.UInt64Field ::- Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)- (Data.ProtoLens.PlainField Data.ProtoLens.Optional value)- :: Data.ProtoLens.FieldDescriptor Uint64Value- in- Data.ProtoLens.MessageDescriptor- (Data.Text.pack "google.protobuf.UInt64Value")- (Data.Map.fromList- [(Data.ProtoLens.Tag 1, value__field_descriptor)])- (Data.Map.fromList [("value", value__field_descriptor)])--value ::- forall f s t a b . (Lens.Labels.HasLens "value" f s t a b) =>- Lens.Family2.LensLike f s t a b-value- = Lens.Labels.lensOf- ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")
+ dist/build/global-autogen/Proto/Google/Protobuf/Any.hs view
@@ -0,0 +1,96 @@+{- This file was auto-generated from google/protobuf/any.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Any (Any(..)) where+import qualified Data.ProtoLens.Reexport.Lens.Labels.Prism+ as Lens.Labels.Prism+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++{- | Fields :++ * 'Proto.Google.Protobuf.Any_Fields.typeUrl' @:: Lens' Any Data.Text.Text@+ * 'Proto.Google.Protobuf.Any_Fields.value' @:: Lens' Any Data.ByteString.ByteString@+ -}+data Any = Any{_Any'typeUrl :: !Data.Text.Text,+ _Any'value :: !Data.ByteString.ByteString,+ _Any'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f Any x a, a ~ b) =>+ Lens.Labels.HasLens f Any Any x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Any "typeUrl" (Data.Text.Text)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Any'typeUrl+ (\ x__ y__ -> x__{_Any'typeUrl = y__}))+ Prelude.id+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Any "value" (Data.ByteString.ByteString)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Any'value+ (\ x__ y__ -> x__{_Any'value = y__}))+ Prelude.id+instance Data.Default.Class.Default Any where+ def+ = Any{_Any'typeUrl = Data.ProtoLens.fieldDefault,+ _Any'value = Data.ProtoLens.fieldDefault,+ _Any'_unknownFields = ([])}+instance Data.ProtoLens.Message Any where+ messageName _ = Data.Text.pack "google.protobuf.Any"+ fieldsByTag+ = let typeUrl__field_descriptor+ = Data.ProtoLens.FieldDescriptor "type_url"+ (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+ Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "typeUrl")))+ :: Data.ProtoLens.FieldDescriptor Any+ value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+ Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor Any+ in+ Data.Map.fromList+ [(Data.ProtoLens.Tag 1, typeUrl__field_descriptor),+ (Data.ProtoLens.Tag 2, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _Any'_unknownFields+ (\ x__ y__ -> x__{_Any'_unknownFields = y__})
+ dist/build/global-autogen/Proto/Google/Protobuf/Any_Fields.hs view
@@ -0,0 +1,46 @@+{- This file was auto-generated from google/protobuf/any.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Any_Fields where+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++typeUrl ::+ forall f s t a b . (Lens.Labels.HasLens f s t "typeUrl" a b) =>+ Lens.Family2.LensLike f s t a b+typeUrl+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "typeUrl")+value ::+ forall f s t a b . (Lens.Labels.HasLens f s t "value" a b) =>+ Lens.Family2.LensLike f s t a b+value+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")
+ dist/build/global-autogen/Proto/Google/Protobuf/Duration.hs view
@@ -0,0 +1,96 @@+{- This file was auto-generated from google/protobuf/duration.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Duration (Duration(..)) where+import qualified Data.ProtoLens.Reexport.Lens.Labels.Prism+ as Lens.Labels.Prism+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++{- | Fields :++ * 'Proto.Google.Protobuf.Duration_Fields.seconds' @:: Lens' Duration Data.Int.Int64@+ * 'Proto.Google.Protobuf.Duration_Fields.nanos' @:: Lens' Duration Data.Int.Int32@+ -}+data Duration = Duration{_Duration'seconds :: !Data.Int.Int64,+ _Duration'nanos :: !Data.Int.Int32,+ _Duration'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f Duration x a, a ~ b) =>+ Lens.Labels.HasLens f Duration Duration x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Duration "seconds" (Data.Int.Int64)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Duration'seconds+ (\ x__ y__ -> x__{_Duration'seconds = y__}))+ Prelude.id+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Duration "nanos" (Data.Int.Int32)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Duration'nanos+ (\ x__ y__ -> x__{_Duration'nanos = y__}))+ Prelude.id+instance Data.Default.Class.Default Duration where+ def+ = Duration{_Duration'seconds = Data.ProtoLens.fieldDefault,+ _Duration'nanos = Data.ProtoLens.fieldDefault,+ _Duration'_unknownFields = ([])}+instance Data.ProtoLens.Message Duration where+ messageName _ = Data.Text.pack "google.protobuf.Duration"+ fieldsByTag+ = let seconds__field_descriptor+ = Data.ProtoLens.FieldDescriptor "seconds"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "seconds")))+ :: Data.ProtoLens.FieldDescriptor Duration+ nanos__field_descriptor+ = Data.ProtoLens.FieldDescriptor "nanos"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nanos")))+ :: Data.ProtoLens.FieldDescriptor Duration+ in+ Data.Map.fromList+ [(Data.ProtoLens.Tag 1, seconds__field_descriptor),+ (Data.ProtoLens.Tag 2, nanos__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _Duration'_unknownFields+ (\ x__ y__ -> x__{_Duration'_unknownFields = y__})
+ dist/build/global-autogen/Proto/Google/Protobuf/Duration_Fields.hs view
@@ -0,0 +1,46 @@+{- This file was auto-generated from google/protobuf/duration.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Duration_Fields where+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++nanos ::+ forall f s t a b . (Lens.Labels.HasLens f s t "nanos" a b) =>+ Lens.Family2.LensLike f s t a b+nanos+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nanos")+seconds ::+ forall f s t a b . (Lens.Labels.HasLens f s t "seconds" a b) =>+ Lens.Family2.LensLike f s t a b+seconds+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "seconds")
+ dist/build/global-autogen/Proto/Google/Protobuf/Timestamp.hs view
@@ -0,0 +1,96 @@+{- This file was auto-generated from google/protobuf/timestamp.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Timestamp (Timestamp(..)) where+import qualified Data.ProtoLens.Reexport.Lens.Labels.Prism+ as Lens.Labels.Prism+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++{- | Fields :++ * 'Proto.Google.Protobuf.Timestamp_Fields.seconds' @:: Lens' Timestamp Data.Int.Int64@+ * 'Proto.Google.Protobuf.Timestamp_Fields.nanos' @:: Lens' Timestamp Data.Int.Int32@+ -}+data Timestamp = Timestamp{_Timestamp'seconds :: !Data.Int.Int64,+ _Timestamp'nanos :: !Data.Int.Int32,+ _Timestamp'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f Timestamp x a, a ~ b) =>+ Lens.Labels.HasLens f Timestamp Timestamp x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Timestamp "seconds" (Data.Int.Int64)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Timestamp'seconds+ (\ x__ y__ -> x__{_Timestamp'seconds = y__}))+ Prelude.id+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Timestamp "nanos" (Data.Int.Int32)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Timestamp'nanos+ (\ x__ y__ -> x__{_Timestamp'nanos = y__}))+ Prelude.id+instance Data.Default.Class.Default Timestamp where+ def+ = Timestamp{_Timestamp'seconds = Data.ProtoLens.fieldDefault,+ _Timestamp'nanos = Data.ProtoLens.fieldDefault,+ _Timestamp'_unknownFields = ([])}+instance Data.ProtoLens.Message Timestamp where+ messageName _ = Data.Text.pack "google.protobuf.Timestamp"+ fieldsByTag+ = let seconds__field_descriptor+ = Data.ProtoLens.FieldDescriptor "seconds"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "seconds")))+ :: Data.ProtoLens.FieldDescriptor Timestamp+ nanos__field_descriptor+ = Data.ProtoLens.FieldDescriptor "nanos"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nanos")))+ :: Data.ProtoLens.FieldDescriptor Timestamp+ in+ Data.Map.fromList+ [(Data.ProtoLens.Tag 1, seconds__field_descriptor),+ (Data.ProtoLens.Tag 2, nanos__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _Timestamp'_unknownFields+ (\ x__ y__ -> x__{_Timestamp'_unknownFields = y__})
+ dist/build/global-autogen/Proto/Google/Protobuf/Timestamp_Fields.hs view
@@ -0,0 +1,46 @@+{- This file was auto-generated from google/protobuf/timestamp.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Timestamp_Fields where+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++nanos ::+ forall f s t a b . (Lens.Labels.HasLens f s t "nanos" a b) =>+ Lens.Family2.LensLike f s t a b+nanos+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "nanos")+seconds ::+ forall f s t a b . (Lens.Labels.HasLens f s t "seconds" a b) =>+ Lens.Family2.LensLike f s t a b+seconds+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "seconds")
+ dist/build/global-autogen/Proto/Google/Protobuf/Wrappers.hs view
@@ -0,0 +1,397 @@+{- This file was auto-generated from google/protobuf/wrappers.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Wrappers+ (BoolValue(..), BytesValue(..), DoubleValue(..), FloatValue(..),+ Int32Value(..), Int64Value(..), StringValue(..), UInt32Value(..),+ UInt64Value(..))+ where+import qualified Data.ProtoLens.Reexport.Lens.Labels.Prism+ as Lens.Labels.Prism+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' BoolValue Prelude.Bool@+ -}+data BoolValue = BoolValue{_BoolValue'value :: !Prelude.Bool,+ _BoolValue'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f BoolValue x a, a ~ b) =>+ Lens.Labels.HasLens f BoolValue BoolValue x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f BoolValue "value" (Prelude.Bool)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _BoolValue'value+ (\ x__ y__ -> x__{_BoolValue'value = y__}))+ Prelude.id+instance Data.Default.Class.Default BoolValue where+ def+ = BoolValue{_BoolValue'value = Data.ProtoLens.fieldDefault,+ _BoolValue'_unknownFields = ([])}+instance Data.ProtoLens.Message BoolValue where+ messageName _ = Data.Text.pack "google.protobuf.BoolValue"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::+ Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor BoolValue+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _BoolValue'_unknownFields+ (\ x__ y__ -> x__{_BoolValue'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' BytesValue Data.ByteString.ByteString@+ -}+data BytesValue = BytesValue{_BytesValue'value ::+ !Data.ByteString.ByteString,+ _BytesValue'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f BytesValue x a, a ~ b) =>+ Lens.Labels.HasLens f BytesValue BytesValue x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f BytesValue "value"+ (Data.ByteString.ByteString)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _BytesValue'value+ (\ x__ y__ -> x__{_BytesValue'value = y__}))+ Prelude.id+instance Data.Default.Class.Default BytesValue where+ def+ = BytesValue{_BytesValue'value = Data.ProtoLens.fieldDefault,+ _BytesValue'_unknownFields = ([])}+instance Data.ProtoLens.Message BytesValue where+ messageName _ = Data.Text.pack "google.protobuf.BytesValue"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::+ Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor BytesValue+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _BytesValue'_unknownFields+ (\ x__ y__ -> x__{_BytesValue'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' DoubleValue Prelude.Double@+ -}+data DoubleValue = DoubleValue{_DoubleValue'value ::+ !Prelude.Double,+ _DoubleValue'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f DoubleValue x a, a ~ b) =>+ Lens.Labels.HasLens f DoubleValue DoubleValue x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f DoubleValue "value" (Prelude.Double)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _DoubleValue'value+ (\ x__ y__ -> x__{_DoubleValue'value = y__}))+ Prelude.id+instance Data.Default.Class.Default DoubleValue where+ def+ = DoubleValue{_DoubleValue'value = Data.ProtoLens.fieldDefault,+ _DoubleValue'_unknownFields = ([])}+instance Data.ProtoLens.Message DoubleValue where+ messageName _ = Data.Text.pack "google.protobuf.DoubleValue"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::+ Data.ProtoLens.FieldTypeDescriptor Prelude.Double)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor DoubleValue+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _DoubleValue'_unknownFields+ (\ x__ y__ -> x__{_DoubleValue'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' FloatValue Prelude.Float@+ -}+data FloatValue = FloatValue{_FloatValue'value :: !Prelude.Float,+ _FloatValue'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f FloatValue x a, a ~ b) =>+ Lens.Labels.HasLens f FloatValue FloatValue x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f FloatValue "value" (Prelude.Float)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _FloatValue'value+ (\ x__ y__ -> x__{_FloatValue'value = y__}))+ Prelude.id+instance Data.Default.Class.Default FloatValue where+ def+ = FloatValue{_FloatValue'value = Data.ProtoLens.fieldDefault,+ _FloatValue'_unknownFields = ([])}+instance Data.ProtoLens.Message FloatValue where+ messageName _ = Data.Text.pack "google.protobuf.FloatValue"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.FloatField ::+ Data.ProtoLens.FieldTypeDescriptor Prelude.Float)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor FloatValue+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _FloatValue'_unknownFields+ (\ x__ y__ -> x__{_FloatValue'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' Int32Value Data.Int.Int32@+ -}+data Int32Value = Int32Value{_Int32Value'value :: !Data.Int.Int32,+ _Int32Value'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f Int32Value x a, a ~ b) =>+ Lens.Labels.HasLens f Int32Value Int32Value x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Int32Value "value" (Data.Int.Int32)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Int32Value'value+ (\ x__ y__ -> x__{_Int32Value'value = y__}))+ Prelude.id+instance Data.Default.Class.Default Int32Value where+ def+ = Int32Value{_Int32Value'value = Data.ProtoLens.fieldDefault,+ _Int32Value'_unknownFields = ([])}+instance Data.ProtoLens.Message Int32Value where+ messageName _ = Data.Text.pack "google.protobuf.Int32Value"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor Int32Value+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _Int32Value'_unknownFields+ (\ x__ y__ -> x__{_Int32Value'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' Int64Value Data.Int.Int64@+ -}+data Int64Value = Int64Value{_Int64Value'value :: !Data.Int.Int64,+ _Int64Value'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f Int64Value x a, a ~ b) =>+ Lens.Labels.HasLens f Int64Value Int64Value x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f Int64Value "value" (Data.Int.Int64)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _Int64Value'value+ (\ x__ y__ -> x__{_Int64Value'value = y__}))+ Prelude.id+instance Data.Default.Class.Default Int64Value where+ def+ = Int64Value{_Int64Value'value = Data.ProtoLens.fieldDefault,+ _Int64Value'_unknownFields = ([])}+instance Data.ProtoLens.Message Int64Value where+ messageName _ = Data.Text.pack "google.protobuf.Int64Value"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor Int64Value+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _Int64Value'_unknownFields+ (\ x__ y__ -> x__{_Int64Value'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' StringValue Data.Text.Text@+ -}+data StringValue = StringValue{_StringValue'value ::+ !Data.Text.Text,+ _StringValue'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f StringValue x a, a ~ b) =>+ Lens.Labels.HasLens f StringValue StringValue x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f StringValue "value" (Data.Text.Text)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _StringValue'value+ (\ x__ y__ -> x__{_StringValue'value = y__}))+ Prelude.id+instance Data.Default.Class.Default StringValue where+ def+ = StringValue{_StringValue'value = Data.ProtoLens.fieldDefault,+ _StringValue'_unknownFields = ([])}+instance Data.ProtoLens.Message StringValue where+ messageName _ = Data.Text.pack "google.protobuf.StringValue"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::+ Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor StringValue+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _StringValue'_unknownFields+ (\ x__ y__ -> x__{_StringValue'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' UInt32Value Data.Word.Word32@+ -}+data UInt32Value = UInt32Value{_UInt32Value'value ::+ !Data.Word.Word32,+ _UInt32Value'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f UInt32Value x a, a ~ b) =>+ Lens.Labels.HasLens f UInt32Value UInt32Value x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f UInt32Value "value" (Data.Word.Word32)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _UInt32Value'value+ (\ x__ y__ -> x__{_UInt32Value'value = y__}))+ Prelude.id+instance Data.Default.Class.Default UInt32Value where+ def+ = UInt32Value{_UInt32Value'value = Data.ProtoLens.fieldDefault,+ _UInt32Value'_unknownFields = ([])}+instance Data.ProtoLens.Message UInt32Value where+ messageName _ = Data.Text.pack "google.protobuf.UInt32Value"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor UInt32Value+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _UInt32Value'_unknownFields+ (\ x__ y__ -> x__{_UInt32Value'_unknownFields = y__})+{- | Fields :++ * 'Proto.Google.Protobuf.Wrappers_Fields.value' @:: Lens' UInt64Value Data.Word.Word64@+ -}+data UInt64Value = UInt64Value{_UInt64Value'value ::+ !Data.Word.Word64,+ _UInt64Value'_unknownFields :: !Data.ProtoLens.FieldSet}+ deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)+instance (Lens.Labels.HasLens' f UInt64Value x a, a ~ b) =>+ Lens.Labels.HasLens f UInt64Value UInt64Value x a b+ where+ lensOf = Lens.Labels.lensOf'+instance Prelude.Functor f =>+ Lens.Labels.HasLens' f UInt64Value "value" (Data.Word.Word64)+ where+ lensOf' _+ = (Prelude..)+ (Lens.Family2.Unchecked.lens _UInt64Value'value+ (\ x__ y__ -> x__{_UInt64Value'value = y__}))+ Prelude.id+instance Data.Default.Class.Default UInt64Value where+ def+ = UInt64Value{_UInt64Value'value = Data.ProtoLens.fieldDefault,+ _UInt64Value'_unknownFields = ([])}+instance Data.ProtoLens.Message UInt64Value where+ messageName _ = Data.Text.pack "google.protobuf.UInt64Value"+ fieldsByTag+ = let value__field_descriptor+ = Data.ProtoLens.FieldDescriptor "value"+ (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::+ Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)+ (Data.ProtoLens.PlainField Data.ProtoLens.Optional+ (Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")))+ :: Data.ProtoLens.FieldDescriptor UInt64Value+ in+ Data.Map.fromList [(Data.ProtoLens.Tag 1, value__field_descriptor)]+ unknownFields+ = Lens.Family2.Unchecked.lens _UInt64Value'_unknownFields+ (\ x__ y__ -> x__{_UInt64Value'_unknownFields = y__})
+ dist/build/global-autogen/Proto/Google/Protobuf/Wrappers_Fields.hs view
@@ -0,0 +1,40 @@+{- This file was auto-generated from google/protobuf/wrappers.proto by the proto-lens-protoc program. -}+{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,+ UndecidableInstances, GeneralizedNewtypeDeriving,+ MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,+ PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports#-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports#-}+module Proto.Google.Protobuf.Wrappers_Fields where+import qualified Data.ProtoLens.Reexport.Prelude as Prelude+import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int+import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word+import qualified Data.ProtoLens.Reexport.Data.ProtoLens+ as Data.ProtoLens+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum+ as Data.ProtoLens.Message.Enum+import qualified+ Data.ProtoLens.Reexport.Data.ProtoLens.Service.Types+ as Data.ProtoLens.Service.Types+import qualified Data.ProtoLens.Reexport.Lens.Family2+ as Lens.Family2+import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked+ as Lens.Family2.Unchecked+import qualified Data.ProtoLens.Reexport.Data.Default.Class+ as Data.Default.Class+import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text+import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map+import qualified Data.ProtoLens.Reexport.Data.ByteString+ as Data.ByteString+import qualified Data.ProtoLens.Reexport.Data.ByteString.Char8+ as Data.ByteString.Char8+import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels+import qualified Data.ProtoLens.Reexport.Text.Read as Text.Read++value ::+ forall f s t a b . (Lens.Labels.HasLens f s t "value" a b) =>+ Lens.Family2.LensLike f s t a b+value+ = Lens.Labels.lensOf+ ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "value")
proto-lens-protobuf-types.cabal view
@@ -1,38 +1,61 @@-name: proto-lens-protobuf-types-version: 0.2.2.0-synopsis: Basic protocol buffer message types.-description:- This package provides bindings standard protocol message types,- for use with the proto-lens library.+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: cd8a7bfa591fc782ff8fe76096c65f70b2fd51bffe58e7a07b79605aaa81be50 -homepage: https://github.com/google/proto-lens-license: BSD3-license-file: LICENSE-author: Judah Jacobson-maintainer: proto-lens@googlegroups.com-copyright: Google Inc.-category: Data-build-type: Custom-cabal-version: >=1.8+name: proto-lens-protobuf-types+version: 0.3.0.0+synopsis: Basic protocol buffer message types.+description: This package provides bindings standard protocol message types, for use with the proto-lens library.+category: Data+homepage: https://github.com/google/proto-lens#readme+bug-reports: https://github.com/google/proto-lens/issues+author: Judah Jacobson+maintainer: proto-lens@googlegroups.com+copyright: Google Inc.+license: BSD3+license-file: LICENSE+build-type: Custom+cabal-version: >= 1.10+ extra-source-files: Changelog.md proto-src/google/protobuf/any.proto proto-src/google/protobuf/duration.proto+ proto-src/google/protobuf/timestamp.proto proto-src/google/protobuf/wrappers.proto +source-repository head+ type: git+ location: https://github.com/google/proto-lens+ subdir: proto-lens-protobuf-types+ custom-setup- setup-depends: base >= 4.8 && < 4.11- , Cabal- , proto-lens-protoc == 0.2.*+ setup-depends:+ Cabal+ , base >=4.8 && <4.11+ , proto-lens-protoc ==0.3.* library- hs-source-dirs: src- exposed-modules: Data.ProtoLens.Any- Proto.Google.Protobuf.Any- Proto.Google.Protobuf.Duration- Proto.Google.Protobuf.Wrappers- build-depends: base >= 4.8 && < 4.11- , lens-family- , proto-lens >= 0.2.2 && < 0.3- , proto-lens-protoc >= 0.2.2 && < 0.3- , text == 1.2.*+ hs-source-dirs:+ src+ build-depends:+ base >=4.8 && <4.11+ , lens-family+ , proto-lens ==0.3.*+ , proto-lens-protoc ==0.3.*+ , text ==1.2.*+ exposed-modules:+ Data.ProtoLens.Any+ Proto.Google.Protobuf.Any+ Proto.Google.Protobuf.Any_Fields+ Proto.Google.Protobuf.Duration+ Proto.Google.Protobuf.Duration_Fields+ Proto.Google.Protobuf.Wrappers+ Proto.Google.Protobuf.Wrappers_Fields+ Proto.Google.Protobuf.Timestamp+ Proto.Google.Protobuf.Timestamp_Fields+ other-modules:+ Paths_proto_lens_protobuf_types+ default-language: Haskell2010
+ proto-src/google/protobuf/timestamp.proto view
@@ -0,0 +1,111 @@+// Protocol Buffers - Google's data interchange format+// Copyright 2008 Google Inc. All rights reserved.+// https://developers.google.com/protocol-buffers/+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++syntax = "proto3";++package google.protobuf;++option csharp_namespace = "Google.Protobuf.WellKnownTypes";+option cc_enable_arenas = true;+option go_package = "github.com/golang/protobuf/ptypes/timestamp";+option java_package = "com.google.protobuf";+option java_outer_classname = "TimestampProto";+option java_multiple_files = true;+option java_generate_equals_and_hash = true;+option objc_class_prefix = "GPB";++// A Timestamp represents a point in time independent of any time zone+// or calendar, represented as seconds and fractions of seconds at+// nanosecond resolution in UTC Epoch time. It is encoded using the+// Proleptic Gregorian Calendar which extends the Gregorian calendar+// backwards to year one. It is encoded assuming all minutes are 60+// seconds long, i.e. leap seconds are "smeared" so that no leap second+// table is needed for interpretation. Range is from+// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.+// By restricting to that range, we ensure that we can convert to+// and from RFC 3339 date strings.+// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).+//+// Example 1: Compute Timestamp from POSIX `time()`.+//+// Timestamp timestamp;+// timestamp.set_seconds(time(NULL));+// timestamp.set_nanos(0);+//+// Example 2: Compute Timestamp from POSIX `gettimeofday()`.+//+// struct timeval tv;+// gettimeofday(&tv, NULL);+//+// Timestamp timestamp;+// timestamp.set_seconds(tv.tv_sec);+// timestamp.set_nanos(tv.tv_usec * 1000);+//+// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.+//+// FILETIME ft;+// GetSystemTimeAsFileTime(&ft);+// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;+//+// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z+// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.+// Timestamp timestamp;+// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));+// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));+//+// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.+//+// long millis = System.currentTimeMillis();+//+// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)+// .setNanos((int) ((millis % 1000) * 1000000)).build();+//+//+// Example 5: Compute Timestamp from current time in Python.+//+// now = time.time()+// seconds = int(now)+// nanos = int((now - seconds) * 10**9)+// timestamp = Timestamp(seconds=seconds, nanos=nanos)+//+//+message Timestamp {++ // Represents seconds of UTC time since Unix epoch+ // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to+ // 9999-12-31T23:59:59Z inclusive.+ int64 seconds = 1;++ // Non-negative fractions of a second at nanosecond resolution. Negative+ // second values with fractions must still have non-negative nanos values+ // that count forward in time. Must be from 0 to 999,999,999+ // inclusive.+ int32 nanos = 2;+}
src/Data/ProtoLens/Any.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeApplications #-} module Data.ProtoLens.Any ( Any , pack@@ -18,10 +19,11 @@ , def , encodeMessage , Message(..)- , MessageDescriptor(..) )+import Data.Proxy (Proxy(..)) import Lens.Family2 ((&), (.~), (^.)) import Proto.Google.Protobuf.Any+import Proto.Google.Protobuf.Any_Fields -- | Packs the given message into an 'Any' using the default type URL prefix -- "type.googleapis.com".@@ -37,7 +39,7 @@ def & typeUrl .~ (prefix <> "/" <> name) & value .~ encodeMessage x where- name = messageName (descriptor :: MessageDescriptor a)+ name = messageName (Proxy @a) -- | A description of a failure during `unpack` to decode an `Any` message -- into the expected type.@@ -66,4 +68,4 @@ Left e -> Left $ DecodingError $ Text.pack e Right x -> Right x where- expectedName = messageName (descriptor :: MessageDescriptor a)+ expectedName = messageName (Proxy @a)