9
9
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
10
10
11
11
-- | Generated by Haskell protocol buffer compiler. DO NOT EDIT!
12
+
12
13
module Ledger.Queryresult.KvQueryResult where
13
14
import qualified Prelude as Hs
14
15
import qualified Proto3.Suite.Class as HsProtobuf
@@ -35,16 +36,16 @@ import qualified GHC.Enum as Hs
35
36
import qualified GHC.Generics as Hs
36
37
import qualified Unsafe.Coerce as Hs
37
38
import qualified Google.Protobuf.Timestamp
38
-
39
+
39
40
data KV = KV { kvNamespace :: Hs. Text , kvKey :: Hs. Text ,
40
41
kvValue :: Hs. ByteString}
41
42
deriving (Hs.Show , Hs.Eq , Hs.Ord , Hs.Generic , Hs.NFData )
42
-
43
+
43
44
instance HsProtobuf. Named KV where
44
45
nameOf _ = (Hs. fromString " KV" )
45
-
46
+
46
47
instance HsProtobuf. HasDefault KV
47
-
48
+
48
49
instance HsProtobuf. Message KV where
49
50
encodeMessage _
50
51
KV {kvNamespace = kvNamespace, kvKey = kvKey, kvValue = kvValue}
@@ -80,27 +81,27 @@ instance HsProtobuf.Message KV where
80
81
(HsProtobuf. Single " value" )
81
82
[]
82
83
" " )]
83
-
84
+
84
85
instance HsJSONPB. ToJSONPB KV where
85
86
toJSONPB (KV f1 f2 f3)
86
87
= (HsJSONPB. object [" namespace" .= f1, " key" .= f2, " value" .= f3])
87
88
toEncodingPB (KV f1 f2 f3)
88
89
= (HsJSONPB. pairs [" namespace" .= f1, " key" .= f2, " value" .= f3])
89
-
90
+
90
91
instance HsJSONPB. FromJSONPB KV where
91
92
parseJSONPB
92
93
= (HsJSONPB. withObject " KV"
93
94
(\ obj ->
94
95
(Hs. pure KV ) <*> obj .: " namespace" <*> obj .: " key" <*>
95
96
obj .: " value" ))
96
-
97
+
97
98
instance HsJSONPB. ToJSON KV where
98
99
toJSON = HsJSONPB. toAesonValue
99
100
toEncoding = HsJSONPB. toAesonEncoding
100
-
101
+
101
102
instance HsJSONPB. FromJSON KV where
102
103
parseJSON = HsJSONPB. parseJSONPB
103
-
104
+
104
105
instance HsJSONPB. ToSchema KV where
105
106
declareNamedSchema _
106
107
= do let declare_namespace = HsJSONPB. declareSchemaRef
@@ -122,20 +123,20 @@ instance HsJSONPB.ToSchema KV where
122
123
HsJSONPB. insOrdFromList
123
124
[(" namespace" , kvNamespace), (" key" , kvKey),
124
125
(" value" , kvValue)]}})
125
-
126
+
126
127
data KeyModification = KeyModification { keyModificationTxId ::
127
128
Hs. Text ,
128
129
keyModificationValue :: Hs. ByteString ,
129
130
keyModificationTimestamp ::
130
131
Hs. Maybe Google.Protobuf.Timestamp. Timestamp ,
131
132
keyModificationIsDelete :: Hs. Bool }
132
133
deriving (Hs.Show , Hs.Eq , Hs.Ord , Hs.Generic , Hs.NFData )
133
-
134
+
134
135
instance HsProtobuf. Named KeyModification where
135
136
nameOf _ = (Hs. fromString " KeyModification" )
136
-
137
+
137
138
instance HsProtobuf. HasDefault KeyModification
138
-
139
+
139
140
instance HsProtobuf. Message KeyModification where
140
141
encodeMessage _
141
142
KeyModification {keyModificationTxId = keyModificationTxId,
@@ -193,7 +194,7 @@ instance HsProtobuf.Message KeyModification where
193
194
(HsProtobuf. Single " is_delete" )
194
195
[]
195
196
" " )]
196
-
197
+
197
198
instance HsJSONPB. ToJSONPB KeyModification where
198
199
toJSONPB (KeyModification f1 f2 f3 f4)
199
200
= (HsJSONPB. object
@@ -203,22 +204,22 @@ instance HsJSONPB.ToJSONPB KeyModification where
203
204
= (HsJSONPB. pairs
204
205
[" tx_id" .= f1, " value" .= f2, " timestamp" .= f3,
205
206
" is_delete" .= f4])
206
-
207
+
207
208
instance HsJSONPB. FromJSONPB KeyModification where
208
209
parseJSONPB
209
210
= (HsJSONPB. withObject " KeyModification"
210
211
(\ obj ->
211
212
(Hs. pure KeyModification ) <*> obj .: " tx_id" <*> obj .: " value" <*>
212
213
obj .: " timestamp"
213
214
<*> obj .: " is_delete" ))
214
-
215
+
215
216
instance HsJSONPB. ToJSON KeyModification where
216
217
toJSON = HsJSONPB. toAesonValue
217
218
toEncoding = HsJSONPB. toAesonEncoding
218
-
219
+
219
220
instance HsJSONPB. FromJSON KeyModification where
220
221
parseJSON = HsJSONPB. parseJSONPB
221
-
222
+
222
223
instance HsJSONPB. ToSchema KeyModification where
223
224
declareNamedSchema _
224
225
= do let declare_tx_id = HsJSONPB. declareSchemaRef
@@ -245,4 +246,4 @@ instance HsJSONPB.ToSchema KeyModification where
245
246
[(" tx_id" , keyModificationTxId),
246
247
(" value" , keyModificationValue),
247
248
(" timestamp" , keyModificationTimestamp),
248
- (" is_delete" , keyModificationIsDelete)]}})
249
+ (" is_delete" , keyModificationIsDelete)]}})
0 commit comments